diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/azure_net_app_files_management_client.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/azure_net_app_files_management_client.py index 229d754ca71d..48e6f19a4017 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/azure_net_app_files_management_client.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/azure_net_app_files_management_client.py @@ -97,7 +97,7 @@ def __init__( super(AzureNetAppFilesManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-05-01' + self.api_version = '2019-06-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -115,15 +115,23 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) def check_name_availability( - self, body, location, custom_headers=None, raw=False, **operation_config): + self, location, name, type, resource_group, custom_headers=None, raw=False, **operation_config): """Check resource name availability. Check if a resource name is available. - :param body: Name availability request. - :type body: object :param location: The location :type location: str + :param name: Resource name to verify. + :type name: str + :param type: Resource type used for verification. Possible values + include: 'Microsoft.NetApp/netAppAccounts', + 'Microsoft.NetApp/netAppAccounts/capacityPools', + 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', + 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' + :type type: str or ~azure.mgmt.netapp.models.CheckNameResourceTypes + :param resource_group: Resource group name. + :type resource_group: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -134,6 +142,8 @@ def check_name_availability( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + body = models.ResourceNameAvailabilityRequest(name=name, type=type, resource_group=resource_group) + # Construct URL url = self.check_name_availability.metadata['url'] path_format_arguments = { @@ -158,7 +168,7 @@ def check_name_availability( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(body, 'object') + body_content = self._serialize.body(body, 'ResourceNameAvailabilityRequest') # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -182,15 +192,23 @@ def check_name_availability( check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability'} def check_file_path_availability( - self, body, location, custom_headers=None, raw=False, **operation_config): + self, location, name, type, resource_group, custom_headers=None, raw=False, **operation_config): """Check file path availability. Check if a file path is available. - :param body: File path availability request. - :type body: object :param location: The location :type location: str + :param name: Resource name to verify. + :type name: str + :param type: Resource type used for verification. Possible values + include: 'Microsoft.NetApp/netAppAccounts', + 'Microsoft.NetApp/netAppAccounts/capacityPools', + 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', + 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' + :type type: str or ~azure.mgmt.netapp.models.CheckNameResourceTypes + :param resource_group: Resource group name. + :type resource_group: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -201,6 +219,8 @@ def check_file_path_availability( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + body = models.ResourceNameAvailabilityRequest(name=name, type=type, resource_group=resource_group) + # Construct URL url = self.check_file_path_availability.metadata['url'] path_format_arguments = { @@ -225,7 +245,7 @@ def check_file_path_availability( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(body, 'object') + body_content = self._serialize.body(body, 'ResourceNameAvailabilityRequest') # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool.py index 1d87d021895f..9a2dc8f38228 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool.py @@ -34,7 +34,7 @@ class CapacityPool(Model): :vartype pool_id: str :param size: Required. size. Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of - 4398046511104). Default value: 4398046511104 . + 4398046511104). :type size: long :param service_level: Required. serviceLevel. The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra'. @@ -75,6 +75,6 @@ def __init__(self, **kwargs): self.type = None self.tags = kwargs.get('tags', None) self.pool_id = None - self.size = kwargs.get('size', 4398046511104) + self.size = kwargs.get('size', None) self.service_level = kwargs.get('service_level', "Premium") self.provisioning_state = None diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool_py3.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool_py3.py index 155677db97cf..6040ddfd3dc9 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool_py3.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool_py3.py @@ -34,7 +34,7 @@ class CapacityPool(Model): :vartype pool_id: str :param size: Required. size. Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of - 4398046511104). Default value: 4398046511104 . + 4398046511104). :type size: long :param service_level: Required. serviceLevel. The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra'. @@ -67,7 +67,7 @@ class CapacityPool(Model): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, location: str, tags=None, size: int=4398046511104, service_level="Premium", **kwargs) -> None: + def __init__(self, *, location: str, size: int, tags=None, service_level="Premium", **kwargs) -> None: super(CapacityPool, self).__init__(**kwargs) self.location = location self.id = None diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/volume.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/volume.py index 962b912979c3..99be4a98142f 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/volume.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/volume.py @@ -51,7 +51,8 @@ class Volume(Model): :type protocol_types: list[str] :ivar provisioning_state: Azure lifecycle management :vartype provisioning_state: str - :param snapshot_id: Snapshot ID. UUID v4 used to identify the Snapshot + :param snapshot_id: Snapshot ID. UUID v4 or resource identifier used to + identify the Snapshot. :type snapshot_id: str :ivar baremetal_tenant_id: Baremetal Tenant ID. Unique Baremetal Tenant Identifier. @@ -72,7 +73,7 @@ class Volume(Model): 'creation_token': {'required': True}, 'usage_threshold': {'required': True, 'maximum': 109951162777600, 'minimum': 107374182400}, 'provisioning_state': {'readonly': True}, - 'snapshot_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}$'}, + 'snapshot_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, '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}$'}, 'subnet_id': {'required': True}, } diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_py3.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_py3.py index fffd1adb899e..eb5382162a98 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_py3.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_py3.py @@ -51,7 +51,8 @@ class Volume(Model): :type protocol_types: list[str] :ivar provisioning_state: Azure lifecycle management :vartype provisioning_state: str - :param snapshot_id: Snapshot ID. UUID v4 used to identify the Snapshot + :param snapshot_id: Snapshot ID. UUID v4 or resource identifier used to + identify the Snapshot. :type snapshot_id: str :ivar baremetal_tenant_id: Baremetal Tenant ID. Unique Baremetal Tenant Identifier. @@ -72,7 +73,7 @@ class Volume(Model): 'creation_token': {'required': True}, 'usage_threshold': {'required': True, 'maximum': 109951162777600, 'minimum': 107374182400}, 'provisioning_state': {'readonly': True}, - 'snapshot_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}$'}, + 'snapshot_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, '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}$'}, 'subnet_id': {'required': True}, } diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/accounts_operations.py index 6fb3c0b9a73e..afe23568a1ed 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/accounts_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/accounts_operations.py @@ -25,7 +25,7 @@ class AccountsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-05-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-06-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2019-06-01" self.config = config @@ -413,7 +413,7 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/mount_targets_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/mount_targets_operations.py index 4f3f72cf991c..a1e784ff2ff8 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/mount_targets_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/mount_targets_operations.py @@ -23,7 +23,7 @@ class MountTargetsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-05-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-06-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2019-06-01" self.config = config diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/operations.py index 29b9e525cd9e..c61e14bfb0c0 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-05-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-06-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2019-06-01" self.config = config diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/pools_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/pools_operations.py index cdd96e103f58..d8df81ab6f55 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/pools_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/pools_operations.py @@ -25,7 +25,7 @@ class PoolsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-05-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-06-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2019-06-01" self.config = config @@ -344,7 +344,7 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/snapshots_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/snapshots_operations.py index 323a9b2de0b5..d126f356ca13 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/snapshots_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/snapshots_operations.py @@ -25,7 +25,7 @@ class SnapshotsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-05-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-06-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2019-06-01" self.config = config @@ -368,7 +368,7 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py index c7eca12f4170..2dc1df212f6c 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py @@ -25,7 +25,7 @@ class VolumesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-05-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-06-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2019-06-01" self.config = config @@ -355,7 +355,7 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp