From 427d305b3e594c661e7f5b17b26df9ebf0012c2c Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 23 Nov 2021 08:47:52 +0000 Subject: [PATCH] CodeGen from PR 16381 in Azure/azure-rest-api-specs Merge 20bfdb39625ea18a0578f77c2f1c2c06d41fabe7 into 47b551f58ee1b24f4783c2e927b1673b39d87348 --- sdk/netapp/azure-mgmt-netapp/_meta.json | 2 +- .../azure/mgmt/netapp/_configuration.py | 2 +- .../azure/mgmt/netapp/_metadata.json | 7 +- .../mgmt/netapp/_net_app_management_client.py | 5 + .../azure/mgmt/netapp/_version.py | 2 +- .../azure/mgmt/netapp/aio/_configuration.py | 2 +- .../netapp/aio/_net_app_management_client.py | 5 + .../mgmt/netapp/aio/operations/__init__.py | 2 + .../operations/_account_backups_operations.py | 6 +- .../aio/operations/_accounts_operations.py | 12 +- .../operations/_backup_policies_operations.py | 10 +- .../aio/operations/_backups_operations.py | 14 +- .../_net_app_resource_operations.py | 6 +- ...et_app_resource_quota_limits_operations.py | 4 +- .../mgmt/netapp/aio/operations/_operations.py | 2 +- .../aio/operations/_pools_operations.py | 10 +- .../_snapshot_policies_operations.py | 12 +- .../aio/operations/_snapshots_operations.py | 10 +- .../aio/operations/_vaults_operations.py | 2 +- .../operations/_volume_groups_operations.py | 432 +++++++++++++ .../aio/operations/_volumes_operations.py | 26 +- .../azure/mgmt/netapp/models/__init__.py | 20 + .../azure/mgmt/netapp/models/_models.py | 525 +++++++++++++++- .../azure/mgmt/netapp/models/_models_py3.py | 588 +++++++++++++++++- .../_net_app_management_client_enums.py | 6 + .../azure/mgmt/netapp/operations/__init__.py | 2 + .../operations/_account_backups_operations.py | 6 +- .../netapp/operations/_accounts_operations.py | 12 +- .../operations/_backup_policies_operations.py | 10 +- .../netapp/operations/_backups_operations.py | 14 +- .../_net_app_resource_operations.py | 6 +- ...et_app_resource_quota_limits_operations.py | 4 +- .../mgmt/netapp/operations/_operations.py | 2 +- .../netapp/operations/_pools_operations.py | 10 +- .../_snapshot_policies_operations.py | 12 +- .../operations/_snapshots_operations.py | 10 +- .../netapp/operations/_vaults_operations.py | 2 +- .../operations/_volume_groups_operations.py | 442 +++++++++++++ .../netapp/operations/_volumes_operations.py | 26 +- 39 files changed, 2087 insertions(+), 183 deletions(-) create mode 100644 sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_groups_operations.py create mode 100644 sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py diff --git a/sdk/netapp/azure-mgmt-netapp/_meta.json b/sdk/netapp/azure-mgmt-netapp/_meta.json index a0e15e564120..8e950daba06d 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": "6b95b0f0fa71e18a350cf0ba152591a29a94bdc0", + "commit": "7255339cc98df9fe36828c732b39cee39ac04783", "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/_configuration.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py index 827f8636220a..343de5d8b485 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-06-01" + self.api_version = "2021-08-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-netapp/{}'.format(VERSION)) self._configure(**kwargs) 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 84abb483e858..9d78992f45a2 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_metadata.json +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-06-01", - "total_api_version_list": ["2021-06-01"], + "chosen_version": "2021-08-01", + "total_api_version_list": ["2021-08-01"], "client": { "name": "NetAppManagementClient", "filename": "_net_app_management_client", @@ -109,6 +109,7 @@ "backups": "BackupsOperations", "account_backups": "AccountBackupsOperations", "backup_policies": "BackupPoliciesOperations", - "vaults": "VaultsOperations" + "vaults": "VaultsOperations", + "volume_groups": "VolumeGroupsOperations" } } \ No newline at end of file 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 e1e62edc2125..43f4bab6d64c 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 @@ -31,6 +31,7 @@ from .operations import AccountBackupsOperations from .operations import BackupPoliciesOperations from .operations import VaultsOperations +from .operations import VolumeGroupsOperations from . import models @@ -61,6 +62,8 @@ class NetAppManagementClient(object): :vartype backup_policies: azure.mgmt.netapp.operations.BackupPoliciesOperations :ivar vaults: VaultsOperations operations :vartype vaults: azure.mgmt.netapp.operations.VaultsOperations + :ivar volume_groups: VolumeGroupsOperations operations + :vartype volume_groups: azure.mgmt.netapp.operations.VolumeGroupsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -111,6 +114,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.vaults = VaultsOperations( self._client, self._config, self._serialize, self._deserialize) + self.volume_groups = VolumeGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse 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 e786ca9d2565..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.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py index 18017d867f8d..cd7b4817bc5d 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-06-01" + self.api_version = "2021-08-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-netapp/{}'.format(VERSION)) self._configure(**kwargs) 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 0bf052399fa0..75b13e224edc 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 @@ -29,6 +29,7 @@ from .operations import AccountBackupsOperations from .operations import BackupPoliciesOperations from .operations import VaultsOperations +from .operations import VolumeGroupsOperations from .. import models @@ -59,6 +60,8 @@ class NetAppManagementClient(object): :vartype backup_policies: azure.mgmt.netapp.aio.operations.BackupPoliciesOperations :ivar vaults: VaultsOperations operations :vartype vaults: azure.mgmt.netapp.aio.operations.VaultsOperations + :ivar volume_groups: VolumeGroupsOperations operations + :vartype volume_groups: azure.mgmt.netapp.aio.operations.VolumeGroupsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -108,6 +111,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.vaults = VaultsOperations( self._client, self._config, self._serialize, self._deserialize) + self.volume_groups = VolumeGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. 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 77e29c38a55f..ce5a3a9ff24f 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 @@ -18,6 +18,7 @@ from ._account_backups_operations import AccountBackupsOperations from ._backup_policies_operations import BackupPoliciesOperations from ._vaults_operations import VaultsOperations +from ._volume_groups_operations import VolumeGroupsOperations __all__ = [ 'Operations', @@ -32,4 +33,5 @@ 'AccountBackupsOperations', 'BackupPoliciesOperations', 'VaultsOperations', + 'VolumeGroupsOperations', ] diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_account_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_account_backups_operations.py index a581c209a989..17f5106e65b7 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_account_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_account_backups_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -146,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -195,7 +195,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py index f121a53ccc0e..bff5d798ddc7 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py @@ -61,7 +61,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -132,7 +132,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -207,7 +207,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -255,7 +255,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -384,7 +384,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -493,7 +493,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backup_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backup_policies_operations.py index d0e07c54eef5..26fb4ecc4557 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backup_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backup_policies_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -146,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -334,7 +334,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -470,7 +470,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backups_operations.py index 22ce3192bc3b..6d6d2b964e81 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backups_operations.py @@ -73,7 +73,7 @@ async def get_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -141,7 +141,7 @@ async def get_volume_restore_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -209,7 +209,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -296,7 +296,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -350,7 +350,7 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -502,7 +502,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -655,7 +655,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py index 159e06205fda..db27a6a48bca 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py @@ -72,7 +72,7 @@ async def check_name_availability( error_map.update(kwargs.pop('error_map', {})) _body = _models.ResourceNameAvailabilityRequest(name=name, type=type, resource_group=resource_group) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -142,7 +142,7 @@ async def check_file_path_availability( error_map.update(kwargs.pop('error_map', {})) _body = _models.FilePathAvailabilityRequest(name=name, subnet_id=subnet_id) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -214,7 +214,7 @@ async def check_quota_availability( error_map.update(kwargs.pop('error_map', {})) _body = _models.QuotaAvailabilityRequest(name=name, type=type, resource_group=resource_group) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" 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 index c3224aadc11d..87b01fc4827a 100644 --- 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 @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -137,7 +137,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py index d7f8e3b3babe..a9acf4363d76 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py @@ -59,7 +59,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_pools_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_pools_operations.py index 9e12d11a694d..b0781ec38f34 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_pools_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_pools_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -146,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -333,7 +333,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -467,7 +467,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py index da75e80aa1b9..66f40cf2c3b8 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -142,7 +142,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -207,7 +207,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -266,7 +266,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -400,7 +400,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -528,7 +528,7 @@ async def list_volumes( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshots_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshots_operations.py index 7410f39fb12a..aa0f7aed8da3 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshots_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshots_operations.py @@ -73,7 +73,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -160,7 +160,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -214,7 +214,7 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -363,7 +363,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -511,7 +511,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_vaults_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_vaults_operations.py index 9a692b8422dd..a599215e187d 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_vaults_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_vaults_operations.py @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_groups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_groups_operations.py new file mode 100644 index 000000000000..89177cb4ac53 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_groups_operations.py @@ -0,0 +1,432 @@ +# 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, Union +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.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VolumeGroupsOperations: + """VolumeGroupsOperations 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_by_net_app_account( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.VolumeGroupList"]: + """Describe all volume groups. + + List all volume groups for given account. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param account_name: The name of the NetApp account. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VolumeGroupList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.VolumeGroupList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VolumeGroupList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-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_by_net_app_account.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_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') + + 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('VolumeGroupList', 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_by_net_app_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups'} # type: ignore + + async def get( + self, + resource_group_name: str, + account_name: str, + volume_group_name: str, + **kwargs: Any + ) -> "_models.VolumeGroupDetails": + """Describe a Volume Group. + + Get details of the specified volume group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param account_name: The name of the NetApp account. + :type account_name: str + :param volume_group_name: The name of the volumeGroup. + :type volume_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VolumeGroupDetails, or the result of cls(response) + :rtype: ~azure.mgmt.netapp.models.VolumeGroupDetails + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VolumeGroupDetails"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'volumeGroupName': self._serialize.url("volume_group_name", volume_group_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'), + } + 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('VolumeGroupDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + account_name: str, + volume_group_name: str, + body: "_models.VolumeGroupDetails", + **kwargs: Any + ) -> "_models.VolumeGroupDetails": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VolumeGroupDetails"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'volumeGroupName': self._serialize.url("volume_group_name", volume_group_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'), + } + 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['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'VolumeGroupDetails') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VolumeGroupDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + account_name: str, + volume_group_name: str, + body: "_models.VolumeGroupDetails", + **kwargs: Any + ) -> AsyncLROPoller["_models.VolumeGroupDetails"]: + """Create the specified volume group and volumes. Creating volume group will create all the volumes specified in request body implicitly. Once volumes are created using volume group, those will be treated as regular volumes thereafter. + + Create a volume group along with specified volumes. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param account_name: The name of the NetApp account. + :type account_name: str + :param volume_group_name: The name of the volumeGroup. + :type volume_group_name: str + :param body: Volume Group object supplied in the body of the operation. + :type body: ~azure.mgmt.netapp.models.VolumeGroupDetails + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VolumeGroupDetails or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VolumeGroupDetails"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + account_name=account_name, + volume_group_name=volume_group_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VolumeGroupDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'volumeGroupName': self._serialize.url("volume_group_name", volume_group_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + account_name: str, + volume_group_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'volumeGroupName': self._serialize.url("volume_group_name", volume_group_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'), + } + 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] + + request = self._client.delete(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, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + account_name: str, + volume_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete a volume group. + + Delete the specified volume group only if there are no volumes under volume group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param account_name: The name of the NetApp account. + :type account_name: str + :param volume_group_name: The name of the volumeGroup. + :type volume_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + volume_group_name=volume_group_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'volumeGroupName': self._serialize.url("volume_group_name", volume_group_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}'} # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py index 7a291bdacb2d..51c5d1f87de0 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -153,7 +153,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -205,7 +205,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -350,7 +350,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -491,7 +491,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -614,7 +614,7 @@ async def _revert_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -746,7 +746,7 @@ async def _break_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -897,7 +897,7 @@ async def replication_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -948,7 +948,7 @@ async def _resync_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._resync_replication_initial.metadata['url'] # type: ignore @@ -1071,7 +1071,7 @@ async def _delete_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_replication_initial.metadata['url'] # type: ignore @@ -1195,7 +1195,7 @@ async def _authorize_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -1326,7 +1326,7 @@ async def _re_initialize_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._re_initialize_replication_initial.metadata['url'] # type: ignore @@ -1449,7 +1449,7 @@ async def _pool_change_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL 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 d7ff6ec6ea32..d7e8b33b5ff8 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 @@ -40,6 +40,7 @@ from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationListResult + from ._models_py3 import PlacementKeyValuePairs from ._models_py3 import PoolChangeRequest from ._models_py3 import ProxyResource from ._models_py3 import QuotaAvailabilityRequest @@ -65,6 +66,11 @@ from ._models_py3 import Volume from ._models_py3 import VolumeBackupProperties from ._models_py3 import VolumeBackups + from ._models_py3 import VolumeGroup + from ._models_py3 import VolumeGroupDetails + from ._models_py3 import VolumeGroupList + from ._models_py3 import VolumeGroupMetaData + from ._models_py3 import VolumeGroupVolumeProperties from ._models_py3 import VolumeList from ._models_py3 import VolumePatch from ._models_py3 import VolumePatchPropertiesDataProtection @@ -108,6 +114,7 @@ from ._models import Operation # type: ignore from ._models import OperationDisplay # type: ignore from ._models import OperationListResult # type: ignore + from ._models import PlacementKeyValuePairs # type: ignore from ._models import PoolChangeRequest # type: ignore from ._models import ProxyResource # type: ignore from ._models import QuotaAvailabilityRequest # type: ignore @@ -133,6 +140,11 @@ from ._models import Volume # type: ignore from ._models import VolumeBackupProperties # type: ignore from ._models import VolumeBackups # type: ignore + from ._models import VolumeGroup # type: ignore + from ._models import VolumeGroupDetails # type: ignore + from ._models import VolumeGroupList # type: ignore + from ._models import VolumeGroupMetaData # type: ignore + from ._models import VolumeGroupVolumeProperties # type: ignore from ._models import VolumeList # type: ignore from ._models import VolumePatch # type: ignore from ._models import VolumePatchPropertiesDataProtection # type: ignore @@ -145,6 +157,7 @@ from ._net_app_management_client_enums import ( ActiveDirectoryStatus, + ApplicationType, AvsDataStore, BackupType, CheckNameResourceTypes, @@ -199,6 +212,7 @@ 'Operation', 'OperationDisplay', 'OperationListResult', + 'PlacementKeyValuePairs', 'PoolChangeRequest', 'ProxyResource', 'QuotaAvailabilityRequest', @@ -224,6 +238,11 @@ 'Volume', 'VolumeBackupProperties', 'VolumeBackups', + 'VolumeGroup', + 'VolumeGroupDetails', + 'VolumeGroupList', + 'VolumeGroupMetaData', + 'VolumeGroupVolumeProperties', 'VolumeList', 'VolumePatch', 'VolumePatchPropertiesDataProtection', @@ -234,6 +253,7 @@ 'VolumeSnapshotProperties', 'WeeklySchedule', 'ActiveDirectoryStatus', + 'ApplicationType', 'AvsDataStore', 'BackupType', 'CheckNameResourceTypes', 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 d78614cc759b..8c8683a376ae 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 @@ -87,6 +87,9 @@ class ActiveDirectory(msrest.serialization.Model): :param allow_local_nfs_users_with_ldap: If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. :type allow_local_nfs_users_with_ldap: bool + :param encrypt_dc_connections: If enabled, Traffic between the SMB server to Domain Controller + (DC) will be encrypted. + :type encrypt_dc_connections: bool """ _validation = { @@ -119,6 +122,7 @@ class ActiveDirectory(msrest.serialization.Model): 'security_operators': {'key': 'securityOperators', 'type': '[str]'}, 'ldap_over_tls': {'key': 'ldapOverTLS', 'type': 'bool'}, 'allow_local_nfs_users_with_ldap': {'key': 'allowLocalNfsUsersWithLdap', 'type': 'bool'}, + 'encrypt_dc_connections': {'key': 'encryptDCConnections', 'type': 'bool'}, } def __init__( @@ -146,6 +150,7 @@ def __init__( self.security_operators = kwargs.get('security_operators', None) self.ldap_over_tls = kwargs.get('ldap_over_tls', None) self.allow_local_nfs_users_with_ldap = kwargs.get('allow_local_nfs_users_with_ldap', None) + self.encrypt_dc_connections = kwargs.get('encrypt_dc_connections', None) class AuthorizeRequest(msrest.serialization.Model): @@ -361,8 +366,6 @@ class BackupPolicy(msrest.serialization.Model): :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :ivar name_properties_name: Name of backup policy. - :vartype name_properties_name: str :ivar backup_policy_id: Backup Policy Resource ID. :vartype backup_policy_id: str :ivar provisioning_state: Azure lifecycle management. @@ -387,7 +390,6 @@ class BackupPolicy(msrest.serialization.Model): 'name': {'readonly': True}, 'etag': {'readonly': True}, 'type': {'readonly': True}, - 'name_properties_name': {'readonly': True}, 'backup_policy_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'volumes_assigned': {'readonly': True}, @@ -401,7 +403,6 @@ class BackupPolicy(msrest.serialization.Model): 'etag': {'key': 'etag', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'backup_policy_id': {'key': 'properties.backupPolicyId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'daily_backups_to_keep': {'key': 'properties.dailyBackupsToKeep', 'type': 'int'}, @@ -423,7 +424,6 @@ def __init__( self.etag = None self.type = None self.tags = kwargs.get('tags', None) - self.name_properties_name = None self.backup_policy_id = None self.provisioning_state = None self.daily_backups_to_keep = kwargs.get('daily_backups_to_keep', None) @@ -449,8 +449,6 @@ class BackupPolicyDetails(msrest.serialization.Model): :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :ivar name_properties_name: Name of backup policy. - :vartype name_properties_name: str :ivar backup_policy_id: Backup Policy Resource ID. :vartype backup_policy_id: str :ivar provisioning_state: Azure lifecycle management. @@ -473,7 +471,6 @@ class BackupPolicyDetails(msrest.serialization.Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name_properties_name': {'readonly': True}, 'backup_policy_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'volumes_assigned': {'readonly': True}, @@ -486,7 +483,6 @@ class BackupPolicyDetails(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'backup_policy_id': {'key': 'properties.backupPolicyId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'daily_backups_to_keep': {'key': 'properties.dailyBackupsToKeep', 'type': 'int'}, @@ -507,7 +503,6 @@ def __init__( self.name = None self.type = None self.tags = kwargs.get('tags', None) - self.name_properties_name = None self.backup_policy_id = None self.provisioning_state = None self.daily_backups_to_keep = kwargs.get('daily_backups_to_keep', None) @@ -533,8 +528,6 @@ class BackupPolicyPatch(msrest.serialization.Model): :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :ivar name_properties_name: Name of backup policy. - :vartype name_properties_name: str :ivar backup_policy_id: Backup Policy Resource ID. :vartype backup_policy_id: str :ivar provisioning_state: Azure lifecycle management. @@ -557,7 +550,6 @@ class BackupPolicyPatch(msrest.serialization.Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name_properties_name': {'readonly': True}, 'backup_policy_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'volumes_assigned': {'readonly': True}, @@ -570,7 +562,6 @@ class BackupPolicyPatch(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'backup_policy_id': {'key': 'properties.backupPolicyId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'daily_backups_to_keep': {'key': 'properties.dailyBackupsToKeep', 'type': 'int'}, @@ -591,7 +582,6 @@ def __init__( self.name = None self.type = None self.tags = kwargs.get('tags', None) - self.name_properties_name = None self.backup_policy_id = None self.provisioning_state = None self.daily_backups_to_keep = kwargs.get('daily_backups_to_keep', None) @@ -1135,9 +1125,9 @@ def __init__( class LogSpecification(msrest.serialization.Model): """Log Definition of a single resource metric. - :param name: + :param name: Name of log specification. :type name: str - :param display_name: + :param display_name: Display name of log specification. :type display_name: str """ @@ -1605,6 +1595,38 @@ def __init__( self.value = kwargs.get('value', None) +class PlacementKeyValuePairs(msrest.serialization.Model): + """Application specific parameters for the placement of volumes in the volume group. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. Key for an application specific parameter for the placement of volumes in + the volume group. + :type key: str + :param value: Required. Value for an application specific parameter for the placement of + volumes in the volume group. + :type value: str + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PlacementKeyValuePairs, self).__init__(**kwargs) + self.key = kwargs['key'] + self.value = kwargs['value'] + + class PoolChangeRequest(msrest.serialization.Model): """Pool change request. @@ -1948,7 +1970,7 @@ class ServiceSpecification(msrest.serialization.Model): :param metric_specifications: Metric specifications of operation. :type metric_specifications: list[~azure.mgmt.netapp.models.MetricSpecification] - :param log_specifications: + :param log_specifications: Log specification of operation. :type log_specifications: list[~azure.mgmt.netapp.models.LogSpecification] """ @@ -2258,11 +2280,11 @@ class SnapshotPolicyVolumeList(msrest.serialization.Model): """Volumes associated with snapshot policy. :param value: List of volumes. - :type value: list[any] + :type value: list[~azure.mgmt.netapp.models.Volume] """ _attribute_map = { - 'value': {'key': 'value', 'type': '[object]'}, + 'value': {'key': 'value', 'type': '[Volume]'}, } def __init__( @@ -2307,8 +2329,6 @@ class SubscriptionQuotaItem(ProxyResource): :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. @@ -2320,7 +2340,6 @@ class SubscriptionQuotaItem(ProxyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'system_data': {'readonly': True}, - 'name_properties_name': {'readonly': True}, 'current': {'readonly': True}, 'default': {'readonly': True}, } @@ -2330,7 +2349,6 @@ class SubscriptionQuotaItem(ProxyResource): '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'}, } @@ -2341,7 +2359,6 @@ def __init__( ): super(SubscriptionQuotaItem, self).__init__(**kwargs) self.system_data = None - self.name_properties_name = None self.current = None self.default = None @@ -2552,7 +2569,8 @@ class Volume(msrest.serialization.Model): :param smb_continuously_available: Enables continuously available share property for smb volume. Only applicable for SMB volume. :type smb_continuously_available: bool - :param throughput_mibps: Maximum throughput in Mibps that can be achieved by this volume. + :param throughput_mibps: Maximum throughput in Mibps that can be achieved by this volume and + this will be accepted as input only for manual qosType volume. :type throughput_mibps: float :param encryption_key_source: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. :type encryption_key_source: str @@ -2586,6 +2604,20 @@ class Volume(msrest.serialization.Model): :param default_group_quota_in_ki_bs: Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. :type default_group_quota_in_ki_bs: long + :ivar volume_group_name: Volume Group Name. + :vartype volume_group_name: str + :param capacity_pool_resource_id: Pool Resource Id used in case of creating a volume through + volume group. + :type capacity_pool_resource_id: str + :param proximity_placement_group: Proximity placement group associated with the volume. + :type proximity_placement_group: str + :ivar t2_network: T2 network information. + :vartype t2_network: str + :param volume_spec_name: Volume spec name is the application specific designation or identifier + for the particular volume in a volume group for e.g. data, log. + :type volume_spec_name: str + :param placement_rules: Application specific placement rules for the particular volume. + :type placement_rules: list[~azure.mgmt.netapp.models.PlacementKeyValuePairs] """ _validation = { @@ -2605,10 +2637,11 @@ class Volume(msrest.serialization.Model): '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}, 'unix_permissions': {'max_length': 4, 'min_length': 4}, 'clone_progress': {'readonly': True}, + 'volume_group_name': {'readonly': True}, + 't2_network': {'readonly': True}, } _attribute_map = { @@ -2652,6 +2685,12 @@ class Volume(msrest.serialization.Model): 'is_default_quota_enabled': {'key': 'properties.isDefaultQuotaEnabled', 'type': 'bool'}, 'default_user_quota_in_ki_bs': {'key': 'properties.defaultUserQuotaInKiBs', 'type': 'long'}, 'default_group_quota_in_ki_bs': {'key': 'properties.defaultGroupQuotaInKiBs', 'type': 'long'}, + 'volume_group_name': {'key': 'properties.volumeGroupName', 'type': 'str'}, + 'capacity_pool_resource_id': {'key': 'properties.capacityPoolResourceId', 'type': 'str'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'str'}, + 't2_network': {'key': 'properties.t2Network', 'type': 'str'}, + 'volume_spec_name': {'key': 'properties.volumeSpecName', 'type': 'str'}, + 'placement_rules': {'key': 'properties.placementRules', 'type': '[PlacementKeyValuePairs]'}, } def __init__( @@ -2699,6 +2738,12 @@ def __init__( self.is_default_quota_enabled = kwargs.get('is_default_quota_enabled', False) self.default_user_quota_in_ki_bs = kwargs.get('default_user_quota_in_ki_bs', 0) self.default_group_quota_in_ki_bs = kwargs.get('default_group_quota_in_ki_bs', 0) + self.volume_group_name = None + self.capacity_pool_resource_id = kwargs.get('capacity_pool_resource_id', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.t2_network = None + self.volume_spec_name = kwargs.get('volume_spec_name', None) + self.placement_rules = kwargs.get('placement_rules', None) class VolumeBackupProperties(msrest.serialization.Model): @@ -2759,6 +2804,426 @@ def __init__( self.policy_enabled = kwargs.get('policy_enabled', None) +class VolumeGroup(msrest.serialization.Model): + """Volume group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param location: Resource location. + :type location: str + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :param group_meta_data: Volume group details. + :type group_meta_data: ~azure.mgmt.netapp.models.VolumeGroupMetaData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'group_meta_data': {'key': 'properties.groupMetaData', 'type': 'VolumeGroupMetaData'}, + } + + def __init__( + self, + **kwargs + ): + super(VolumeGroup, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.provisioning_state = None + self.group_meta_data = kwargs.get('group_meta_data', None) + + +class VolumeGroupDetails(msrest.serialization.Model): + """Volume group resource for create. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param location: Resource location. + :type location: str + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :param group_meta_data: Volume group details. + :type group_meta_data: ~azure.mgmt.netapp.models.VolumeGroupMetaData + :param volumes: List of volumes from group. + :type volumes: list[~azure.mgmt.netapp.models.VolumeGroupVolumeProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'group_meta_data': {'key': 'properties.groupMetaData', 'type': 'VolumeGroupMetaData'}, + 'volumes': {'key': 'properties.volumes', 'type': '[VolumeGroupVolumeProperties]'}, + } + + def __init__( + self, + **kwargs + ): + super(VolumeGroupDetails, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.provisioning_state = None + self.group_meta_data = kwargs.get('group_meta_data', None) + self.volumes = kwargs.get('volumes', None) + + +class VolumeGroupList(msrest.serialization.Model): + """List of volume group resources. + + :param value: List of volume Groups. + :type value: list[~azure.mgmt.netapp.models.VolumeGroup] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VolumeGroup]'}, + } + + def __init__( + self, + **kwargs + ): + super(VolumeGroupList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class VolumeGroupMetaData(msrest.serialization.Model): + """Volume group properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param group_description: Group Description. + :type group_description: str + :param application_type: Application Type. Possible values include: "SAP-HANA". + :type application_type: str or ~azure.mgmt.netapp.models.ApplicationType + :param application_identifier: Application specific identifier. + :type application_identifier: str + :param global_placement_rules: Application specific placement rules for the volume group. + :type global_placement_rules: list[~azure.mgmt.netapp.models.PlacementKeyValuePairs] + :param deployment_spec_id: Application specific identifier of deployment rules for the volume + group. + :type deployment_spec_id: str + :ivar volumes_count: Number of volumes in volume group. + :vartype volumes_count: long + """ + + _validation = { + 'volumes_count': {'readonly': True}, + } + + _attribute_map = { + 'group_description': {'key': 'groupDescription', 'type': 'str'}, + 'application_type': {'key': 'applicationType', 'type': 'str'}, + 'application_identifier': {'key': 'applicationIdentifier', 'type': 'str'}, + 'global_placement_rules': {'key': 'globalPlacementRules', 'type': '[PlacementKeyValuePairs]'}, + 'deployment_spec_id': {'key': 'deploymentSpecId', 'type': 'str'}, + 'volumes_count': {'key': 'volumesCount', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(VolumeGroupMetaData, self).__init__(**kwargs) + self.group_description = kwargs.get('group_description', None) + self.application_type = kwargs.get('application_type', None) + self.application_identifier = kwargs.get('application_identifier', None) + self.global_placement_rules = kwargs.get('global_placement_rules', None) + self.deployment_spec_id = kwargs.get('deployment_spec_id', None) + self.volumes_count = None + + +class VolumeGroupVolumeProperties(msrest.serialization.Model): + """Volume resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :param name: Resource name. + :type name: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar file_system_id: Unique FileSystem Identifier. + :vartype file_system_id: str + :param creation_token: Required. A unique file path for the volume. Used when creating mount + targets. + :type creation_token: str + :param service_level: The service level of the file system. Possible values include: + "Standard", "Premium", "Ultra", "StandardZRS". Default value: "Premium". + :type service_level: str or ~azure.mgmt.netapp.models.ServiceLevel + :param usage_threshold: Required. Maximum storage quota allowed for a file system in bytes. + This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. + Specified in bytes. + :type usage_threshold: long + :param export_policy: Set of export policy rules. + :type export_policy: ~azure.mgmt.netapp.models.VolumePropertiesExportPolicy + :param protocol_types: Set of protocol types, default NFSv3, CIFS for SMB protocol. + :type protocol_types: list[str] + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :param snapshot_id: UUID v4 or resource identifier used to identify the Snapshot. + :type snapshot_id: str + :param backup_id: UUID v4 or resource identifier used to identify the Backup. + :type backup_id: str + :ivar baremetal_tenant_id: Unique Baremetal Tenant Identifier. + :vartype baremetal_tenant_id: str + :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. 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. + :type data_protection: ~azure.mgmt.netapp.models.VolumePropertiesDataProtection + :param is_restoring: Restoring. + :type is_restoring: bool + :param snapshot_directory_visible: If enabled (true) the volume will contain a read-only + snapshot directory which provides access to each of the volume's snapshots (default to true). + :type snapshot_directory_visible: bool + :param kerberos_enabled: Describe if a volume is KerberosEnabled. To be use with swagger + version 2020-05-01 or later. + :type kerberos_enabled: bool + :param security_style: The security style of volume, default unix, defaults to ntfs for dual + protocol or CIFS protocol. Possible values include: "ntfs", "unix". Default value: "unix". + :type security_style: str or ~azure.mgmt.netapp.models.SecurityStyle + :param smb_encryption: Enables encryption for in-flight smb3 data. Only applicable for + SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. + :type smb_encryption: bool + :param smb_continuously_available: Enables continuously available share property for smb + volume. Only applicable for SMB volume. + :type smb_continuously_available: bool + :param throughput_mibps: Maximum throughput in Mibps that can be achieved by this volume and + this will be accepted as input only for manual qosType volume. + :type throughput_mibps: float + :param encryption_key_source: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + :type encryption_key_source: str + :param ldap_enabled: Specifies whether LDAP is enabled or not for a given NFS volume. + :type ldap_enabled: bool + :param cool_access: Specifies whether Cool Access(tiering) is enabled for the volume. + :type cool_access: bool + :param coolness_period: Specifies the number of days after which data that is not accessed by + clients will be tiered. + :type coolness_period: int + :param unix_permissions: UNIX permissions for NFS volume accepted in octal 4 digit format. + First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second + digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third + selects permissions for other users in the same group. the fourth for other users not in the + group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other + users. + :type unix_permissions: str + :ivar clone_progress: When a volume is being restored from another volume's snapshot, will show + the percentage completion of this cloning process. When this value is empty/null there is no + cloning process currently happening on this volume. This value will update every 5 minutes + during cloning. + :vartype clone_progress: int + :param avs_data_store: Specifies whether the volume is enabled for Azure VMware Solution (AVS) + datastore purpose. Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :type avs_data_store: str or ~azure.mgmt.netapp.models.AvsDataStore + :param is_default_quota_enabled: Specifies if default quota is enabled for the volume. + :type is_default_quota_enabled: bool + :param default_user_quota_in_ki_bs: Default user quota for volume in KiBs. If + isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + :type default_user_quota_in_ki_bs: long + :param default_group_quota_in_ki_bs: Default group quota for volume in KiBs. If + isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + :type default_group_quota_in_ki_bs: long + :ivar volume_group_name: Volume Group Name. + :vartype volume_group_name: str + :param capacity_pool_resource_id: Pool Resource Id used in case of creating a volume through + volume group. + :type capacity_pool_resource_id: str + :param proximity_placement_group: Proximity placement group associated with the volume. + :type proximity_placement_group: str + :ivar t2_network: T2 network information. + :vartype t2_network: str + :param volume_spec_name: Volume spec name is the application specific designation or identifier + for the particular volume in a volume group for e.g. data, log. + :type volume_spec_name: str + :param placement_rules: Application specific placement rules for the particular volume. + :type placement_rules: list[~azure.mgmt.netapp.models.PlacementKeyValuePairs] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'file_system_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}$'}, + 'creation_token': {'required': True, 'max_length': 80, 'min_length': 1, 'pattern': r'^[a-zA-Z][a-zA-Z0-9\-]{0,79}$'}, + '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}|(\\?([^\/]*[\/])*)([^\/]+)$'}, + '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}, + 'coolness_period': {'maximum': 63, 'minimum': 7}, + 'unix_permissions': {'max_length': 4, 'min_length': 4}, + 'clone_progress': {'readonly': True}, + 'volume_group_name': {'readonly': True}, + 't2_network': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'file_system_id': {'key': 'properties.fileSystemId', 'type': 'str'}, + 'creation_token': {'key': 'properties.creationToken', 'type': 'str'}, + 'service_level': {'key': 'properties.serviceLevel', 'type': 'str'}, + 'usage_threshold': {'key': 'properties.usageThreshold', 'type': 'long'}, + 'export_policy': {'key': 'properties.exportPolicy', 'type': 'VolumePropertiesExportPolicy'}, + 'protocol_types': {'key': 'properties.protocolTypes', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'snapshot_id': {'key': 'properties.snapshotId', 'type': 'str'}, + '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'}, + 'is_restoring': {'key': 'properties.isRestoring', 'type': 'bool'}, + 'snapshot_directory_visible': {'key': 'properties.snapshotDirectoryVisible', 'type': 'bool'}, + 'kerberos_enabled': {'key': 'properties.kerberosEnabled', 'type': 'bool'}, + 'security_style': {'key': 'properties.securityStyle', 'type': 'str'}, + 'smb_encryption': {'key': 'properties.smbEncryption', 'type': 'bool'}, + 'smb_continuously_available': {'key': 'properties.smbContinuouslyAvailable', 'type': 'bool'}, + 'throughput_mibps': {'key': 'properties.throughputMibps', 'type': 'float'}, + 'encryption_key_source': {'key': 'properties.encryptionKeySource', 'type': 'str'}, + 'ldap_enabled': {'key': 'properties.ldapEnabled', 'type': 'bool'}, + 'cool_access': {'key': 'properties.coolAccess', 'type': 'bool'}, + 'coolness_period': {'key': 'properties.coolnessPeriod', 'type': 'int'}, + 'unix_permissions': {'key': 'properties.unixPermissions', 'type': 'str'}, + 'clone_progress': {'key': 'properties.cloneProgress', 'type': 'int'}, + 'avs_data_store': {'key': 'properties.avsDataStore', 'type': 'str'}, + 'is_default_quota_enabled': {'key': 'properties.isDefaultQuotaEnabled', 'type': 'bool'}, + 'default_user_quota_in_ki_bs': {'key': 'properties.defaultUserQuotaInKiBs', 'type': 'long'}, + 'default_group_quota_in_ki_bs': {'key': 'properties.defaultGroupQuotaInKiBs', 'type': 'long'}, + 'volume_group_name': {'key': 'properties.volumeGroupName', 'type': 'str'}, + 'capacity_pool_resource_id': {'key': 'properties.capacityPoolResourceId', 'type': 'str'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'str'}, + 't2_network': {'key': 'properties.t2Network', 'type': 'str'}, + 'volume_spec_name': {'key': 'properties.volumeSpecName', 'type': 'str'}, + 'placement_rules': {'key': 'properties.placementRules', 'type': '[PlacementKeyValuePairs]'}, + } + + def __init__( + self, + **kwargs + ): + super(VolumeGroupVolumeProperties, self).__init__(**kwargs) + self.id = None + self.name = kwargs.get('name', None) + self.type = None + self.tags = kwargs.get('tags', None) + self.file_system_id = None + self.creation_token = kwargs['creation_token'] + self.service_level = kwargs.get('service_level', "Premium") + self.usage_threshold = kwargs.get('usage_threshold', 107374182400) + self.export_policy = kwargs.get('export_policy', None) + self.protocol_types = kwargs.get('protocol_types', None) + self.provisioning_state = None + self.snapshot_id = kwargs.get('snapshot_id', None) + 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) + self.is_restoring = kwargs.get('is_restoring', None) + self.snapshot_directory_visible = kwargs.get('snapshot_directory_visible', True) + self.kerberos_enabled = kwargs.get('kerberos_enabled', False) + self.security_style = kwargs.get('security_style', "unix") + self.smb_encryption = kwargs.get('smb_encryption', False) + self.smb_continuously_available = kwargs.get('smb_continuously_available', False) + self.throughput_mibps = kwargs.get('throughput_mibps', 0) + self.encryption_key_source = kwargs.get('encryption_key_source', None) + self.ldap_enabled = kwargs.get('ldap_enabled', False) + self.cool_access = kwargs.get('cool_access', False) + self.coolness_period = kwargs.get('coolness_period', None) + self.unix_permissions = kwargs.get('unix_permissions', "0770") + self.clone_progress = None + self.avs_data_store = kwargs.get('avs_data_store', "Disabled") + self.is_default_quota_enabled = kwargs.get('is_default_quota_enabled', False) + self.default_user_quota_in_ki_bs = kwargs.get('default_user_quota_in_ki_bs', 0) + self.default_group_quota_in_ki_bs = kwargs.get('default_group_quota_in_ki_bs', 0) + self.volume_group_name = None + self.capacity_pool_resource_id = kwargs.get('capacity_pool_resource_id', None) + self.proximity_placement_group = kwargs.get('proximity_placement_group', None) + self.t2_network = None + self.volume_spec_name = kwargs.get('volume_spec_name', None) + self.placement_rules = kwargs.get('placement_rules', None) + + class VolumeList(msrest.serialization.Model): """List of volume resources. @@ -2806,7 +3271,8 @@ class VolumePatch(msrest.serialization.Model): :type usage_threshold: long :param export_policy: Set of export policy rules. :type export_policy: ~azure.mgmt.netapp.models.VolumePatchPropertiesExportPolicy - :param throughput_mibps: Maximum throughput in Mibps that can be achieved by this volume. + :param throughput_mibps: Maximum throughput in Mibps that can be achieved by this volume and + this will be accepted as input only for manual qosType volume. :type throughput_mibps: float :param data_protection: DataProtection type volumes include an object containing details of the replication. @@ -2826,7 +3292,6 @@ class VolumePatch(msrest.serialization.Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'usage_threshold': {'maximum': 109951162777600, 'minimum': 107374182400}, - 'throughput_mibps': {'maximum': 4500, 'minimum': 1}, } _attribute_map = { @@ -2858,7 +3323,7 @@ def __init__( self.service_level = kwargs.get('service_level', "Premium") self.usage_threshold = kwargs.get('usage_threshold', 107374182400) self.export_policy = kwargs.get('export_policy', None) - self.throughput_mibps = kwargs.get('throughput_mibps', None) + self.throughput_mibps = kwargs.get('throughput_mibps', 0) self.data_protection = kwargs.get('data_protection', None) self.is_default_quota_enabled = kwargs.get('is_default_quota_enabled', False) self.default_user_quota_in_ki_bs = kwargs.get('default_user_quota_in_ki_bs', 0) 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 d2dddd6fb4ed..3c375cdd0d79 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 @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Any, Dict, List, Optional, Union +from typing import Dict, List, Optional, Union import msrest.serialization @@ -94,6 +94,9 @@ class ActiveDirectory(msrest.serialization.Model): :param allow_local_nfs_users_with_ldap: If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. :type allow_local_nfs_users_with_ldap: bool + :param encrypt_dc_connections: If enabled, Traffic between the SMB server to Domain Controller + (DC) will be encrypted. + :type encrypt_dc_connections: bool """ _validation = { @@ -126,6 +129,7 @@ class ActiveDirectory(msrest.serialization.Model): 'security_operators': {'key': 'securityOperators', 'type': '[str]'}, 'ldap_over_tls': {'key': 'ldapOverTLS', 'type': 'bool'}, 'allow_local_nfs_users_with_ldap': {'key': 'allowLocalNfsUsersWithLdap', 'type': 'bool'}, + 'encrypt_dc_connections': {'key': 'encryptDCConnections', 'type': 'bool'}, } def __init__( @@ -149,6 +153,7 @@ def __init__( security_operators: Optional[List[str]] = None, ldap_over_tls: Optional[bool] = None, allow_local_nfs_users_with_ldap: Optional[bool] = None, + encrypt_dc_connections: Optional[bool] = None, **kwargs ): super(ActiveDirectory, self).__init__(**kwargs) @@ -172,6 +177,7 @@ def __init__( self.security_operators = security_operators self.ldap_over_tls = ldap_over_tls self.allow_local_nfs_users_with_ldap = allow_local_nfs_users_with_ldap + self.encrypt_dc_connections = encrypt_dc_connections class AuthorizeRequest(msrest.serialization.Model): @@ -399,8 +405,6 @@ class BackupPolicy(msrest.serialization.Model): :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :ivar name_properties_name: Name of backup policy. - :vartype name_properties_name: str :ivar backup_policy_id: Backup Policy Resource ID. :vartype backup_policy_id: str :ivar provisioning_state: Azure lifecycle management. @@ -425,7 +429,6 @@ class BackupPolicy(msrest.serialization.Model): 'name': {'readonly': True}, 'etag': {'readonly': True}, 'type': {'readonly': True}, - 'name_properties_name': {'readonly': True}, 'backup_policy_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'volumes_assigned': {'readonly': True}, @@ -439,7 +442,6 @@ class BackupPolicy(msrest.serialization.Model): 'etag': {'key': 'etag', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'backup_policy_id': {'key': 'properties.backupPolicyId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'daily_backups_to_keep': {'key': 'properties.dailyBackupsToKeep', 'type': 'int'}, @@ -468,7 +470,6 @@ def __init__( self.etag = None self.type = None self.tags = tags - self.name_properties_name = None self.backup_policy_id = None self.provisioning_state = None self.daily_backups_to_keep = daily_backups_to_keep @@ -494,8 +495,6 @@ class BackupPolicyDetails(msrest.serialization.Model): :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :ivar name_properties_name: Name of backup policy. - :vartype name_properties_name: str :ivar backup_policy_id: Backup Policy Resource ID. :vartype backup_policy_id: str :ivar provisioning_state: Azure lifecycle management. @@ -518,7 +517,6 @@ class BackupPolicyDetails(msrest.serialization.Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name_properties_name': {'readonly': True}, 'backup_policy_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'volumes_assigned': {'readonly': True}, @@ -531,7 +529,6 @@ class BackupPolicyDetails(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'backup_policy_id': {'key': 'properties.backupPolicyId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'daily_backups_to_keep': {'key': 'properties.dailyBackupsToKeep', 'type': 'int'}, @@ -559,7 +556,6 @@ def __init__( self.name = None self.type = None self.tags = tags - self.name_properties_name = None self.backup_policy_id = None self.provisioning_state = None self.daily_backups_to_keep = daily_backups_to_keep @@ -585,8 +581,6 @@ class BackupPolicyPatch(msrest.serialization.Model): :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :ivar name_properties_name: Name of backup policy. - :vartype name_properties_name: str :ivar backup_policy_id: Backup Policy Resource ID. :vartype backup_policy_id: str :ivar provisioning_state: Azure lifecycle management. @@ -609,7 +603,6 @@ class BackupPolicyPatch(msrest.serialization.Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name_properties_name': {'readonly': True}, 'backup_policy_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'volumes_assigned': {'readonly': True}, @@ -622,7 +615,6 @@ class BackupPolicyPatch(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'backup_policy_id': {'key': 'properties.backupPolicyId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'daily_backups_to_keep': {'key': 'properties.dailyBackupsToKeep', 'type': 'int'}, @@ -650,7 +642,6 @@ def __init__( self.name = None self.type = None self.tags = tags - self.name_properties_name = None self.backup_policy_id = None self.provisioning_state = None self.daily_backups_to_keep = daily_backups_to_keep @@ -1252,9 +1243,9 @@ def __init__( class LogSpecification(msrest.serialization.Model): """Log Definition of a single resource metric. - :param name: + :param name: Name of log specification. :type name: str - :param display_name: + :param display_name: Display name of log specification. :type display_name: str """ @@ -1781,6 +1772,41 @@ def __init__( self.value = value +class PlacementKeyValuePairs(msrest.serialization.Model): + """Application specific parameters for the placement of volumes in the volume group. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. Key for an application specific parameter for the placement of volumes in + the volume group. + :type key: str + :param value: Required. Value for an application specific parameter for the placement of + volumes in the volume group. + :type value: str + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + key: str, + value: str, + **kwargs + ): + super(PlacementKeyValuePairs, self).__init__(**kwargs) + self.key = key + self.value = value + + class PoolChangeRequest(msrest.serialization.Model): """Pool change request. @@ -2148,7 +2174,7 @@ class ServiceSpecification(msrest.serialization.Model): :param metric_specifications: Metric specifications of operation. :type metric_specifications: list[~azure.mgmt.netapp.models.MetricSpecification] - :param log_specifications: + :param log_specifications: Log specification of operation. :type log_specifications: list[~azure.mgmt.netapp.models.LogSpecification] """ @@ -2489,17 +2515,17 @@ class SnapshotPolicyVolumeList(msrest.serialization.Model): """Volumes associated with snapshot policy. :param value: List of volumes. - :type value: list[any] + :type value: list[~azure.mgmt.netapp.models.Volume] """ _attribute_map = { - 'value': {'key': 'value', 'type': '[object]'}, + 'value': {'key': 'value', 'type': '[Volume]'}, } def __init__( self, *, - value: Optional[List[Any]] = None, + value: Optional[List["Volume"]] = None, **kwargs ): super(SnapshotPolicyVolumeList, self).__init__(**kwargs) @@ -2542,8 +2568,6 @@ class SubscriptionQuotaItem(ProxyResource): :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. @@ -2555,7 +2579,6 @@ class SubscriptionQuotaItem(ProxyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'system_data': {'readonly': True}, - 'name_properties_name': {'readonly': True}, 'current': {'readonly': True}, 'default': {'readonly': True}, } @@ -2565,7 +2588,6 @@ class SubscriptionQuotaItem(ProxyResource): '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'}, } @@ -2576,7 +2598,6 @@ def __init__( ): super(SubscriptionQuotaItem, self).__init__(**kwargs) self.system_data = None - self.name_properties_name = None self.current = None self.default = None @@ -2801,7 +2822,8 @@ class Volume(msrest.serialization.Model): :param smb_continuously_available: Enables continuously available share property for smb volume. Only applicable for SMB volume. :type smb_continuously_available: bool - :param throughput_mibps: Maximum throughput in Mibps that can be achieved by this volume. + :param throughput_mibps: Maximum throughput in Mibps that can be achieved by this volume and + this will be accepted as input only for manual qosType volume. :type throughput_mibps: float :param encryption_key_source: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. :type encryption_key_source: str @@ -2835,6 +2857,20 @@ class Volume(msrest.serialization.Model): :param default_group_quota_in_ki_bs: Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. :type default_group_quota_in_ki_bs: long + :ivar volume_group_name: Volume Group Name. + :vartype volume_group_name: str + :param capacity_pool_resource_id: Pool Resource Id used in case of creating a volume through + volume group. + :type capacity_pool_resource_id: str + :param proximity_placement_group: Proximity placement group associated with the volume. + :type proximity_placement_group: str + :ivar t2_network: T2 network information. + :vartype t2_network: str + :param volume_spec_name: Volume spec name is the application specific designation or identifier + for the particular volume in a volume group for e.g. data, log. + :type volume_spec_name: str + :param placement_rules: Application specific placement rules for the particular volume. + :type placement_rules: list[~azure.mgmt.netapp.models.PlacementKeyValuePairs] """ _validation = { @@ -2854,10 +2890,11 @@ class Volume(msrest.serialization.Model): '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}, 'unix_permissions': {'max_length': 4, 'min_length': 4}, 'clone_progress': {'readonly': True}, + 'volume_group_name': {'readonly': True}, + 't2_network': {'readonly': True}, } _attribute_map = { @@ -2901,6 +2938,12 @@ class Volume(msrest.serialization.Model): 'is_default_quota_enabled': {'key': 'properties.isDefaultQuotaEnabled', 'type': 'bool'}, 'default_user_quota_in_ki_bs': {'key': 'properties.defaultUserQuotaInKiBs', 'type': 'long'}, 'default_group_quota_in_ki_bs': {'key': 'properties.defaultGroupQuotaInKiBs', 'type': 'long'}, + 'volume_group_name': {'key': 'properties.volumeGroupName', 'type': 'str'}, + 'capacity_pool_resource_id': {'key': 'properties.capacityPoolResourceId', 'type': 'str'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'str'}, + 't2_network': {'key': 'properties.t2Network', 'type': 'str'}, + 'volume_spec_name': {'key': 'properties.volumeSpecName', 'type': 'str'}, + 'placement_rules': {'key': 'properties.placementRules', 'type': '[PlacementKeyValuePairs]'}, } def __init__( @@ -2935,6 +2978,10 @@ def __init__( is_default_quota_enabled: Optional[bool] = False, default_user_quota_in_ki_bs: Optional[int] = 0, default_group_quota_in_ki_bs: Optional[int] = 0, + capacity_pool_resource_id: Optional[str] = None, + proximity_placement_group: Optional[str] = None, + volume_spec_name: Optional[str] = None, + placement_rules: Optional[List["PlacementKeyValuePairs"]] = None, **kwargs ): super(Volume, self).__init__(**kwargs) @@ -2978,6 +3025,12 @@ def __init__( self.is_default_quota_enabled = is_default_quota_enabled self.default_user_quota_in_ki_bs = default_user_quota_in_ki_bs self.default_group_quota_in_ki_bs = default_group_quota_in_ki_bs + self.volume_group_name = None + self.capacity_pool_resource_id = capacity_pool_resource_id + self.proximity_placement_group = proximity_placement_group + self.t2_network = None + self.volume_spec_name = volume_spec_name + self.placement_rules = placement_rules class VolumeBackupProperties(msrest.serialization.Model): @@ -3047,6 +3100,477 @@ def __init__( self.policy_enabled = policy_enabled +class VolumeGroup(msrest.serialization.Model): + """Volume group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param location: Resource location. + :type location: str + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :param group_meta_data: Volume group details. + :type group_meta_data: ~azure.mgmt.netapp.models.VolumeGroupMetaData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'group_meta_data': {'key': 'properties.groupMetaData', 'type': 'VolumeGroupMetaData'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + group_meta_data: Optional["VolumeGroupMetaData"] = None, + **kwargs + ): + super(VolumeGroup, self).__init__(**kwargs) + self.location = location + self.id = None + self.name = None + self.type = None + self.tags = tags + self.provisioning_state = None + self.group_meta_data = group_meta_data + + +class VolumeGroupDetails(msrest.serialization.Model): + """Volume group resource for create. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param location: Resource location. + :type location: str + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :param group_meta_data: Volume group details. + :type group_meta_data: ~azure.mgmt.netapp.models.VolumeGroupMetaData + :param volumes: List of volumes from group. + :type volumes: list[~azure.mgmt.netapp.models.VolumeGroupVolumeProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'group_meta_data': {'key': 'properties.groupMetaData', 'type': 'VolumeGroupMetaData'}, + 'volumes': {'key': 'properties.volumes', 'type': '[VolumeGroupVolumeProperties]'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + group_meta_data: Optional["VolumeGroupMetaData"] = None, + volumes: Optional[List["VolumeGroupVolumeProperties"]] = None, + **kwargs + ): + super(VolumeGroupDetails, self).__init__(**kwargs) + self.location = location + self.id = None + self.name = None + self.type = None + self.tags = tags + self.provisioning_state = None + self.group_meta_data = group_meta_data + self.volumes = volumes + + +class VolumeGroupList(msrest.serialization.Model): + """List of volume group resources. + + :param value: List of volume Groups. + :type value: list[~azure.mgmt.netapp.models.VolumeGroup] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VolumeGroup]'}, + } + + def __init__( + self, + *, + value: Optional[List["VolumeGroup"]] = None, + **kwargs + ): + super(VolumeGroupList, self).__init__(**kwargs) + self.value = value + + +class VolumeGroupMetaData(msrest.serialization.Model): + """Volume group properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param group_description: Group Description. + :type group_description: str + :param application_type: Application Type. Possible values include: "SAP-HANA". + :type application_type: str or ~azure.mgmt.netapp.models.ApplicationType + :param application_identifier: Application specific identifier. + :type application_identifier: str + :param global_placement_rules: Application specific placement rules for the volume group. + :type global_placement_rules: list[~azure.mgmt.netapp.models.PlacementKeyValuePairs] + :param deployment_spec_id: Application specific identifier of deployment rules for the volume + group. + :type deployment_spec_id: str + :ivar volumes_count: Number of volumes in volume group. + :vartype volumes_count: long + """ + + _validation = { + 'volumes_count': {'readonly': True}, + } + + _attribute_map = { + 'group_description': {'key': 'groupDescription', 'type': 'str'}, + 'application_type': {'key': 'applicationType', 'type': 'str'}, + 'application_identifier': {'key': 'applicationIdentifier', 'type': 'str'}, + 'global_placement_rules': {'key': 'globalPlacementRules', 'type': '[PlacementKeyValuePairs]'}, + 'deployment_spec_id': {'key': 'deploymentSpecId', 'type': 'str'}, + 'volumes_count': {'key': 'volumesCount', 'type': 'long'}, + } + + def __init__( + self, + *, + group_description: Optional[str] = None, + application_type: Optional[Union[str, "ApplicationType"]] = None, + application_identifier: Optional[str] = None, + global_placement_rules: Optional[List["PlacementKeyValuePairs"]] = None, + deployment_spec_id: Optional[str] = None, + **kwargs + ): + super(VolumeGroupMetaData, self).__init__(**kwargs) + self.group_description = group_description + self.application_type = application_type + self.application_identifier = application_identifier + self.global_placement_rules = global_placement_rules + self.deployment_spec_id = deployment_spec_id + self.volumes_count = None + + +class VolumeGroupVolumeProperties(msrest.serialization.Model): + """Volume resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :param name: Resource name. + :type name: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar file_system_id: Unique FileSystem Identifier. + :vartype file_system_id: str + :param creation_token: Required. A unique file path for the volume. Used when creating mount + targets. + :type creation_token: str + :param service_level: The service level of the file system. Possible values include: + "Standard", "Premium", "Ultra", "StandardZRS". Default value: "Premium". + :type service_level: str or ~azure.mgmt.netapp.models.ServiceLevel + :param usage_threshold: Required. Maximum storage quota allowed for a file system in bytes. + This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. + Specified in bytes. + :type usage_threshold: long + :param export_policy: Set of export policy rules. + :type export_policy: ~azure.mgmt.netapp.models.VolumePropertiesExportPolicy + :param protocol_types: Set of protocol types, default NFSv3, CIFS for SMB protocol. + :type protocol_types: list[str] + :ivar provisioning_state: Azure lifecycle management. + :vartype provisioning_state: str + :param snapshot_id: UUID v4 or resource identifier used to identify the Snapshot. + :type snapshot_id: str + :param backup_id: UUID v4 or resource identifier used to identify the Backup. + :type backup_id: str + :ivar baremetal_tenant_id: Unique Baremetal Tenant Identifier. + :vartype baremetal_tenant_id: str + :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. 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. + :type data_protection: ~azure.mgmt.netapp.models.VolumePropertiesDataProtection + :param is_restoring: Restoring. + :type is_restoring: bool + :param snapshot_directory_visible: If enabled (true) the volume will contain a read-only + snapshot directory which provides access to each of the volume's snapshots (default to true). + :type snapshot_directory_visible: bool + :param kerberos_enabled: Describe if a volume is KerberosEnabled. To be use with swagger + version 2020-05-01 or later. + :type kerberos_enabled: bool + :param security_style: The security style of volume, default unix, defaults to ntfs for dual + protocol or CIFS protocol. Possible values include: "ntfs", "unix". Default value: "unix". + :type security_style: str or ~azure.mgmt.netapp.models.SecurityStyle + :param smb_encryption: Enables encryption for in-flight smb3 data. Only applicable for + SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. + :type smb_encryption: bool + :param smb_continuously_available: Enables continuously available share property for smb + volume. Only applicable for SMB volume. + :type smb_continuously_available: bool + :param throughput_mibps: Maximum throughput in Mibps that can be achieved by this volume and + this will be accepted as input only for manual qosType volume. + :type throughput_mibps: float + :param encryption_key_source: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + :type encryption_key_source: str + :param ldap_enabled: Specifies whether LDAP is enabled or not for a given NFS volume. + :type ldap_enabled: bool + :param cool_access: Specifies whether Cool Access(tiering) is enabled for the volume. + :type cool_access: bool + :param coolness_period: Specifies the number of days after which data that is not accessed by + clients will be tiered. + :type coolness_period: int + :param unix_permissions: UNIX permissions for NFS volume accepted in octal 4 digit format. + First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second + digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third + selects permissions for other users in the same group. the fourth for other users not in the + group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other + users. + :type unix_permissions: str + :ivar clone_progress: When a volume is being restored from another volume's snapshot, will show + the percentage completion of this cloning process. When this value is empty/null there is no + cloning process currently happening on this volume. This value will update every 5 minutes + during cloning. + :vartype clone_progress: int + :param avs_data_store: Specifies whether the volume is enabled for Azure VMware Solution (AVS) + datastore purpose. Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :type avs_data_store: str or ~azure.mgmt.netapp.models.AvsDataStore + :param is_default_quota_enabled: Specifies if default quota is enabled for the volume. + :type is_default_quota_enabled: bool + :param default_user_quota_in_ki_bs: Default user quota for volume in KiBs. If + isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + :type default_user_quota_in_ki_bs: long + :param default_group_quota_in_ki_bs: Default group quota for volume in KiBs. If + isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + :type default_group_quota_in_ki_bs: long + :ivar volume_group_name: Volume Group Name. + :vartype volume_group_name: str + :param capacity_pool_resource_id: Pool Resource Id used in case of creating a volume through + volume group. + :type capacity_pool_resource_id: str + :param proximity_placement_group: Proximity placement group associated with the volume. + :type proximity_placement_group: str + :ivar t2_network: T2 network information. + :vartype t2_network: str + :param volume_spec_name: Volume spec name is the application specific designation or identifier + for the particular volume in a volume group for e.g. data, log. + :type volume_spec_name: str + :param placement_rules: Application specific placement rules for the particular volume. + :type placement_rules: list[~azure.mgmt.netapp.models.PlacementKeyValuePairs] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'file_system_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}$'}, + 'creation_token': {'required': True, 'max_length': 80, 'min_length': 1, 'pattern': r'^[a-zA-Z][a-zA-Z0-9\-]{0,79}$'}, + '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}|(\\?([^\/]*[\/])*)([^\/]+)$'}, + '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}, + 'coolness_period': {'maximum': 63, 'minimum': 7}, + 'unix_permissions': {'max_length': 4, 'min_length': 4}, + 'clone_progress': {'readonly': True}, + 'volume_group_name': {'readonly': True}, + 't2_network': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'file_system_id': {'key': 'properties.fileSystemId', 'type': 'str'}, + 'creation_token': {'key': 'properties.creationToken', 'type': 'str'}, + 'service_level': {'key': 'properties.serviceLevel', 'type': 'str'}, + 'usage_threshold': {'key': 'properties.usageThreshold', 'type': 'long'}, + 'export_policy': {'key': 'properties.exportPolicy', 'type': 'VolumePropertiesExportPolicy'}, + 'protocol_types': {'key': 'properties.protocolTypes', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'snapshot_id': {'key': 'properties.snapshotId', 'type': 'str'}, + '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'}, + 'is_restoring': {'key': 'properties.isRestoring', 'type': 'bool'}, + 'snapshot_directory_visible': {'key': 'properties.snapshotDirectoryVisible', 'type': 'bool'}, + 'kerberos_enabled': {'key': 'properties.kerberosEnabled', 'type': 'bool'}, + 'security_style': {'key': 'properties.securityStyle', 'type': 'str'}, + 'smb_encryption': {'key': 'properties.smbEncryption', 'type': 'bool'}, + 'smb_continuously_available': {'key': 'properties.smbContinuouslyAvailable', 'type': 'bool'}, + 'throughput_mibps': {'key': 'properties.throughputMibps', 'type': 'float'}, + 'encryption_key_source': {'key': 'properties.encryptionKeySource', 'type': 'str'}, + 'ldap_enabled': {'key': 'properties.ldapEnabled', 'type': 'bool'}, + 'cool_access': {'key': 'properties.coolAccess', 'type': 'bool'}, + 'coolness_period': {'key': 'properties.coolnessPeriod', 'type': 'int'}, + 'unix_permissions': {'key': 'properties.unixPermissions', 'type': 'str'}, + 'clone_progress': {'key': 'properties.cloneProgress', 'type': 'int'}, + 'avs_data_store': {'key': 'properties.avsDataStore', 'type': 'str'}, + 'is_default_quota_enabled': {'key': 'properties.isDefaultQuotaEnabled', 'type': 'bool'}, + 'default_user_quota_in_ki_bs': {'key': 'properties.defaultUserQuotaInKiBs', 'type': 'long'}, + 'default_group_quota_in_ki_bs': {'key': 'properties.defaultGroupQuotaInKiBs', 'type': 'long'}, + 'volume_group_name': {'key': 'properties.volumeGroupName', 'type': 'str'}, + 'capacity_pool_resource_id': {'key': 'properties.capacityPoolResourceId', 'type': 'str'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'str'}, + 't2_network': {'key': 'properties.t2Network', 'type': 'str'}, + 'volume_spec_name': {'key': 'properties.volumeSpecName', 'type': 'str'}, + 'placement_rules': {'key': 'properties.placementRules', 'type': '[PlacementKeyValuePairs]'}, + } + + def __init__( + self, + *, + creation_token: str, + usage_threshold: int = 107374182400, + subnet_id: str, + name: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + service_level: Optional[Union[str, "ServiceLevel"]] = "Premium", + export_policy: Optional["VolumePropertiesExportPolicy"] = None, + 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, + snapshot_directory_visible: Optional[bool] = True, + kerberos_enabled: Optional[bool] = False, + security_style: Optional[Union[str, "SecurityStyle"]] = "unix", + smb_encryption: Optional[bool] = False, + smb_continuously_available: Optional[bool] = False, + throughput_mibps: Optional[float] = 0, + encryption_key_source: Optional[str] = None, + ldap_enabled: Optional[bool] = False, + cool_access: Optional[bool] = False, + coolness_period: Optional[int] = None, + unix_permissions: Optional[str] = "0770", + avs_data_store: Optional[Union[str, "AvsDataStore"]] = "Disabled", + is_default_quota_enabled: Optional[bool] = False, + default_user_quota_in_ki_bs: Optional[int] = 0, + default_group_quota_in_ki_bs: Optional[int] = 0, + capacity_pool_resource_id: Optional[str] = None, + proximity_placement_group: Optional[str] = None, + volume_spec_name: Optional[str] = None, + placement_rules: Optional[List["PlacementKeyValuePairs"]] = None, + **kwargs + ): + super(VolumeGroupVolumeProperties, self).__init__(**kwargs) + self.id = None + self.name = name + self.type = None + self.tags = tags + self.file_system_id = None + self.creation_token = creation_token + self.service_level = service_level + self.usage_threshold = usage_threshold + self.export_policy = export_policy + self.protocol_types = protocol_types + self.provisioning_state = None + self.snapshot_id = snapshot_id + 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 + self.is_restoring = is_restoring + self.snapshot_directory_visible = snapshot_directory_visible + self.kerberos_enabled = kerberos_enabled + self.security_style = security_style + self.smb_encryption = smb_encryption + self.smb_continuously_available = smb_continuously_available + self.throughput_mibps = throughput_mibps + self.encryption_key_source = encryption_key_source + self.ldap_enabled = ldap_enabled + self.cool_access = cool_access + self.coolness_period = coolness_period + self.unix_permissions = unix_permissions + self.clone_progress = None + self.avs_data_store = avs_data_store + self.is_default_quota_enabled = is_default_quota_enabled + self.default_user_quota_in_ki_bs = default_user_quota_in_ki_bs + self.default_group_quota_in_ki_bs = default_group_quota_in_ki_bs + self.volume_group_name = None + self.capacity_pool_resource_id = capacity_pool_resource_id + self.proximity_placement_group = proximity_placement_group + self.t2_network = None + self.volume_spec_name = volume_spec_name + self.placement_rules = placement_rules + + class VolumeList(msrest.serialization.Model): """List of volume resources. @@ -3097,7 +3621,8 @@ class VolumePatch(msrest.serialization.Model): :type usage_threshold: long :param export_policy: Set of export policy rules. :type export_policy: ~azure.mgmt.netapp.models.VolumePatchPropertiesExportPolicy - :param throughput_mibps: Maximum throughput in Mibps that can be achieved by this volume. + :param throughput_mibps: Maximum throughput in Mibps that can be achieved by this volume and + this will be accepted as input only for manual qosType volume. :type throughput_mibps: float :param data_protection: DataProtection type volumes include an object containing details of the replication. @@ -3117,7 +3642,6 @@ class VolumePatch(msrest.serialization.Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'usage_threshold': {'maximum': 109951162777600, 'minimum': 107374182400}, - 'throughput_mibps': {'maximum': 4500, 'minimum': 1}, } _attribute_map = { @@ -3144,7 +3668,7 @@ def __init__( service_level: Optional[Union[str, "ServiceLevel"]] = "Premium", usage_threshold: Optional[int] = 107374182400, export_policy: Optional["VolumePatchPropertiesExportPolicy"] = None, - throughput_mibps: Optional[float] = None, + throughput_mibps: Optional[float] = 0, data_protection: Optional["VolumePatchPropertiesDataProtection"] = None, is_default_quota_enabled: Optional[bool] = False, default_user_quota_in_ki_bs: Optional[int] = 0, 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 436c8e4cee7b..e2619e15da61 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 @@ -41,6 +41,12 @@ class ActiveDirectoryStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) #: Active Directory Updating. UPDATING = "Updating" +class ApplicationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Application Type + """ + + SAP_HANA = "SAP-HANA" + class AvsDataStore(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose """ 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 77e29c38a55f..ce5a3a9ff24f 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 @@ -18,6 +18,7 @@ from ._account_backups_operations import AccountBackupsOperations from ._backup_policies_operations import BackupPoliciesOperations from ._vaults_operations import VaultsOperations +from ._volume_groups_operations import VolumeGroupsOperations __all__ = [ 'Operations', @@ -32,4 +33,5 @@ 'AccountBackupsOperations', 'BackupPoliciesOperations', 'VaultsOperations', + 'VolumeGroupsOperations', ] diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_account_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_account_backups_operations.py index 070ab64a25e5..20b984806fbb 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_account_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_account_backups_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -152,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -202,7 +202,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore 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 fda9037863bf..2f8444ba69b9 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 @@ -66,7 +66,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -138,7 +138,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -214,7 +214,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -263,7 +263,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -394,7 +394,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -505,7 +505,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py index b7c2cdcf7074..1267678187be 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -152,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -343,7 +343,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -481,7 +481,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py index 4b8f3d252e68..8fe754fda75e 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py @@ -78,7 +78,7 @@ def get_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -147,7 +147,7 @@ def get_volume_restore_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -216,7 +216,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -304,7 +304,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -359,7 +359,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -513,7 +513,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -668,7 +668,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py index dcd7f2813e1a..21c52bf23fda 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py @@ -77,7 +77,7 @@ def check_name_availability( error_map.update(kwargs.pop('error_map', {})) _body = _models.ResourceNameAvailabilityRequest(name=name, type=type, resource_group=resource_group) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -148,7 +148,7 @@ def check_file_path_availability( error_map.update(kwargs.pop('error_map', {})) _body = _models.FilePathAvailabilityRequest(name=name, subnet_id=subnet_id) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -221,7 +221,7 @@ def check_quota_availability( error_map.update(kwargs.pop('error_map', {})) _body = _models.QuotaAvailabilityRequest(name=name, type=type, resource_group=resource_group) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" 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 index 0c28d9e614a8..731b1f5daade 100644 --- 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 @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -143,7 +143,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL 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 674a64b945c4..f63dd240205e 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 @@ -64,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): 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 d9d72902ce16..8b59b943c598 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 @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -152,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -342,7 +342,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -478,7 +478,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py index aa8bd1265c48..067f3ef5765e 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -148,7 +148,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -214,7 +214,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -274,7 +274,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -410,7 +410,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -540,7 +540,7 @@ def list_volumes( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL 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 8b3e2a853793..49fc57d3c9e1 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 @@ -78,7 +78,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -166,7 +166,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -221,7 +221,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -372,7 +372,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -522,7 +522,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_vaults_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_vaults_operations.py index a67942ccd520..a045aec96582 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_vaults_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_vaults_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py new file mode 100644 index 000000000000..859c45630fab --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py @@ -0,0 +1,442 @@ +# 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.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VolumeGroupsOperations(object): + """VolumeGroupsOperations 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_by_net_app_account( + self, + resource_group_name, # type: str + account_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.VolumeGroupList"] + """Describe all volume groups. + + List all volume groups for given account. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param account_name: The name of the NetApp account. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VolumeGroupList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.VolumeGroupList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VolumeGroupList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-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_by_net_app_account.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_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') + + 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('VolumeGroupList', 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_by_net_app_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups'} # type: ignore + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + volume_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VolumeGroupDetails" + """Describe a Volume Group. + + Get details of the specified volume group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param account_name: The name of the NetApp account. + :type account_name: str + :param volume_group_name: The name of the volumeGroup. + :type volume_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VolumeGroupDetails, or the result of cls(response) + :rtype: ~azure.mgmt.netapp.models.VolumeGroupDetails + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VolumeGroupDetails"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'volumeGroupName': self._serialize.url("volume_group_name", volume_group_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'), + } + 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('VolumeGroupDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}'} # type: ignore + + def _create_initial( + self, + resource_group_name, # type: str + account_name, # type: str + volume_group_name, # type: str + body, # type: "_models.VolumeGroupDetails" + **kwargs # type: Any + ): + # type: (...) -> "_models.VolumeGroupDetails" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VolumeGroupDetails"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'volumeGroupName': self._serialize.url("volume_group_name", volume_group_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'), + } + 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['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'VolumeGroupDetails') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VolumeGroupDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + account_name, # type: str + volume_group_name, # type: str + body, # type: "_models.VolumeGroupDetails" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VolumeGroupDetails"] + """Create the specified volume group and volumes. Creating volume group will create all the volumes specified in request body implicitly. Once volumes are created using volume group, those will be treated as regular volumes thereafter. + + Create a volume group along with specified volumes. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param account_name: The name of the NetApp account. + :type account_name: str + :param volume_group_name: The name of the volumeGroup. + :type volume_group_name: str + :param body: Volume Group object supplied in the body of the operation. + :type body: ~azure.mgmt.netapp.models.VolumeGroupDetails + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VolumeGroupDetails or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VolumeGroupDetails"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + account_name=account_name, + volume_group_name=volume_group_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VolumeGroupDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'volumeGroupName': self._serialize.url("volume_group_name", volume_group_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + account_name, # type: str + volume_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'volumeGroupName': self._serialize.url("volume_group_name", volume_group_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'), + } + 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] + + request = self._client.delete(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, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + account_name, # type: str + volume_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete a volume group. + + Delete the specified volume group only if there are no volumes under volume group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param account_name: The name of the NetApp account. + :type account_name: str + :param volume_group_name: The name of the volumeGroup. + :type volume_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + volume_group_name=volume_group_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'volumeGroupName': self._serialize.url("volume_group_name", volume_group_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}'} # type: ignore 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 60561b5fb6eb..9ed9c6e79c17 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 @@ -75,7 +75,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -159,7 +159,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -212,7 +212,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -359,7 +359,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -502,7 +502,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -627,7 +627,7 @@ def _revert_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -761,7 +761,7 @@ def _break_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -914,7 +914,7 @@ def replication_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -966,7 +966,7 @@ def _resync_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._resync_replication_initial.metadata['url'] # type: ignore @@ -1091,7 +1091,7 @@ def _delete_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._delete_replication_initial.metadata['url'] # type: ignore @@ -1217,7 +1217,7 @@ def _authorize_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -1350,7 +1350,7 @@ def _re_initialize_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self._re_initialize_replication_initial.metadata['url'] # type: ignore @@ -1475,7 +1475,7 @@ def _pool_change_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL