From 1a03ad3f762915fbf582a4f4a619d8fd785ebfa1 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 9 Sep 2021 15:34:30 +0000 Subject: [PATCH] CodeGen from PR 15850 in Azure/azure-rest-api-specs Merge 92d4fb03b8c76f4769cf89c488f6d9ac22248f4e into a2ff0f70f7f9de671145d948524d9bd806536cdf --- sdk/netapp/azure-mgmt-netapp/_meta.json | 2 +- .../azure/mgmt/netapp/_metadata.json | 1 + .../mgmt/netapp/_net_app_management_client.py | 5 + .../azure/mgmt/netapp/_version.py | 2 +- .../netapp/aio/_net_app_management_client.py | 5 + .../mgmt/netapp/aio/operations/__init__.py | 2 + ...et_app_resource_quota_limits_operations.py | 174 ++++++++++++++ .../azure/mgmt/netapp/models/__init__.py | 19 ++ .../azure/mgmt/netapp/models/_models.py | 207 ++++++++++++++++- .../azure/mgmt/netapp/models/_models_py3.py | 216 +++++++++++++++++- .../_net_app_management_client_enums.py | 20 ++ .../azure/mgmt/netapp/operations/__init__.py | 2 + ...et_app_resource_quota_limits_operations.py | 180 +++++++++++++++ 13 files changed, 823 insertions(+), 12 deletions(-) create mode 100644 sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_quota_limits_operations.py create mode 100644 sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py diff --git a/sdk/netapp/azure-mgmt-netapp/_meta.json b/sdk/netapp/azure-mgmt-netapp/_meta.json index 66b72a4d0157..081b2dba46e8 100644 --- a/sdk/netapp/azure-mgmt-netapp/_meta.json +++ b/sdk/netapp/azure-mgmt-netapp/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "1a5e9c6601a9611ac23c58bc9857693dcd9884f3", + "commit": "0d58dabcc5439f8e7261cf0361f55b0bcfac0adf", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/netapp/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/netapp/resource-manager/readme.md" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_metadata.json b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_metadata.json index 61967bd76130..84abb483e858 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_metadata.json +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_metadata.json @@ -100,6 +100,7 @@ "operation_groups": { "operations": "Operations", "net_app_resource": "NetAppResourceOperations", + "net_app_resource_quota_limits": "NetAppResourceQuotaLimitsOperations", "accounts": "AccountsOperations", "pools": "PoolsOperations", "volumes": "VolumesOperations", diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py index 02a575ff6008..e1e62edc2125 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py @@ -21,6 +21,7 @@ from ._configuration import NetAppManagementClientConfiguration from .operations import Operations from .operations import NetAppResourceOperations +from .operations import NetAppResourceQuotaLimitsOperations from .operations import AccountsOperations from .operations import PoolsOperations from .operations import VolumesOperations @@ -40,6 +41,8 @@ class NetAppManagementClient(object): :vartype operations: azure.mgmt.netapp.operations.Operations :ivar net_app_resource: NetAppResourceOperations operations :vartype net_app_resource: azure.mgmt.netapp.operations.NetAppResourceOperations + :ivar net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations operations + :vartype net_app_resource_quota_limits: azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsOperations :ivar accounts: AccountsOperations operations :vartype accounts: azure.mgmt.netapp.operations.AccountsOperations :ivar pools: PoolsOperations operations @@ -88,6 +91,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.net_app_resource = NetAppResourceOperations( self._client, self._config, self._serialize, self._deserialize) + self.net_app_resource_quota_limits = NetAppResourceQuotaLimitsOperations( + self._client, self._config, self._serialize, self._deserialize) self.accounts = AccountsOperations( self._client, self._config, self._serialize, self._deserialize) self.pools = PoolsOperations( diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py index 34ea7990c4b4..e5754a47ce68 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "5.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_net_app_management_client.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_net_app_management_client.py index 168a9919a3d0..0bf052399fa0 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_net_app_management_client.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_net_app_management_client.py @@ -19,6 +19,7 @@ from ._configuration import NetAppManagementClientConfiguration from .operations import Operations from .operations import NetAppResourceOperations +from .operations import NetAppResourceQuotaLimitsOperations from .operations import AccountsOperations from .operations import PoolsOperations from .operations import VolumesOperations @@ -38,6 +39,8 @@ class NetAppManagementClient(object): :vartype operations: azure.mgmt.netapp.aio.operations.Operations :ivar net_app_resource: NetAppResourceOperations operations :vartype net_app_resource: azure.mgmt.netapp.aio.operations.NetAppResourceOperations + :ivar net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations operations + :vartype net_app_resource_quota_limits: azure.mgmt.netapp.aio.operations.NetAppResourceQuotaLimitsOperations :ivar accounts: AccountsOperations operations :vartype accounts: azure.mgmt.netapp.aio.operations.AccountsOperations :ivar pools: PoolsOperations operations @@ -85,6 +88,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.net_app_resource = NetAppResourceOperations( self._client, self._config, self._serialize, self._deserialize) + self.net_app_resource_quota_limits = NetAppResourceQuotaLimitsOperations( + self._client, self._config, self._serialize, self._deserialize) self.accounts = AccountsOperations( self._client, self._config, self._serialize, self._deserialize) self.pools = PoolsOperations( diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/__init__.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/__init__.py index c6a3683d0ea3..77e29c38a55f 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/__init__.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/__init__.py @@ -8,6 +8,7 @@ from ._operations import Operations from ._net_app_resource_operations import NetAppResourceOperations +from ._net_app_resource_quota_limits_operations import NetAppResourceQuotaLimitsOperations from ._accounts_operations import AccountsOperations from ._pools_operations import PoolsOperations from ._volumes_operations import VolumesOperations @@ -21,6 +22,7 @@ __all__ = [ 'Operations', 'NetAppResourceOperations', + 'NetAppResourceQuotaLimitsOperations', 'AccountsOperations', 'PoolsOperations', 'VolumesOperations', diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_quota_limits_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_quota_limits_operations.py new file mode 100644 index 000000000000..c3224aadc11d --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_quota_limits_operations.py @@ -0,0 +1,174 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetAppResourceQuotaLimitsOperations: + """NetAppResourceQuotaLimitsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.netapp.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + location: str, + **kwargs: Any + ) -> AsyncIterable["_models.SubscriptionQuotaItemList"]: + """Get quota limits. + + Get the default and current limits for quotas. + + :param location: The location. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SubscriptionQuotaItemList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.SubscriptionQuotaItemList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionQuotaItemList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SubscriptionQuotaItemList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits'} # type: ignore + + async def get( + self, + location: str, + quota_limit_name: str, + **kwargs: Any + ) -> "_models.SubscriptionQuotaItem": + """Get quota limits. + + Get the default and current subscription quota limit. + + :param location: The location. + :type location: str + :param quota_limit_name: The name of the Quota Limit. + :type quota_limit_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SubscriptionQuotaItem, or the result of cls(response) + :rtype: ~azure.mgmt.netapp.models.SubscriptionQuotaItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionQuotaItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'quotaLimitName': self._serialize.url("quota_limit_name", quota_limit_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SubscriptionQuotaItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits/{quotaLimitName}'} # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py index 53cf6372c287..d7ff6ec6ea32 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py @@ -29,6 +29,7 @@ from ._models_py3 import ExportPolicyRule from ._models_py3 import FilePathAvailabilityRequest from ._models_py3 import HourlySchedule + from ._models_py3 import LogSpecification from ._models_py3 import MetricSpecification from ._models_py3 import MonthlySchedule from ._models_py3 import MountTarget @@ -40,9 +41,11 @@ from ._models_py3 import OperationDisplay from ._models_py3 import OperationListResult from ._models_py3 import PoolChangeRequest + from ._models_py3 import ProxyResource from ._models_py3 import QuotaAvailabilityRequest from ._models_py3 import ReplicationObject from ._models_py3 import ReplicationStatus + from ._models_py3 import Resource from ._models_py3 import ResourceIdentity from ._models_py3 import ResourceNameAvailabilityRequest from ._models_py3 import RestoreStatus @@ -54,6 +57,8 @@ from ._models_py3 import SnapshotPolicyPatch from ._models_py3 import SnapshotPolicyVolumeList from ._models_py3 import SnapshotsList + from ._models_py3 import SubscriptionQuotaItem + from ._models_py3 import SubscriptionQuotaItemList from ._models_py3 import SystemData from ._models_py3 import Vault from ._models_py3 import VaultList @@ -92,6 +97,7 @@ from ._models import ExportPolicyRule # type: ignore from ._models import FilePathAvailabilityRequest # type: ignore from ._models import HourlySchedule # type: ignore + from ._models import LogSpecification # type: ignore from ._models import MetricSpecification # type: ignore from ._models import MonthlySchedule # type: ignore from ._models import MountTarget # type: ignore @@ -103,9 +109,11 @@ from ._models import OperationDisplay # type: ignore from ._models import OperationListResult # type: ignore from ._models import PoolChangeRequest # type: ignore + from ._models import ProxyResource # type: ignore from ._models import QuotaAvailabilityRequest # type: ignore from ._models import ReplicationObject # type: ignore from ._models import ReplicationStatus # type: ignore + from ._models import Resource # type: ignore from ._models import ResourceIdentity # type: ignore from ._models import ResourceNameAvailabilityRequest # type: ignore from ._models import RestoreStatus # type: ignore @@ -117,6 +125,8 @@ from ._models import SnapshotPolicyPatch # type: ignore from ._models import SnapshotPolicyVolumeList # type: ignore from ._models import SnapshotsList # type: ignore + from ._models import SubscriptionQuotaItem # type: ignore + from ._models import SubscriptionQuotaItemList # type: ignore from ._models import SystemData # type: ignore from ._models import Vault # type: ignore from ._models import VaultList # type: ignore @@ -146,11 +156,13 @@ InAvailabilityReasonType, MetricAggregationType, MirrorState, + NetworkFeatures, QosType, RelationshipStatus, ReplicationSchedule, SecurityStyle, ServiceLevel, + VolumeStorageToNetworkProximity, ) __all__ = [ @@ -176,6 +188,7 @@ 'ExportPolicyRule', 'FilePathAvailabilityRequest', 'HourlySchedule', + 'LogSpecification', 'MetricSpecification', 'MonthlySchedule', 'MountTarget', @@ -187,9 +200,11 @@ 'OperationDisplay', 'OperationListResult', 'PoolChangeRequest', + 'ProxyResource', 'QuotaAvailabilityRequest', 'ReplicationObject', 'ReplicationStatus', + 'Resource', 'ResourceIdentity', 'ResourceNameAvailabilityRequest', 'RestoreStatus', @@ -201,6 +216,8 @@ 'SnapshotPolicyPatch', 'SnapshotPolicyVolumeList', 'SnapshotsList', + 'SubscriptionQuotaItem', + 'SubscriptionQuotaItemList', 'SystemData', 'Vault', 'VaultList', @@ -228,9 +245,11 @@ 'InAvailabilityReasonType', 'MetricAggregationType', 'MirrorState', + 'NetworkFeatures', 'QosType', 'RelationshipStatus', 'ReplicationSchedule', 'SecurityStyle', 'ServiceLevel', + 'VolumeStorageToNetworkProximity', ] diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py index 7810879cad91..d78614cc759b 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py @@ -1132,6 +1132,29 @@ def __init__( self.used_bytes = kwargs.get('used_bytes', None) +class LogSpecification(msrest.serialization.Model): + """Log Definition of a single resource metric. + + :param name: + :type name: str + :param display_name: + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + + class MetricSpecification(msrest.serialization.Model): """Metric specification of operation. @@ -1149,6 +1172,8 @@ class MetricSpecification(msrest.serialization.Model): :type supported_time_grain_types: list[str] :param internal_metric_name: The internal metric name. :type internal_metric_name: str + :param enable_regional_mdm_account: Whether or not the service is using regional MDM accounts. + :type enable_regional_mdm_account: bool :param source_mdm_account: The source MDM account. :type source_mdm_account: str :param source_mdm_namespace: The source MDM namespace. @@ -1163,6 +1188,8 @@ class MetricSpecification(msrest.serialization.Model): :type category: str :param resource_id_dimension_name_override: Account Resource Id. :type resource_id_dimension_name_override: str + :param is_internal: Whether the metric is internal. + :type is_internal: bool """ _attribute_map = { @@ -1173,6 +1200,7 @@ class MetricSpecification(msrest.serialization.Model): 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, @@ -1180,6 +1208,7 @@ class MetricSpecification(msrest.serialization.Model): 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'category': {'key': 'category', 'type': 'str'}, 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + 'is_internal': {'key': 'isInternal', 'type': 'bool'}, } def __init__( @@ -1194,6 +1223,7 @@ def __init__( self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) self.internal_metric_name = kwargs.get('internal_metric_name', None) + self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) self.source_mdm_account = kwargs.get('source_mdm_account', None) self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) self.dimensions = kwargs.get('dimensions', None) @@ -1201,6 +1231,7 @@ def __init__( self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) self.category = kwargs.get('category', None) self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) + self.is_internal = kwargs.get('is_internal', None) class MonthlySchedule(msrest.serialization.Model): @@ -1599,6 +1630,77 @@ def __init__( self.new_pool_resource_id = kwargs['new_pool_resource_id'] +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + class QuotaAvailabilityRequest(msrest.serialization.Model): """Quota availability request content. @@ -1647,8 +1749,8 @@ class ReplicationObject(msrest.serialization.Model): :param endpoint_type: Indicates whether the local volume is the source or destination for the Volume Replication. Possible values include: "src", "dst". :type endpoint_type: str or ~azure.mgmt.netapp.models.EndpointType - :param replication_schedule: Required. Schedule. Possible values include: "_10minutely", - "hourly", "daily". + :param replication_schedule: Schedule. Possible values include: "_10minutely", "hourly", + "daily". :type replication_schedule: str or ~azure.mgmt.netapp.models.ReplicationSchedule :param remote_volume_resource_id: Required. The resource ID of the remote volume. :type remote_volume_resource_id: str @@ -1657,7 +1759,6 @@ class ReplicationObject(msrest.serialization.Model): """ _validation = { - 'replication_schedule': {'required': True}, 'remote_volume_resource_id': {'required': True}, } @@ -1676,7 +1777,7 @@ def __init__( super(ReplicationObject, self).__init__(**kwargs) self.replication_id = kwargs.get('replication_id', None) self.endpoint_type = kwargs.get('endpoint_type', None) - self.replication_schedule = kwargs['replication_schedule'] + self.replication_schedule = kwargs.get('replication_schedule', None) self.remote_volume_resource_id = kwargs['remote_volume_resource_id'] self.remote_volume_region = kwargs.get('remote_volume_region', None) @@ -1847,10 +1948,13 @@ class ServiceSpecification(msrest.serialization.Model): :param metric_specifications: Metric specifications of operation. :type metric_specifications: list[~azure.mgmt.netapp.models.MetricSpecification] + :param log_specifications: + :type log_specifications: list[~azure.mgmt.netapp.models.LogSpecification] """ _attribute_map = { 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, } def __init__( @@ -1859,6 +1963,7 @@ def __init__( ): super(ServiceSpecification, self).__init__(**kwargs) self.metric_specifications = kwargs.get('metric_specifications', None) + self.log_specifications = kwargs.get('log_specifications', None) class Snapshot(msrest.serialization.Model): @@ -2187,6 +2292,79 @@ def __init__( self.value = kwargs.get('value', None) +class SubscriptionQuotaItem(ProxyResource): + """Information regarding Subscription Quota Item. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.netapp.models.SystemData + :ivar name_properties_name: Quota Item name. + :vartype name_properties_name: str + :ivar current: The current quota value. + :vartype current: int + :ivar default: The default quota value. + :vartype default: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'name_properties_name': {'readonly': True}, + 'current': {'readonly': True}, + 'default': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'current': {'key': 'properties.current', 'type': 'int'}, + 'default': {'key': 'properties.default', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionQuotaItem, self).__init__(**kwargs) + self.system_data = None + self.name_properties_name = None + self.current = None + self.default = None + + +class SubscriptionQuotaItemList(msrest.serialization.Model): + """List of Subscription Quota Items. + + :param value: A list of SubscriptionQuotaItems. + :type value: list[~azure.mgmt.netapp.models.SubscriptionQuotaItem] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SubscriptionQuotaItem]'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionQuotaItemList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. @@ -2339,9 +2517,20 @@ class Volume(msrest.serialization.Model): :param subnet_id: Required. The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. :type subnet_id: str + :param network_features: Basic network, or Standard features available to the volume. Possible + values include: "Basic", "Standard". Default value: "Basic". + :type network_features: str or ~azure.mgmt.netapp.models.NetworkFeatures + :ivar network_sibling_set_id: Network Sibling Set ID for the the group of volumes sharing + networking resources. + :vartype network_sibling_set_id: str + :ivar storage_to_network_proximity: Provides storage to network proximity information for the + volume. Possible values include: "Default", "T1", "T2". + :vartype storage_to_network_proximity: str or + ~azure.mgmt.netapp.models.VolumeStorageToNetworkProximity :ivar mount_targets: List of mount targets. :vartype mount_targets: list[~azure.mgmt.netapp.models.MountTargetProperties] - :param volume_type: What type of volume is this. + :param volume_type: What type of volume is this. For destination volumes in Cross Region + Replication, set type to DataProtection. :type volume_type: str :param data_protection: DataProtection type volumes include an object containing details of the replication. @@ -2413,6 +2602,8 @@ class Volume(msrest.serialization.Model): 'backup_id': {'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$'}, 'baremetal_tenant_id': {'readonly': True}, 'subnet_id': {'required': True}, + 'network_sibling_set_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, + 'storage_to_network_proximity': {'readonly': True}, 'mount_targets': {'readonly': True}, 'throughput_mibps': {'maximum': 4500, 'minimum': 0}, 'coolness_period': {'maximum': 63, 'minimum': 7}, @@ -2438,6 +2629,9 @@ class Volume(msrest.serialization.Model): 'backup_id': {'key': 'properties.backupId', 'type': 'str'}, 'baremetal_tenant_id': {'key': 'properties.baremetalTenantId', 'type': 'str'}, 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'network_features': {'key': 'properties.networkFeatures', 'type': 'str'}, + 'network_sibling_set_id': {'key': 'properties.networkSiblingSetId', 'type': 'str'}, + 'storage_to_network_proximity': {'key': 'properties.storageToNetworkProximity', 'type': 'str'}, 'mount_targets': {'key': 'properties.mountTargets', 'type': '[MountTargetProperties]'}, 'volume_type': {'key': 'properties.volumeType', 'type': 'str'}, 'data_protection': {'key': 'properties.dataProtection', 'type': 'VolumePropertiesDataProtection'}, @@ -2482,6 +2676,9 @@ def __init__( self.backup_id = kwargs.get('backup_id', None) self.baremetal_tenant_id = None self.subnet_id = kwargs['subnet_id'] + self.network_features = kwargs.get('network_features', "Basic") + self.network_sibling_set_id = None + self.storage_to_network_proximity = None self.mount_targets = None self.volume_type = kwargs.get('volume_type', None) self.data_protection = kwargs.get('data_protection', None) diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py index 818518becae7..d2dddd6fb4ed 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py @@ -1249,6 +1249,32 @@ def __init__( self.used_bytes = used_bytes +class LogSpecification(msrest.serialization.Model): + """Log Definition of a single resource metric. + + :param name: + :type name: str + :param display_name: + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + + class MetricSpecification(msrest.serialization.Model): """Metric specification of operation. @@ -1266,6 +1292,8 @@ class MetricSpecification(msrest.serialization.Model): :type supported_time_grain_types: list[str] :param internal_metric_name: The internal metric name. :type internal_metric_name: str + :param enable_regional_mdm_account: Whether or not the service is using regional MDM accounts. + :type enable_regional_mdm_account: bool :param source_mdm_account: The source MDM account. :type source_mdm_account: str :param source_mdm_namespace: The source MDM namespace. @@ -1280,6 +1308,8 @@ class MetricSpecification(msrest.serialization.Model): :type category: str :param resource_id_dimension_name_override: Account Resource Id. :type resource_id_dimension_name_override: str + :param is_internal: Whether the metric is internal. + :type is_internal: bool """ _attribute_map = { @@ -1290,6 +1320,7 @@ class MetricSpecification(msrest.serialization.Model): 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, @@ -1297,6 +1328,7 @@ class MetricSpecification(msrest.serialization.Model): 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'category': {'key': 'category', 'type': 'str'}, 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + 'is_internal': {'key': 'isInternal', 'type': 'bool'}, } def __init__( @@ -1309,6 +1341,7 @@ def __init__( supported_aggregation_types: Optional[List[Union[str, "MetricAggregationType"]]] = None, supported_time_grain_types: Optional[List[str]] = None, internal_metric_name: Optional[str] = None, + enable_regional_mdm_account: Optional[bool] = None, source_mdm_account: Optional[str] = None, source_mdm_namespace: Optional[str] = None, dimensions: Optional[List["Dimension"]] = None, @@ -1316,6 +1349,7 @@ def __init__( fill_gap_with_zero: Optional[bool] = None, category: Optional[str] = None, resource_id_dimension_name_override: Optional[str] = None, + is_internal: Optional[bool] = None, **kwargs ): super(MetricSpecification, self).__init__(**kwargs) @@ -1326,6 +1360,7 @@ def __init__( self.supported_aggregation_types = supported_aggregation_types self.supported_time_grain_types = supported_time_grain_types self.internal_metric_name = internal_metric_name + self.enable_regional_mdm_account = enable_regional_mdm_account self.source_mdm_account = source_mdm_account self.source_mdm_namespace = source_mdm_namespace self.dimensions = dimensions @@ -1333,6 +1368,7 @@ def __init__( self.fill_gap_with_zero = fill_gap_with_zero self.category = category self.resource_id_dimension_name_override = resource_id_dimension_name_override + self.is_internal = is_internal class MonthlySchedule(msrest.serialization.Model): @@ -1772,6 +1808,77 @@ def __init__( self.new_pool_resource_id = new_pool_resource_id +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + class QuotaAvailabilityRequest(msrest.serialization.Model): """Quota availability request content. @@ -1824,8 +1931,8 @@ class ReplicationObject(msrest.serialization.Model): :param endpoint_type: Indicates whether the local volume is the source or destination for the Volume Replication. Possible values include: "src", "dst". :type endpoint_type: str or ~azure.mgmt.netapp.models.EndpointType - :param replication_schedule: Required. Schedule. Possible values include: "_10minutely", - "hourly", "daily". + :param replication_schedule: Schedule. Possible values include: "_10minutely", "hourly", + "daily". :type replication_schedule: str or ~azure.mgmt.netapp.models.ReplicationSchedule :param remote_volume_resource_id: Required. The resource ID of the remote volume. :type remote_volume_resource_id: str @@ -1834,7 +1941,6 @@ class ReplicationObject(msrest.serialization.Model): """ _validation = { - 'replication_schedule': {'required': True}, 'remote_volume_resource_id': {'required': True}, } @@ -1849,10 +1955,10 @@ class ReplicationObject(msrest.serialization.Model): def __init__( self, *, - replication_schedule: Union[str, "ReplicationSchedule"], remote_volume_resource_id: str, replication_id: Optional[str] = None, endpoint_type: Optional[Union[str, "EndpointType"]] = None, + replication_schedule: Optional[Union[str, "ReplicationSchedule"]] = None, remote_volume_region: Optional[str] = None, **kwargs ): @@ -2042,20 +2148,25 @@ class ServiceSpecification(msrest.serialization.Model): :param metric_specifications: Metric specifications of operation. :type metric_specifications: list[~azure.mgmt.netapp.models.MetricSpecification] + :param log_specifications: + :type log_specifications: list[~azure.mgmt.netapp.models.LogSpecification] """ _attribute_map = { 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, } def __init__( self, *, metric_specifications: Optional[List["MetricSpecification"]] = None, + log_specifications: Optional[List["LogSpecification"]] = None, **kwargs ): super(ServiceSpecification, self).__init__(**kwargs) self.metric_specifications = metric_specifications + self.log_specifications = log_specifications class Snapshot(msrest.serialization.Model): @@ -2416,6 +2527,81 @@ def __init__( self.value = value +class SubscriptionQuotaItem(ProxyResource): + """Information regarding Subscription Quota Item. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.netapp.models.SystemData + :ivar name_properties_name: Quota Item name. + :vartype name_properties_name: str + :ivar current: The current quota value. + :vartype current: int + :ivar default: The default quota value. + :vartype default: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'name_properties_name': {'readonly': True}, + 'current': {'readonly': True}, + 'default': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'current': {'key': 'properties.current', 'type': 'int'}, + 'default': {'key': 'properties.default', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionQuotaItem, self).__init__(**kwargs) + self.system_data = None + self.name_properties_name = None + self.current = None + self.default = None + + +class SubscriptionQuotaItemList(msrest.serialization.Model): + """List of Subscription Quota Items. + + :param value: A list of SubscriptionQuotaItems. + :type value: list[~azure.mgmt.netapp.models.SubscriptionQuotaItem] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SubscriptionQuotaItem]'}, + } + + def __init__( + self, + *, + value: Optional[List["SubscriptionQuotaItem"]] = None, + **kwargs + ): + super(SubscriptionQuotaItemList, self).__init__(**kwargs) + self.value = value + + class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. @@ -2580,9 +2766,20 @@ class Volume(msrest.serialization.Model): :param subnet_id: Required. The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. :type subnet_id: str + :param network_features: Basic network, or Standard features available to the volume. Possible + values include: "Basic", "Standard". Default value: "Basic". + :type network_features: str or ~azure.mgmt.netapp.models.NetworkFeatures + :ivar network_sibling_set_id: Network Sibling Set ID for the the group of volumes sharing + networking resources. + :vartype network_sibling_set_id: str + :ivar storage_to_network_proximity: Provides storage to network proximity information for the + volume. Possible values include: "Default", "T1", "T2". + :vartype storage_to_network_proximity: str or + ~azure.mgmt.netapp.models.VolumeStorageToNetworkProximity :ivar mount_targets: List of mount targets. :vartype mount_targets: list[~azure.mgmt.netapp.models.MountTargetProperties] - :param volume_type: What type of volume is this. + :param volume_type: What type of volume is this. For destination volumes in Cross Region + Replication, set type to DataProtection. :type volume_type: str :param data_protection: DataProtection type volumes include an object containing details of the replication. @@ -2654,6 +2851,8 @@ class Volume(msrest.serialization.Model): 'backup_id': {'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$'}, 'baremetal_tenant_id': {'readonly': True}, 'subnet_id': {'required': True}, + 'network_sibling_set_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, + 'storage_to_network_proximity': {'readonly': True}, 'mount_targets': {'readonly': True}, 'throughput_mibps': {'maximum': 4500, 'minimum': 0}, 'coolness_period': {'maximum': 63, 'minimum': 7}, @@ -2679,6 +2878,9 @@ class Volume(msrest.serialization.Model): 'backup_id': {'key': 'properties.backupId', 'type': 'str'}, 'baremetal_tenant_id': {'key': 'properties.baremetalTenantId', 'type': 'str'}, 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'network_features': {'key': 'properties.networkFeatures', 'type': 'str'}, + 'network_sibling_set_id': {'key': 'properties.networkSiblingSetId', 'type': 'str'}, + 'storage_to_network_proximity': {'key': 'properties.storageToNetworkProximity', 'type': 'str'}, 'mount_targets': {'key': 'properties.mountTargets', 'type': '[MountTargetProperties]'}, 'volume_type': {'key': 'properties.volumeType', 'type': 'str'}, 'data_protection': {'key': 'properties.dataProtection', 'type': 'VolumePropertiesDataProtection'}, @@ -2714,6 +2916,7 @@ def __init__( protocol_types: Optional[List[str]] = None, snapshot_id: Optional[str] = None, backup_id: Optional[str] = None, + network_features: Optional[Union[str, "NetworkFeatures"]] = "Basic", volume_type: Optional[str] = None, data_protection: Optional["VolumePropertiesDataProtection"] = None, is_restoring: Optional[bool] = None, @@ -2752,6 +2955,9 @@ def __init__( self.backup_id = backup_id self.baremetal_tenant_id = None self.subnet_id = subnet_id + self.network_features = network_features + self.network_sibling_set_id = None + self.storage_to_network_proximity = None self.mount_targets = None self.volume_type = volume_type self.data_protection = data_protection diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_net_app_management_client_enums.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_net_app_management_client_enums.py index 1265dfef7a3f..436c8e4cee7b 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_net_app_management_client_enums.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_net_app_management_client_enums.py @@ -133,6 +133,15 @@ class MirrorState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MIRRORED = "Mirrored" BROKEN = "Broken" +class NetworkFeatures(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Basic network, or Standard features available to the volume. + """ + + #: Basic network feature. + BASIC = "Basic" + #: Standard network feature. + STANDARD = "Standard" + class QosType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The qos type of the pool """ @@ -176,3 +185,14 @@ class ServiceLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ULTRA = "Ultra" #: Zone redundant storage service level. STANDARD_ZRS = "StandardZRS" + +class VolumeStorageToNetworkProximity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provides storage to network proximity information for the volume. + """ + + #: Basic storage to network connectivity. + DEFAULT = "Default" + #: Standard T1 storage to network connectivity. + T1 = "T1" + #: Standard T2 storage to network connectivity. + T2 = "T2" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/__init__.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/__init__.py index c6a3683d0ea3..77e29c38a55f 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/__init__.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/__init__.py @@ -8,6 +8,7 @@ from ._operations import Operations from ._net_app_resource_operations import NetAppResourceOperations +from ._net_app_resource_quota_limits_operations import NetAppResourceQuotaLimitsOperations from ._accounts_operations import AccountsOperations from ._pools_operations import PoolsOperations from ._volumes_operations import VolumesOperations @@ -21,6 +22,7 @@ __all__ = [ 'Operations', 'NetAppResourceOperations', + 'NetAppResourceQuotaLimitsOperations', 'AccountsOperations', 'PoolsOperations', 'VolumesOperations', diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py new file mode 100644 index 000000000000..0c28d9e614a8 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py @@ -0,0 +1,180 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetAppResourceQuotaLimitsOperations(object): + """NetAppResourceQuotaLimitsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.netapp.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SubscriptionQuotaItemList"] + """Get quota limits. + + Get the default and current limits for quotas. + + :param location: The location. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SubscriptionQuotaItemList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.SubscriptionQuotaItemList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionQuotaItemList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SubscriptionQuotaItemList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits'} # type: ignore + + def get( + self, + location, # type: str + quota_limit_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SubscriptionQuotaItem" + """Get quota limits. + + Get the default and current subscription quota limit. + + :param location: The location. + :type location: str + :param quota_limit_name: The name of the Quota Limit. + :type quota_limit_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SubscriptionQuotaItem, or the result of cls(response) + :rtype: ~azure.mgmt.netapp.models.SubscriptionQuotaItem + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionQuotaItem"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'quotaLimitName': self._serialize.url("quota_limit_name", quota_limit_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SubscriptionQuotaItem', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits/{quotaLimitName}'} # type: ignore