From b5ea30ba7714d4ed6c389527915e4de0dce52782 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 18 May 2021 12:35:06 +0000 Subject: [PATCH] CodeGen from PR 14365 in Azure/azure-rest-api-specs Merge 0ceaffba972ebba0153a6c052f4336d9c918d0ba into 19e140f6f848bf9616735a7bd360edeef25c6c8d --- sdk/netapp/azure-mgmt-netapp/MANIFEST.in | 1 + sdk/netapp/azure-mgmt-netapp/_meta.json | 8 + .../azure/mgmt/netapp/_configuration.py | 2 +- .../azure/mgmt/netapp/_metadata.json | 70 ++++- .../mgmt/netapp/_net_app_management_client.py | 38 ++- .../azure/mgmt/netapp/_version.py | 2 +- .../azure/mgmt/netapp/aio/_configuration.py | 2 +- .../netapp/aio/_net_app_management_client.py | 37 ++- .../mgmt/netapp/aio/operations/__init__.py | 8 +- .../operations/_account_backups_operations.py | 93 +++--- .../aio/operations/_accounts_operations.py | 22 +- .../operations/_backup_policies_operations.py | 119 ++++++-- .../aio/operations/_backups_operations.py | 92 +++++- .../_net_app_resource_operations.py | 74 ++++- .../mgmt/netapp/aio/operations/_operations.py | 2 +- .../aio/operations/_pools_operations.py | 22 +- .../_snapshot_policies_operations.py | 20 +- .../aio/operations/_snapshots_operations.py | 30 +- .../aio/operations/_vaults_operations.py | 2 +- ...y => _volume_restore_status_operations.py} | 22 +- .../aio/operations/_volumes_operations.py | 66 ++--- .../azure/mgmt/netapp/models/__init__.py | 16 ++ .../azure/mgmt/netapp/models/_models.py | 239 +++++++++++++++- .../azure/mgmt/netapp/models/_models_py3.py | 265 +++++++++++++++++- .../_net_app_management_client_enums.py | 48 +++- .../azure/mgmt/netapp/operations/__init__.py | 8 +- .../operations/_account_backups_operations.py | 91 +++--- .../netapp/operations/_accounts_operations.py | 22 +- .../operations/_backup_policies_operations.py | 120 ++++++-- .../netapp/operations/_backups_operations.py | 93 +++++- .../_net_app_resource_operations.py | 75 ++++- .../mgmt/netapp/operations/_operations.py | 2 +- .../netapp/operations/_pools_operations.py | 22 +- .../_snapshot_policies_operations.py | 20 +- .../operations/_snapshots_operations.py | 30 +- .../netapp/operations/_vaults_operations.py | 2 +- ...y => _volume_restore_status_operations.py} | 22 +- .../netapp/operations/_volumes_operations.py | 66 ++--- 38 files changed, 1436 insertions(+), 437 deletions(-) create mode 100644 sdk/netapp/azure-mgmt-netapp/_meta.json rename sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/{_volume_backup_status_operations.py => _volume_restore_status_operations.py} (90%) rename sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/{_volume_backup_status_operations.py => _volume_restore_status_operations.py} (90%) diff --git a/sdk/netapp/azure-mgmt-netapp/MANIFEST.in b/sdk/netapp/azure-mgmt-netapp/MANIFEST.in index a3cb07df87658..3a9b6517412bc 100644 --- a/sdk/netapp/azure-mgmt-netapp/MANIFEST.in +++ b/sdk/netapp/azure-mgmt-netapp/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/netapp/azure-mgmt-netapp/_meta.json b/sdk/netapp/azure-mgmt-netapp/_meta.json new file mode 100644 index 0000000000000..87c4c40dda3b5 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "3.4.2", + "use": "@autorest/python@5.6.6", + "commit": "39e235e88ce40f63f77a6038dd2191cff8798e5d", + "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.6.6 --version=3.4.2", + "readme": "specification/netapp/resource-manager/readme.md" +} \ No newline at end of file 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 b8eb1d97fde73..01a813d3e8251 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 = "2020-12-01" + self.api_version = "2021-04-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 0185d639fa8c5..635e8787cb89c 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": "2020-12-01", - "total_api_version_list": ["2020-12-01"], + "chosen_version": "2021-04-01", + "total_api_version_list": ["2021-04-01"], "client": { "name": "NetAppManagementClient", "filename": "_net_app_management_client", @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": true + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetAppManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetAppManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", "docstring_type": "str", "required": true @@ -42,14 +44,58 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "operations": "Operations", @@ -59,14 +105,10 @@ "volumes": "VolumesOperations", "snapshots": "SnapshotsOperations", "snapshot_policies": "SnapshotPoliciesOperations", - "volume_backup_status": "VolumeBackupStatusOperations", - "account_backups": "AccountBackupsOperations", "backups": "BackupsOperations", + "volume_restore_status": "VolumeRestoreStatusOperations", + "account_backups": "AccountBackupsOperations", "backup_policies": "BackupPoliciesOperations", "vaults": "VaultsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ 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 90193bd4fca0c..739f140da195f 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 @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import NetAppManagementClientConfiguration from .operations import Operations @@ -25,9 +26,9 @@ from .operations import VolumesOperations from .operations import SnapshotsOperations from .operations import SnapshotPoliciesOperations -from .operations import VolumeBackupStatusOperations -from .operations import AccountBackupsOperations from .operations import BackupsOperations +from .operations import VolumeRestoreStatusOperations +from .operations import AccountBackupsOperations from .operations import BackupPoliciesOperations from .operations import VaultsOperations from . import models @@ -50,12 +51,12 @@ class NetAppManagementClient(object): :vartype snapshots: azure.mgmt.netapp.operations.SnapshotsOperations :ivar snapshot_policies: SnapshotPoliciesOperations operations :vartype snapshot_policies: azure.mgmt.netapp.operations.SnapshotPoliciesOperations - :ivar volume_backup_status: VolumeBackupStatusOperations operations - :vartype volume_backup_status: azure.mgmt.netapp.operations.VolumeBackupStatusOperations - :ivar account_backups: AccountBackupsOperations operations - :vartype account_backups: azure.mgmt.netapp.operations.AccountBackupsOperations :ivar backups: BackupsOperations operations :vartype backups: azure.mgmt.netapp.operations.BackupsOperations + :ivar volume_restore_status: VolumeRestoreStatusOperations operations + :vartype volume_restore_status: azure.mgmt.netapp.operations.VolumeRestoreStatusOperations + :ivar account_backups: AccountBackupsOperations operations + :vartype account_backups: azure.mgmt.netapp.operations.AccountBackupsOperations :ivar backup_policies: BackupPoliciesOperations operations :vartype backup_policies: azure.mgmt.netapp.operations.BackupPoliciesOperations :ivar vaults: VaultsOperations operations @@ -83,6 +84,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.operations = Operations( @@ -99,17 +101,35 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.snapshot_policies = SnapshotPoliciesOperations( self._client, self._config, self._serialize, self._deserialize) - self.volume_backup_status = VolumeBackupStatusOperations( + self.backups = BackupsOperations( self._client, self._config, self._serialize, self._deserialize) - self.account_backups = AccountBackupsOperations( + self.volume_restore_status = VolumeRestoreStatusOperations( self._client, self._config, self._serialize, self._deserialize) - self.backups = BackupsOperations( + self.account_backups = AccountBackupsOperations( self._client, self._config, self._serialize, self._deserialize) self.backup_policies = BackupPoliciesOperations( self._client, self._config, self._serialize, self._deserialize) self.vaults = VaultsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() 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 48944bf3938a2..c47f66669f1bf 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 = "2.0.0" +VERSION = "1.0.0" 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 81f90e6a86e76..5f59e1ab6bd7c 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 = "2020-12-01" + self.api_version = "2021-04-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 a8ee416a22888..feb735e3ac1bb 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 @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -23,9 +24,9 @@ from .operations import VolumesOperations from .operations import SnapshotsOperations from .operations import SnapshotPoliciesOperations -from .operations import VolumeBackupStatusOperations -from .operations import AccountBackupsOperations from .operations import BackupsOperations +from .operations import VolumeRestoreStatusOperations +from .operations import AccountBackupsOperations from .operations import BackupPoliciesOperations from .operations import VaultsOperations from .. import models @@ -48,12 +49,12 @@ class NetAppManagementClient(object): :vartype snapshots: azure.mgmt.netapp.aio.operations.SnapshotsOperations :ivar snapshot_policies: SnapshotPoliciesOperations operations :vartype snapshot_policies: azure.mgmt.netapp.aio.operations.SnapshotPoliciesOperations - :ivar volume_backup_status: VolumeBackupStatusOperations operations - :vartype volume_backup_status: azure.mgmt.netapp.aio.operations.VolumeBackupStatusOperations - :ivar account_backups: AccountBackupsOperations operations - :vartype account_backups: azure.mgmt.netapp.aio.operations.AccountBackupsOperations :ivar backups: BackupsOperations operations :vartype backups: azure.mgmt.netapp.aio.operations.BackupsOperations + :ivar volume_restore_status: VolumeRestoreStatusOperations operations + :vartype volume_restore_status: azure.mgmt.netapp.aio.operations.VolumeRestoreStatusOperations + :ivar account_backups: AccountBackupsOperations operations + :vartype account_backups: azure.mgmt.netapp.aio.operations.AccountBackupsOperations :ivar backup_policies: BackupPoliciesOperations operations :vartype backup_policies: azure.mgmt.netapp.aio.operations.BackupPoliciesOperations :ivar vaults: VaultsOperations operations @@ -80,6 +81,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.operations = Operations( @@ -96,17 +98,34 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.snapshot_policies = SnapshotPoliciesOperations( self._client, self._config, self._serialize, self._deserialize) - self.volume_backup_status = VolumeBackupStatusOperations( + self.backups = BackupsOperations( self._client, self._config, self._serialize, self._deserialize) - self.account_backups = AccountBackupsOperations( + self.volume_restore_status = VolumeRestoreStatusOperations( self._client, self._config, self._serialize, self._deserialize) - self.backups = BackupsOperations( + self.account_backups = AccountBackupsOperations( self._client, self._config, self._serialize, self._deserialize) self.backup_policies = BackupPoliciesOperations( self._client, self._config, self._serialize, self._deserialize) self.vaults = VaultsOperations( 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. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() 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 90d13bae02519..4295d8f62ad84 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 @@ -13,9 +13,9 @@ from ._volumes_operations import VolumesOperations from ._snapshots_operations import SnapshotsOperations from ._snapshot_policies_operations import SnapshotPoliciesOperations -from ._volume_backup_status_operations import VolumeBackupStatusOperations -from ._account_backups_operations import AccountBackupsOperations from ._backups_operations import BackupsOperations +from ._volume_restore_status_operations import VolumeRestoreStatusOperations +from ._account_backups_operations import AccountBackupsOperations from ._backup_policies_operations import BackupPoliciesOperations from ._vaults_operations import VaultsOperations @@ -27,9 +27,9 @@ 'VolumesOperations', 'SnapshotsOperations', 'SnapshotPoliciesOperations', - 'VolumeBackupStatusOperations', - 'AccountBackupsOperations', 'BackupsOperations', + 'VolumeRestoreStatusOperations', + 'AccountBackupsOperations', 'BackupPoliciesOperations', 'VaultsOperations', ] 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 b37f59b8a0394..f943b1fc00244 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 @@ -5,9 +5,10 @@ # 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, Callable, Dict, Generic, Optional, TypeVar, Union +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 @@ -42,12 +43,12 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def list( + def list( self, resource_group_name: str, account_name: str, **kwargs - ) -> "_models.BackupsList": + ) -> AsyncIterable["_models.BackupsList"]: """List Backups for a Netapp Account. List all Backups for a Netapp Account. @@ -57,8 +58,8 @@ async def list( :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: BackupsList, or the result of cls(response) - :rtype: ~azure.mgmt.netapp.models.BackupsList + :return: An iterator like instance of either BackupsList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.BackupsList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupsList"] @@ -66,40 +67,56 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - '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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + '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('BackupsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) - 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 + async def get_next(next_link=None): + request = prepare_request(next_link) - 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) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - deserialized = self._deserialize('BackupsList', pipeline_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) - if cls: - return cls(pipeline_response, deserialized, {}) + return pipeline_response - return deserialized + return AsyncItemPaged( + get_next, extract_data + ) list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups'} # type: ignore async def get( @@ -111,7 +128,7 @@ async def get( ) -> "_models.Backup": """Get Backup for a Netapp Account. - Get Backup for a Netapp Account. + Gets the specified backup for a Netapp Account. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -129,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL @@ -178,7 +195,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -219,7 +236,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Delete Backup for a Netapp Account. - Delete Backup for a Netapp Account. + Delete the specified Backup for a Netapp Account. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -229,8 +246,8 @@ async def begin_delete( :type backup_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) 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 f52a1072fc440..0388e06d6e3f2 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 @@ -64,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -139,7 +139,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL @@ -187,7 +187,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -251,8 +251,8 @@ async def begin_create_or_update( :type body: ~azure.mgmt.netapp.models.NetAppAccount :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 NetAppAccount or the result of cls(response) @@ -316,7 +316,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -363,8 +363,8 @@ async def begin_delete( :type account_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) @@ -425,7 +425,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -489,8 +489,8 @@ async def begin_update( :type body: ~azure.mgmt.netapp.models.NetAppAccountPatch :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 NetAppAccount or the result of cls(response) 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 abf62c68f2312..235712af2188e 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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -265,8 +265,8 @@ async def begin_create( :type body: ~azure.mgmt.netapp.models.BackupPolicy :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 BackupPolicy or the result of cls(response) @@ -321,7 +321,7 @@ def get_long_running_output(pipeline_response): 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}/backupPolicies/{backupPolicyName}'} # type: ignore - async def update( + async def _update_initial( self, resource_group_name: str, account_name: str, @@ -329,34 +329,17 @@ async def update( body: "_models.BackupPolicyPatch", **kwargs ) -> "_models.BackupPolicy": - """Patch a backup policy. - - Patch a backup policy for Netapp 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 - :param backup_policy_name: Backup policy Name which uniquely identify backup policy. - :type backup_policy_name: str - :param body: Backup policy object supplied in the body of the operation. - :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.netapp.models.BackupPolicy - :raises: ~azure.core.exceptions.HttpResponseError - """ cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self._update_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\._\(\)]+$'), @@ -395,7 +378,85 @@ async def update( return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}'} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + account_name: str, + backup_policy_name: str, + body: "_models.BackupPolicyPatch", + **kwargs + ) -> AsyncLROPoller["_models.BackupPolicy"]: + """Patch a backup policy. + + Patch a backup policy for Netapp 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 + :param backup_policy_name: Backup policy Name which uniquely identify backup policy. + :type backup_policy_name: str + :param body: Backup policy object supplied in the body of the operation. + :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch + :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: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 BackupPolicy or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupPolicy"] + 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._update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + backup_policy_name=backup_policy_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('BackupPolicy', 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'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, 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_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}'} # type: ignore async def _delete_initial( self, @@ -409,7 +470,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -460,8 +521,8 @@ async def begin_delete( :type backup_policy_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) 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 532b43b7a947f..25ca020fb8a19 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 @@ -43,6 +43,74 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + async def get_status( + self, + resource_group_name: str, + account_name: str, + pool_name: str, + volume_name: str, + **kwargs + ) -> "_models.BackupStatus": + """Get volume's backup status. + + Get the status of the backup for a volume. + + :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 pool_name: The name of the capacity pool. + :type pool_name: str + :param volume_name: The name of the volume. + :type volume_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupStatus, or the result of cls(response) + :rtype: ~azure.mgmt.netapp.models.BackupStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get_status.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'), + 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'), + 'volumeName': self._serialize.url("volume_name", volume_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z][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('BackupStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus'} # type: ignore + def list( self, resource_group_name: str, @@ -73,7 +141,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -138,7 +206,7 @@ async def get( ) -> "_models.Backup": """Get a backup. - Get a particular backup of the volume. + Gets the specified backup of the volume. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -160,7 +228,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL @@ -214,7 +282,7 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -291,8 +359,8 @@ async def begin_create( :type body: ~azure.mgmt.netapp.models.Backup :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 Backup or the result of cls(response) @@ -366,7 +434,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -445,8 +513,8 @@ async def begin_update( :type body: ~azure.mgmt.netapp.models.BackupPatch :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 Backup or the result of cls(response) @@ -519,7 +587,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -578,8 +646,8 @@ async def begin_delete( :type backup_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) 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 4200d2e74afbf..7b5a4cb5756bf 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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -116,8 +116,7 @@ async def check_file_path_availability( self, location: str, name: str, - type: Union[str, "_models.CheckNameResourceTypes"], - resource_group: str, + subnet_id: str, **kwargs ) -> "_models.CheckAvailabilityResponse": """Check file path availability. @@ -126,12 +125,11 @@ async def check_file_path_availability( :param location: The location. :type location: str - :param name: Resource name to verify. + :param name: File path to verify. :type name: str - :param type: Resource type used for verification. - :type type: str or ~azure.mgmt.netapp.models.CheckNameResourceTypes - :param resource_group: Resource group name. - :type resource_group: str + :param subnet_id: The Azure Resource URI for a delegated subnet. Must have the delegation + Microsoft.NetApp/volumes. + :type subnet_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckAvailabilityResponse, or the result of cls(response) :rtype: ~azure.mgmt.netapp.models.CheckAvailabilityResponse @@ -143,8 +141,8 @@ async def check_file_path_availability( } error_map.update(kwargs.pop('error_map', {})) - _body = _models.ResourceNameAvailabilityRequest(name=name, type=type, resource_group=resource_group) - api_version = "2020-12-01" + _body = _models.FilePathAvailabilityRequest(name=name, subnet_id=subnet_id) + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -166,7 +164,7 @@ async def check_file_path_availability( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_body, 'ResourceNameAvailabilityRequest') + body_content = self._serialize.body(_body, 'FilePathAvailabilityRequest') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -216,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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -255,3 +253,55 @@ async def check_quota_availability( return deserialized check_quota_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkQuotaAvailability'} # type: ignore + + async def get_quota_limits( + self, + **kwargs + ) -> "_models.QuotaLimitsResponse": + """Get quota limits. + + Get the default and current limits for quotas. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: QuotaLimitsResponse, or the result of cls(response) + :rtype: ~azure.mgmt.netapp.models.QuotaLimitsResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.QuotaLimitsResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get_quota_limits.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(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('QuotaLimitsResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_quota_limits.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/getQuotaLimits'} # type: ignore 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 320bd8cd17287..2e3cf702e3808 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 = "2020-12-01" + api_version = "2021-04-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 3719629582701..48c5c93866fa0 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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -264,8 +264,8 @@ async def begin_create_or_update( :type body: ~azure.mgmt.netapp.models.CapacityPool :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 CapacityPool or the result of cls(response) @@ -333,7 +333,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -399,8 +399,8 @@ async def begin_update( :type body: ~azure.mgmt.netapp.models.CapacityPoolPatch :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 CapacityPool or the result of cls(response) @@ -467,7 +467,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -518,8 +518,8 @@ async def begin_delete( :type pool_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) 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 b00beaf2a92d1..772e7ac383d13 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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -332,8 +332,8 @@ async def begin_update( :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 SnapshotPolicy or the result of cls(response) @@ -400,7 +400,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -449,8 +449,8 @@ async def begin_delete( :type snapshot_policy_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) @@ -528,7 +528,7 @@ async def list_volumes( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-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 6779584191ef7..3eb078ce85796 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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -288,8 +288,8 @@ async def begin_create( :type body: ~azure.mgmt.netapp.models.Snapshot :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 Snapshot or the result of cls(response) @@ -355,7 +355,7 @@ async def _update_initial( pool_name: str, volume_name: str, snapshot_name: str, - body: object, + body: str, **kwargs ) -> Optional["_models.Snapshot"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Snapshot"]] @@ -363,7 +363,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -389,7 +389,7 @@ async def _update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(body, 'object') + body_content = self._serialize.body(body, 'str') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -416,7 +416,7 @@ async def begin_update( pool_name: str, volume_name: str, snapshot_name: str, - body: object, + body: str, **kwargs ) -> AsyncLROPoller["_models.Snapshot"]: """Update a snapshot. @@ -434,11 +434,11 @@ async def begin_update( :param snapshot_name: The name of the mount target. :type snapshot_name: str :param body: Snapshot object supplied in the body of the operation. - :type body: object + :type body: 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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 Snapshot or the result of cls(response) @@ -511,7 +511,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -570,8 +570,8 @@ async def begin_delete( :type snapshot_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) 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 9360177d85581..98c241487ec52 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 = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_backup_status_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_restore_status_operations.py similarity index 90% rename from sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_backup_status_operations.py rename to sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_restore_status_operations.py index 15363e45344f8..0a6142722f2c4 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_backup_status_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_restore_status_operations.py @@ -18,8 +18,8 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class VolumeBackupStatusOperations: - """VolumeBackupStatusOperations async operations. +class VolumeRestoreStatusOperations: + """VolumeRestoreStatusOperations 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. @@ -47,10 +47,10 @@ async def get( pool_name: str, volume_name: str, **kwargs - ) -> "_models.BackupStatus": - """Get volume's backup status. + ) -> "_models.RestoreStatus": + """Get volume's restore status. - Get the status of the backup for a volume. + Get the status of the restore for a volume. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -61,16 +61,16 @@ async def get( :param volume_name: The name of the volume. :type volume_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupStatus, or the result of cls(response) - :rtype: ~azure.mgmt.netapp.models.BackupStatus + :return: RestoreStatus, or the result of cls(response) + :rtype: ~azure.mgmt.netapp.models.RestoreStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupStatus"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreStatus"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL @@ -100,10 +100,10 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackupStatus', pipeline_response) + deserialized = self._deserialize('RestoreStatus', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/restoreStatus'} # 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 d9ca523fbd41b..14cc72a9b1070 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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -278,8 +278,8 @@ async def begin_create_or_update( :type body: ~azure.mgmt.netapp.models.Volume :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 Volume or the result of cls(response) @@ -350,7 +350,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -420,8 +420,8 @@ async def begin_update( :type body: ~azure.mgmt.netapp.models.VolumePatch :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 Volume or the result of cls(response) @@ -491,7 +491,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -546,8 +546,8 @@ async def begin_delete( :type volume_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) @@ -614,7 +614,7 @@ async def _revert_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -677,8 +677,8 @@ async def begin_revert( :type body: ~azure.mgmt.netapp.models.VolumeRevert :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) @@ -746,7 +746,7 @@ async def _break_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -812,8 +812,8 @@ async def begin_break_replication( :type body: ~azure.mgmt.netapp.models.BreakReplicationRequest :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) @@ -897,7 +897,7 @@ async def replication_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._resync_replication_initial.metadata['url'] # type: ignore @@ -1004,8 +1004,8 @@ async def begin_resync_replication( :type volume_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) @@ -1071,7 +1071,7 @@ async def _delete_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_replication_initial.metadata['url'] # type: ignore @@ -1127,8 +1127,8 @@ async def begin_delete_replication( :type volume_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) @@ -1195,7 +1195,7 @@ async def _authorize_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -1258,8 +1258,8 @@ async def begin_authorize_replication( :type body: ~azure.mgmt.netapp.models.AuthorizeRequest :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) @@ -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 = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._re_initialize_replication_initial.metadata['url'] # type: ignore @@ -1381,8 +1381,8 @@ async def begin_re_initialize_replication( :type volume_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) @@ -1449,7 +1449,7 @@ async def _pool_change_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -1512,8 +1512,8 @@ async def begin_pool_change( :type body: ~azure.mgmt.netapp.models.PoolChangeRequest :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) 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 2687cfd52fc53..9e53ea11c2e93 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 @@ -27,6 +27,7 @@ from ._models_py3 import DailySchedule from ._models_py3 import Dimension from ._models_py3 import ExportPolicyRule + from ._models_py3 import FilePathAvailabilityRequest from ._models_py3 import HourlySchedule from ._models_py3 import MetricSpecification from ._models_py3 import MonthlySchedule @@ -40,10 +41,12 @@ from ._models_py3 import OperationListResult from ._models_py3 import PoolChangeRequest from ._models_py3 import QuotaAvailabilityRequest + from ._models_py3 import QuotaLimitsResponse from ._models_py3 import ReplicationObject from ._models_py3 import ReplicationStatus from ._models_py3 import ResourceIdentity from ._models_py3 import ResourceNameAvailabilityRequest + from ._models_py3 import RestoreStatus from ._models_py3 import ServiceSpecification from ._models_py3 import Snapshot from ._models_py3 import SnapshotPoliciesList @@ -52,6 +55,7 @@ from ._models_py3 import SnapshotPolicyPatch from ._models_py3 import SnapshotPolicyVolumeList from ._models_py3 import SnapshotsList + from ._models_py3 import SubscriptionQuotaItem from ._models_py3 import SystemData from ._models_py3 import Vault from ._models_py3 import VaultList @@ -88,6 +92,7 @@ from ._models import DailySchedule # type: ignore from ._models import Dimension # type: ignore from ._models import ExportPolicyRule # type: ignore + from ._models import FilePathAvailabilityRequest # type: ignore from ._models import HourlySchedule # type: ignore from ._models import MetricSpecification # type: ignore from ._models import MonthlySchedule # type: ignore @@ -101,10 +106,12 @@ from ._models import OperationListResult # type: ignore from ._models import PoolChangeRequest # type: ignore from ._models import QuotaAvailabilityRequest # type: ignore + from ._models import QuotaLimitsResponse # type: ignore from ._models import ReplicationObject # type: ignore from ._models import ReplicationStatus # type: ignore from ._models import ResourceIdentity # type: ignore from ._models import ResourceNameAvailabilityRequest # type: ignore + from ._models import RestoreStatus # type: ignore from ._models import ServiceSpecification # type: ignore from ._models import Snapshot # type: ignore from ._models import SnapshotPoliciesList # type: ignore @@ -113,6 +120,7 @@ from ._models import SnapshotPolicyPatch # type: ignore from ._models import SnapshotPolicyVolumeList # type: ignore from ._models import SnapshotsList # type: ignore + from ._models import SubscriptionQuotaItem # type: ignore from ._models import SystemData # type: ignore from ._models import Vault # type: ignore from ._models import VaultList # type: ignore @@ -131,8 +139,10 @@ from ._net_app_management_client_enums import ( ActiveDirectoryStatus, + BackupType, CheckNameResourceTypes, CheckQuotaNameResourceTypes, + ChownMode, CreatedByType, EndpointType, InAvailabilityReasonType, @@ -165,6 +175,7 @@ 'DailySchedule', 'Dimension', 'ExportPolicyRule', + 'FilePathAvailabilityRequest', 'HourlySchedule', 'MetricSpecification', 'MonthlySchedule', @@ -178,10 +189,12 @@ 'OperationListResult', 'PoolChangeRequest', 'QuotaAvailabilityRequest', + 'QuotaLimitsResponse', 'ReplicationObject', 'ReplicationStatus', 'ResourceIdentity', 'ResourceNameAvailabilityRequest', + 'RestoreStatus', 'ServiceSpecification', 'Snapshot', 'SnapshotPoliciesList', @@ -190,6 +203,7 @@ 'SnapshotPolicyPatch', 'SnapshotPolicyVolumeList', 'SnapshotsList', + 'SubscriptionQuotaItem', 'SystemData', 'Vault', 'VaultList', @@ -206,8 +220,10 @@ 'VolumeSnapshotProperties', 'WeeklySchedule', 'ActiveDirectoryStatus', + 'BackupType', 'CheckNameResourceTypes', 'CheckQuotaNameResourceTypes', + 'ChownMode', 'CreatedByType', 'EndpointType', 'InAvailabilityReasonType', 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 d1e53ba8791a0..bc3f50ec8967e 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 @@ -60,6 +60,9 @@ class ActiveDirectory(msrest.serialization.Model): :param backup_operators: Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier. :type backup_operators: list[str] + :param administrators: Users to be added to the Built-in Administrators active directory group. + A list of unique usernames without domain specifier. + :type administrators: list[str] :param kdc_ip: kdc server IP addresses for the active directory machine. This optional parameter is used only while creating kerberos volume. :type kdc_ip: str @@ -107,6 +110,7 @@ class ActiveDirectory(msrest.serialization.Model): 'organizational_unit': {'key': 'organizationalUnit', 'type': 'str'}, 'site': {'key': 'site', 'type': 'str'}, 'backup_operators': {'key': 'backupOperators', 'type': '[str]'}, + 'administrators': {'key': 'administrators', 'type': '[str]'}, 'kdc_ip': {'key': 'kdcIP', 'type': 'str'}, 'ad_name': {'key': 'adName', 'type': 'str'}, 'server_root_ca_certificate': {'key': 'serverRootCACertificate', 'type': 'str'}, @@ -133,6 +137,7 @@ def __init__( self.organizational_unit = kwargs.get('organizational_unit', "CN=Computers") self.site = kwargs.get('site', None) self.backup_operators = kwargs.get('backup_operators', None) + self.administrators = kwargs.get('administrators', None) self.kdc_ip = kwargs.get('kdc_ip', None) self.ad_name = kwargs.get('ad_name', None) self.server_root_ca_certificate = kwargs.get('server_root_ca_certificate', None) @@ -187,12 +192,16 @@ class Backup(msrest.serialization.Model): :vartype size: long :param label: Label for backup. :type label: str - :ivar backup_type: Type of backup adhoc or scheduled. - :vartype backup_type: str + :ivar backup_type: Type of backup Manual or Scheduled. Possible values include: "Manual", + "Scheduled". + :vartype backup_type: str or ~azure.mgmt.netapp.models.BackupType :ivar failure_reason: Failure reason. :vartype failure_reason: str :ivar volume_name: Volume name. :vartype volume_name: str + :param use_existing_snapshot: Manual backup an already existing snapshot. This will always be + false for scheduled backups and true/false for manual backups. + :type use_existing_snapshot: bool """ _validation = { @@ -222,6 +231,7 @@ class Backup(msrest.serialization.Model): 'backup_type': {'key': 'properties.backupType', 'type': 'str'}, 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, 'volume_name': {'key': 'properties.volumeName', 'type': 'str'}, + 'use_existing_snapshot': {'key': 'properties.useExistingSnapshot', 'type': 'bool'}, } def __init__( @@ -241,6 +251,7 @@ def __init__( self.backup_type = None self.failure_reason = None self.volume_name = None + self.use_existing_snapshot = kwargs.get('use_existing_snapshot', False) class BackupPatch(msrest.serialization.Model): @@ -260,12 +271,16 @@ class BackupPatch(msrest.serialization.Model): :vartype size: long :param label: Label for backup. :type label: str - :ivar backup_type: Type of backup adhoc or scheduled. - :vartype backup_type: str + :ivar backup_type: Type of backup Manual or Scheduled. Possible values include: "Manual", + "Scheduled". + :vartype backup_type: str or ~azure.mgmt.netapp.models.BackupType :ivar failure_reason: Failure reason. :vartype failure_reason: str :ivar volume_name: Volume name. :vartype volume_name: str + :param use_existing_snapshot: Manual backup an already existing snapshot. This will always be + false for scheduled backups and true/false for manual backups. + :type use_existing_snapshot: bool """ _validation = { @@ -288,6 +303,7 @@ class BackupPatch(msrest.serialization.Model): 'backup_type': {'key': 'properties.backupType', 'type': 'str'}, 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, 'volume_name': {'key': 'properties.volumeName', 'type': 'str'}, + 'use_existing_snapshot': {'key': 'properties.useExistingSnapshot', 'type': 'bool'}, } def __init__( @@ -304,6 +320,7 @@ def __init__( self.backup_type = None self.failure_reason = None self.volume_name = None + self.use_existing_snapshot = kwargs.get('use_existing_snapshot', False) class BackupPoliciesList(msrest.serialization.Model): @@ -607,6 +624,12 @@ class BackupStatus(msrest.serialization.Model): :vartype unhealthy_reason: str :ivar error_message: Displays error message if the backup is in an error state. :vartype error_message: str + :ivar last_transfer_size: Displays the last transfer size. + :vartype last_transfer_size: long + :ivar last_transfer_type: Displays the last transfer type. + :vartype last_transfer_type: str + :ivar total_transfer_bytes: Displays the total bytes transferred. + :vartype total_transfer_bytes: long """ _validation = { @@ -615,6 +638,9 @@ class BackupStatus(msrest.serialization.Model): 'mirror_state': {'readonly': True}, 'unhealthy_reason': {'readonly': True}, 'error_message': {'readonly': True}, + 'last_transfer_size': {'readonly': True}, + 'last_transfer_type': {'readonly': True}, + 'total_transfer_bytes': {'readonly': True}, } _attribute_map = { @@ -623,6 +649,9 @@ class BackupStatus(msrest.serialization.Model): 'mirror_state': {'key': 'mirrorState', 'type': 'str'}, 'unhealthy_reason': {'key': 'unhealthyReason', 'type': 'str'}, 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'last_transfer_size': {'key': 'lastTransferSize', 'type': 'long'}, + 'last_transfer_type': {'key': 'lastTransferType', 'type': 'str'}, + 'total_transfer_bytes': {'key': 'totalTransferBytes', 'type': 'long'}, } def __init__( @@ -635,6 +664,9 @@ def __init__( self.mirror_state = None self.unhealthy_reason = None self.error_message = None + self.last_transfer_size = None + self.last_transfer_type = None + self.total_transfer_bytes = None class BreakReplicationRequest(msrest.serialization.Model): @@ -690,6 +722,8 @@ class CapacityPool(msrest.serialization.Model): :vartype utilized_throughput_mibps: float :param qos_type: The qos type of the pool. Possible values include: "Auto", "Manual". :type qos_type: str or ~azure.mgmt.netapp.models.QosType + :param cool_access: If enabled (true) the pool can contain cool Access enabled volumes. + :type cool_access: bool """ _validation = { @@ -718,6 +752,7 @@ class CapacityPool(msrest.serialization.Model): 'total_throughput_mibps': {'key': 'properties.totalThroughputMibps', 'type': 'float'}, 'utilized_throughput_mibps': {'key': 'properties.utilizedThroughputMibps', 'type': 'float'}, 'qos_type': {'key': 'properties.qosType', 'type': 'str'}, + 'cool_access': {'key': 'properties.coolAccess', 'type': 'bool'}, } def __init__( @@ -737,6 +772,7 @@ def __init__( self.total_throughput_mibps = None self.utilized_throughput_mibps = None self.qos_type = kwargs.get('qos_type', None) + self.cool_access = kwargs.get('cool_access', False) class CapacityPoolList(msrest.serialization.Model): @@ -966,6 +1002,11 @@ class ExportPolicyRule(msrest.serialization.Model): :type allowed_clients: str :param has_root_access: Has root access to volume. :type has_root_access: bool + :param chown_mode: This parameter specifies who is authorized to change the ownership of a + file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root + users can change ownership of files that they own. Possible values include: "Restricted", + "Unrestricted". Default value: "Restricted". + :type chown_mode: str or ~azure.mgmt.netapp.models.ChownMode """ _attribute_map = { @@ -983,6 +1024,7 @@ class ExportPolicyRule(msrest.serialization.Model): 'nfsv41': {'key': 'nfsv41', 'type': 'bool'}, 'allowed_clients': {'key': 'allowedClients', 'type': 'str'}, 'has_root_access': {'key': 'hasRootAccess', 'type': 'bool'}, + 'chown_mode': {'key': 'chownMode', 'type': 'str'}, } def __init__( @@ -1004,6 +1046,38 @@ def __init__( self.nfsv41 = kwargs.get('nfsv41', None) self.allowed_clients = kwargs.get('allowed_clients', None) self.has_root_access = kwargs.get('has_root_access', True) + self.chown_mode = kwargs.get('chown_mode', "Restricted") + + +class FilePathAvailabilityRequest(msrest.serialization.Model): + """File path availability request content - availability is based on the name and the subnetId. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. File path to verify. + :type name: str + :param subnet_id: Required. The Azure Resource URI for a delegated subnet. Must have the + delegation Microsoft.NetApp/volumes. + :type subnet_id: str + """ + + _validation = { + 'name': {'required': True}, + 'subnet_id': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FilePathAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs['name'] + self.subnet_id = kwargs['subnet_id'] class HourlySchedule(msrest.serialization.Model): @@ -1513,6 +1587,56 @@ def __init__( self.resource_group = kwargs['resource_group'] +class QuotaLimitsResponse(msrest.serialization.Model): + """Information regarding quota limits on subscription. + + :param subscription_id: Subscription identifier. + :type subscription_id: str + :param accounts_per_subscription: The quota for maximum number of accounts per subscription. + :type accounts_per_subscription: str + :param pools_per_account: The quota for maximum number of capacity pools per account. + :type pools_per_account: str + :param volumes_per_pool: The quota for maximum number of volumes per capacity pool. + :type volumes_per_pool: str + :param snapshots_per_volume: The quota for maximum number of snapshots per volume. + :type snapshots_per_volume: str + :param total_ti_bs_per_subscription: The quota for maximum number of Tebibytes per + subscription. + :type total_ti_bs_per_subscription: str + :param total_dp_volumes_per_subscription: The quota for maximum number of data protection + volumes per subscription. + :type total_dp_volumes_per_subscription: str + :param total_volumes_per_subscription: The quota for maximum number of volumes per + subscription. + :type total_volumes_per_subscription: str + """ + + _attribute_map = { + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'accounts_per_subscription': {'key': 'accountsPerSubscription', 'type': 'str'}, + 'pools_per_account': {'key': 'poolsPerAccount', 'type': 'str'}, + 'volumes_per_pool': {'key': 'volumesPerPool', 'type': 'str'}, + 'snapshots_per_volume': {'key': 'snapshotsPerVolume', 'type': 'str'}, + 'total_ti_bs_per_subscription': {'key': 'totalTiBsPerSubscription', 'type': 'str'}, + 'total_dp_volumes_per_subscription': {'key': 'totalDPVolumesPerSubscription', 'type': 'str'}, + 'total_volumes_per_subscription': {'key': 'totalVolumesPerSubscription', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(QuotaLimitsResponse, self).__init__(**kwargs) + self.subscription_id = kwargs.get('subscription_id', None) + self.accounts_per_subscription = kwargs.get('accounts_per_subscription', None) + self.pools_per_account = kwargs.get('pools_per_account', None) + self.volumes_per_pool = kwargs.get('volumes_per_pool', None) + self.snapshots_per_volume = kwargs.get('snapshots_per_volume', None) + self.total_ti_bs_per_subscription = kwargs.get('total_ti_bs_per_subscription', None) + self.total_dp_volumes_per_subscription = kwargs.get('total_dp_volumes_per_subscription', None) + self.total_volumes_per_subscription = kwargs.get('total_volumes_per_subscription', None) + + class ReplicationObject(msrest.serialization.Model): """Replication properties. @@ -1595,7 +1719,7 @@ def __init__( class ResourceIdentity(msrest.serialization.Model): - """ResourceIdentity. + """Identity for the resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -1666,6 +1790,58 @@ def __init__( self.resource_group = kwargs['resource_group'] +class RestoreStatus(msrest.serialization.Model): + """Restore status. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar healthy: Restore health status. + :vartype healthy: bool + :ivar relationship_status: Status of the restore SnapMirror relationship. Possible values + include: "Idle", "Transferring". + :vartype relationship_status: str or ~azure.mgmt.netapp.models.RelationshipStatus + :ivar mirror_state: The status of the restore. Possible values include: "Uninitialized", + "Mirrored", "Broken". + :vartype mirror_state: str or ~azure.mgmt.netapp.models.MirrorState + :ivar unhealthy_reason: Reason for the unhealthy restore relationship. + :vartype unhealthy_reason: str + :ivar error_message: Displays error message if the restore is in an error state. + :vartype error_message: str + :ivar total_transfer_bytes: Displays the total bytes transferred. + :vartype total_transfer_bytes: long + """ + + _validation = { + 'healthy': {'readonly': True}, + 'relationship_status': {'readonly': True}, + 'mirror_state': {'readonly': True}, + 'unhealthy_reason': {'readonly': True}, + 'error_message': {'readonly': True}, + 'total_transfer_bytes': {'readonly': True}, + } + + _attribute_map = { + 'healthy': {'key': 'healthy', 'type': 'bool'}, + 'relationship_status': {'key': 'relationshipStatus', 'type': 'str'}, + 'mirror_state': {'key': 'mirrorState', 'type': 'str'}, + 'unhealthy_reason': {'key': 'unhealthyReason', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'total_transfer_bytes': {'key': 'totalTransferBytes', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(RestoreStatus, self).__init__(**kwargs) + self.healthy = None + self.relationship_status = None + self.mirror_state = None + self.unhealthy_reason = None + self.error_message = None + self.total_transfer_bytes = None + + class ServiceSpecification(msrest.serialization.Model): """One property of operation, include metric specifications. @@ -1972,11 +2148,11 @@ class SnapshotPolicyVolumeList(msrest.serialization.Model): """Volumes associated with snapshot policy. :param value: List of volumes. - :type value: list[object] + :type value: list[str] """ _attribute_map = { - 'value': {'key': 'value', 'type': '[object]'}, + 'value': {'key': 'value', 'type': '[str]'}, } def __init__( @@ -2006,6 +2182,29 @@ def __init__( self.value = kwargs.get('value', None) +class SubscriptionQuotaItem(msrest.serialization.Model): + """Information regarding quota on subscription. + + :param current: The current quota value. + :type current: int + :param default: The default quota value. + :type default: int + """ + + _attribute_map = { + 'current': {'key': 'current', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionQuotaItem, self).__init__(**kwargs) + self.current = kwargs.get('current', None) + self.default = kwargs.get('default', None) + + class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. @@ -2143,7 +2342,7 @@ class Volume(msrest.serialization.Model): :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 fro SMB protocol. + :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 @@ -2186,6 +2385,18 @@ class Volume(msrest.serialization.Model): :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 """ _validation = { @@ -2203,6 +2414,8 @@ class Volume(msrest.serialization.Model): 'subnet_id': {'required': 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}, } _attribute_map = { @@ -2234,6 +2447,9 @@ class Volume(msrest.serialization.Model): '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'}, } def __init__( @@ -2269,6 +2485,9 @@ def __init__( 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") class VolumeBackupProperties(msrest.serialization.Model): @@ -2426,10 +2645,13 @@ class VolumePatchPropertiesDataProtection(msrest.serialization.Model): :param backup: Backup Properties. :type backup: ~azure.mgmt.netapp.models.VolumeBackupProperties + :param snapshot: Snapshot properties. + :type snapshot: ~azure.mgmt.netapp.models.VolumeSnapshotProperties """ _attribute_map = { 'backup': {'key': 'backup', 'type': 'VolumeBackupProperties'}, + 'snapshot': {'key': 'snapshot', 'type': 'VolumeSnapshotProperties'}, } def __init__( @@ -2438,6 +2660,7 @@ def __init__( ): super(VolumePatchPropertiesDataProtection, self).__init__(**kwargs) self.backup = kwargs.get('backup', None) + self.snapshot = kwargs.get('snapshot', None) class VolumePatchPropertiesExportPolicy(msrest.serialization.Model): 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 784e4d79b1515..45f623a90ecd1 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 @@ -67,6 +67,9 @@ class ActiveDirectory(msrest.serialization.Model): :param backup_operators: Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier. :type backup_operators: list[str] + :param administrators: Users to be added to the Built-in Administrators active directory group. + A list of unique usernames without domain specifier. + :type administrators: list[str] :param kdc_ip: kdc server IP addresses for the active directory machine. This optional parameter is used only while creating kerberos volume. :type kdc_ip: str @@ -114,6 +117,7 @@ class ActiveDirectory(msrest.serialization.Model): 'organizational_unit': {'key': 'organizationalUnit', 'type': 'str'}, 'site': {'key': 'site', 'type': 'str'}, 'backup_operators': {'key': 'backupOperators', 'type': '[str]'}, + 'administrators': {'key': 'administrators', 'type': '[str]'}, 'kdc_ip': {'key': 'kdcIP', 'type': 'str'}, 'ad_name': {'key': 'adName', 'type': 'str'}, 'server_root_ca_certificate': {'key': 'serverRootCACertificate', 'type': 'str'}, @@ -136,6 +140,7 @@ def __init__( organizational_unit: Optional[str] = "CN=Computers", site: Optional[str] = None, backup_operators: Optional[List[str]] = None, + administrators: Optional[List[str]] = None, kdc_ip: Optional[str] = None, ad_name: Optional[str] = None, server_root_ca_certificate: Optional[str] = None, @@ -158,6 +163,7 @@ def __init__( self.organizational_unit = organizational_unit self.site = site self.backup_operators = backup_operators + self.administrators = administrators self.kdc_ip = kdc_ip self.ad_name = ad_name self.server_root_ca_certificate = server_root_ca_certificate @@ -214,12 +220,16 @@ class Backup(msrest.serialization.Model): :vartype size: long :param label: Label for backup. :type label: str - :ivar backup_type: Type of backup adhoc or scheduled. - :vartype backup_type: str + :ivar backup_type: Type of backup Manual or Scheduled. Possible values include: "Manual", + "Scheduled". + :vartype backup_type: str or ~azure.mgmt.netapp.models.BackupType :ivar failure_reason: Failure reason. :vartype failure_reason: str :ivar volume_name: Volume name. :vartype volume_name: str + :param use_existing_snapshot: Manual backup an already existing snapshot. This will always be + false for scheduled backups and true/false for manual backups. + :type use_existing_snapshot: bool """ _validation = { @@ -249,6 +259,7 @@ class Backup(msrest.serialization.Model): 'backup_type': {'key': 'properties.backupType', 'type': 'str'}, 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, 'volume_name': {'key': 'properties.volumeName', 'type': 'str'}, + 'use_existing_snapshot': {'key': 'properties.useExistingSnapshot', 'type': 'bool'}, } def __init__( @@ -256,6 +267,7 @@ def __init__( *, location: str, label: Optional[str] = None, + use_existing_snapshot: Optional[bool] = False, **kwargs ): super(Backup, self).__init__(**kwargs) @@ -271,6 +283,7 @@ def __init__( self.backup_type = None self.failure_reason = None self.volume_name = None + self.use_existing_snapshot = use_existing_snapshot class BackupPatch(msrest.serialization.Model): @@ -290,12 +303,16 @@ class BackupPatch(msrest.serialization.Model): :vartype size: long :param label: Label for backup. :type label: str - :ivar backup_type: Type of backup adhoc or scheduled. - :vartype backup_type: str + :ivar backup_type: Type of backup Manual or Scheduled. Possible values include: "Manual", + "Scheduled". + :vartype backup_type: str or ~azure.mgmt.netapp.models.BackupType :ivar failure_reason: Failure reason. :vartype failure_reason: str :ivar volume_name: Volume name. :vartype volume_name: str + :param use_existing_snapshot: Manual backup an already existing snapshot. This will always be + false for scheduled backups and true/false for manual backups. + :type use_existing_snapshot: bool """ _validation = { @@ -318,6 +335,7 @@ class BackupPatch(msrest.serialization.Model): 'backup_type': {'key': 'properties.backupType', 'type': 'str'}, 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, 'volume_name': {'key': 'properties.volumeName', 'type': 'str'}, + 'use_existing_snapshot': {'key': 'properties.useExistingSnapshot', 'type': 'bool'}, } def __init__( @@ -325,6 +343,7 @@ def __init__( *, tags: Optional[Dict[str, str]] = None, label: Optional[str] = None, + use_existing_snapshot: Optional[bool] = False, **kwargs ): super(BackupPatch, self).__init__(**kwargs) @@ -337,6 +356,7 @@ def __init__( self.backup_type = None self.failure_reason = None self.volume_name = None + self.use_existing_snapshot = use_existing_snapshot class BackupPoliciesList(msrest.serialization.Model): @@ -674,6 +694,12 @@ class BackupStatus(msrest.serialization.Model): :vartype unhealthy_reason: str :ivar error_message: Displays error message if the backup is in an error state. :vartype error_message: str + :ivar last_transfer_size: Displays the last transfer size. + :vartype last_transfer_size: long + :ivar last_transfer_type: Displays the last transfer type. + :vartype last_transfer_type: str + :ivar total_transfer_bytes: Displays the total bytes transferred. + :vartype total_transfer_bytes: long """ _validation = { @@ -682,6 +708,9 @@ class BackupStatus(msrest.serialization.Model): 'mirror_state': {'readonly': True}, 'unhealthy_reason': {'readonly': True}, 'error_message': {'readonly': True}, + 'last_transfer_size': {'readonly': True}, + 'last_transfer_type': {'readonly': True}, + 'total_transfer_bytes': {'readonly': True}, } _attribute_map = { @@ -690,6 +719,9 @@ class BackupStatus(msrest.serialization.Model): 'mirror_state': {'key': 'mirrorState', 'type': 'str'}, 'unhealthy_reason': {'key': 'unhealthyReason', 'type': 'str'}, 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'last_transfer_size': {'key': 'lastTransferSize', 'type': 'long'}, + 'last_transfer_type': {'key': 'lastTransferType', 'type': 'str'}, + 'total_transfer_bytes': {'key': 'totalTransferBytes', 'type': 'long'}, } def __init__( @@ -702,6 +734,9 @@ def __init__( self.mirror_state = None self.unhealthy_reason = None self.error_message = None + self.last_transfer_size = None + self.last_transfer_type = None + self.total_transfer_bytes = None class BreakReplicationRequest(msrest.serialization.Model): @@ -759,6 +794,8 @@ class CapacityPool(msrest.serialization.Model): :vartype utilized_throughput_mibps: float :param qos_type: The qos type of the pool. Possible values include: "Auto", "Manual". :type qos_type: str or ~azure.mgmt.netapp.models.QosType + :param cool_access: If enabled (true) the pool can contain cool Access enabled volumes. + :type cool_access: bool """ _validation = { @@ -787,6 +824,7 @@ class CapacityPool(msrest.serialization.Model): 'total_throughput_mibps': {'key': 'properties.totalThroughputMibps', 'type': 'float'}, 'utilized_throughput_mibps': {'key': 'properties.utilizedThroughputMibps', 'type': 'float'}, 'qos_type': {'key': 'properties.qosType', 'type': 'str'}, + 'cool_access': {'key': 'properties.coolAccess', 'type': 'bool'}, } def __init__( @@ -797,6 +835,7 @@ def __init__( service_level: Union[str, "ServiceLevel"], tags: Optional[Dict[str, str]] = None, qos_type: Optional[Union[str, "QosType"]] = None, + cool_access: Optional[bool] = False, **kwargs ): super(CapacityPool, self).__init__(**kwargs) @@ -812,6 +851,7 @@ def __init__( self.total_throughput_mibps = None self.utilized_throughput_mibps = None self.qos_type = qos_type + self.cool_access = cool_access class CapacityPoolList(msrest.serialization.Model): @@ -1064,6 +1104,11 @@ class ExportPolicyRule(msrest.serialization.Model): :type allowed_clients: str :param has_root_access: Has root access to volume. :type has_root_access: bool + :param chown_mode: This parameter specifies who is authorized to change the ownership of a + file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root + users can change ownership of files that they own. Possible values include: "Restricted", + "Unrestricted". Default value: "Restricted". + :type chown_mode: str or ~azure.mgmt.netapp.models.ChownMode """ _attribute_map = { @@ -1081,6 +1126,7 @@ class ExportPolicyRule(msrest.serialization.Model): 'nfsv41': {'key': 'nfsv41', 'type': 'bool'}, 'allowed_clients': {'key': 'allowedClients', 'type': 'str'}, 'has_root_access': {'key': 'hasRootAccess', 'type': 'bool'}, + 'chown_mode': {'key': 'chownMode', 'type': 'str'}, } def __init__( @@ -1100,6 +1146,7 @@ def __init__( nfsv41: Optional[bool] = None, allowed_clients: Optional[str] = None, has_root_access: Optional[bool] = True, + chown_mode: Optional[Union[str, "ChownMode"]] = "Restricted", **kwargs ): super(ExportPolicyRule, self).__init__(**kwargs) @@ -1117,6 +1164,41 @@ def __init__( self.nfsv41 = nfsv41 self.allowed_clients = allowed_clients self.has_root_access = has_root_access + self.chown_mode = chown_mode + + +class FilePathAvailabilityRequest(msrest.serialization.Model): + """File path availability request content - availability is based on the name and the subnetId. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. File path to verify. + :type name: str + :param subnet_id: Required. The Azure Resource URI for a delegated subnet. Must have the + delegation Microsoft.NetApp/volumes. + :type subnet_id: str + """ + + _validation = { + 'name': {'required': True}, + 'subnet_id': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + subnet_id: str, + **kwargs + ): + super(FilePathAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.subnet_id = subnet_id class HourlySchedule(msrest.serialization.Model): @@ -1685,6 +1767,65 @@ def __init__( self.resource_group = resource_group +class QuotaLimitsResponse(msrest.serialization.Model): + """Information regarding quota limits on subscription. + + :param subscription_id: Subscription identifier. + :type subscription_id: str + :param accounts_per_subscription: The quota for maximum number of accounts per subscription. + :type accounts_per_subscription: str + :param pools_per_account: The quota for maximum number of capacity pools per account. + :type pools_per_account: str + :param volumes_per_pool: The quota for maximum number of volumes per capacity pool. + :type volumes_per_pool: str + :param snapshots_per_volume: The quota for maximum number of snapshots per volume. + :type snapshots_per_volume: str + :param total_ti_bs_per_subscription: The quota for maximum number of Tebibytes per + subscription. + :type total_ti_bs_per_subscription: str + :param total_dp_volumes_per_subscription: The quota for maximum number of data protection + volumes per subscription. + :type total_dp_volumes_per_subscription: str + :param total_volumes_per_subscription: The quota for maximum number of volumes per + subscription. + :type total_volumes_per_subscription: str + """ + + _attribute_map = { + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'accounts_per_subscription': {'key': 'accountsPerSubscription', 'type': 'str'}, + 'pools_per_account': {'key': 'poolsPerAccount', 'type': 'str'}, + 'volumes_per_pool': {'key': 'volumesPerPool', 'type': 'str'}, + 'snapshots_per_volume': {'key': 'snapshotsPerVolume', 'type': 'str'}, + 'total_ti_bs_per_subscription': {'key': 'totalTiBsPerSubscription', 'type': 'str'}, + 'total_dp_volumes_per_subscription': {'key': 'totalDPVolumesPerSubscription', 'type': 'str'}, + 'total_volumes_per_subscription': {'key': 'totalVolumesPerSubscription', 'type': 'str'}, + } + + def __init__( + self, + *, + subscription_id: Optional[str] = None, + accounts_per_subscription: Optional[str] = None, + pools_per_account: Optional[str] = None, + volumes_per_pool: Optional[str] = None, + snapshots_per_volume: Optional[str] = None, + total_ti_bs_per_subscription: Optional[str] = None, + total_dp_volumes_per_subscription: Optional[str] = None, + total_volumes_per_subscription: Optional[str] = None, + **kwargs + ): + super(QuotaLimitsResponse, self).__init__(**kwargs) + self.subscription_id = subscription_id + self.accounts_per_subscription = accounts_per_subscription + self.pools_per_account = pools_per_account + self.volumes_per_pool = volumes_per_pool + self.snapshots_per_volume = snapshots_per_volume + self.total_ti_bs_per_subscription = total_ti_bs_per_subscription + self.total_dp_volumes_per_subscription = total_dp_volumes_per_subscription + self.total_volumes_per_subscription = total_volumes_per_subscription + + class ReplicationObject(msrest.serialization.Model): """Replication properties. @@ -1779,7 +1920,7 @@ def __init__( class ResourceIdentity(msrest.serialization.Model): - """ResourceIdentity. + """Identity for the resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -1856,6 +1997,58 @@ def __init__( self.resource_group = resource_group +class RestoreStatus(msrest.serialization.Model): + """Restore status. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar healthy: Restore health status. + :vartype healthy: bool + :ivar relationship_status: Status of the restore SnapMirror relationship. Possible values + include: "Idle", "Transferring". + :vartype relationship_status: str or ~azure.mgmt.netapp.models.RelationshipStatus + :ivar mirror_state: The status of the restore. Possible values include: "Uninitialized", + "Mirrored", "Broken". + :vartype mirror_state: str or ~azure.mgmt.netapp.models.MirrorState + :ivar unhealthy_reason: Reason for the unhealthy restore relationship. + :vartype unhealthy_reason: str + :ivar error_message: Displays error message if the restore is in an error state. + :vartype error_message: str + :ivar total_transfer_bytes: Displays the total bytes transferred. + :vartype total_transfer_bytes: long + """ + + _validation = { + 'healthy': {'readonly': True}, + 'relationship_status': {'readonly': True}, + 'mirror_state': {'readonly': True}, + 'unhealthy_reason': {'readonly': True}, + 'error_message': {'readonly': True}, + 'total_transfer_bytes': {'readonly': True}, + } + + _attribute_map = { + 'healthy': {'key': 'healthy', 'type': 'bool'}, + 'relationship_status': {'key': 'relationshipStatus', 'type': 'str'}, + 'mirror_state': {'key': 'mirrorState', 'type': 'str'}, + 'unhealthy_reason': {'key': 'unhealthyReason', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'total_transfer_bytes': {'key': 'totalTransferBytes', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(RestoreStatus, self).__init__(**kwargs) + self.healthy = None + self.relationship_status = None + self.mirror_state = None + self.unhealthy_reason = None + self.error_message = None + self.total_transfer_bytes = None + + class ServiceSpecification(msrest.serialization.Model): """One property of operation, include metric specifications. @@ -2192,17 +2385,17 @@ class SnapshotPolicyVolumeList(msrest.serialization.Model): """Volumes associated with snapshot policy. :param value: List of volumes. - :type value: list[object] + :type value: list[str] """ _attribute_map = { - 'value': {'key': 'value', 'type': '[object]'}, + 'value': {'key': 'value', 'type': '[str]'}, } def __init__( self, *, - value: Optional[List[object]] = None, + value: Optional[List[str]] = None, **kwargs ): super(SnapshotPolicyVolumeList, self).__init__(**kwargs) @@ -2230,6 +2423,32 @@ def __init__( self.value = value +class SubscriptionQuotaItem(msrest.serialization.Model): + """Information regarding quota on subscription. + + :param current: The current quota value. + :type current: int + :param default: The default quota value. + :type default: int + """ + + _attribute_map = { + 'current': {'key': 'current', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + } + + def __init__( + self, + *, + current: Optional[int] = None, + default: Optional[int] = None, + **kwargs + ): + super(SubscriptionQuotaItem, self).__init__(**kwargs) + self.current = current + self.default = default + + class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. @@ -2379,7 +2598,7 @@ class Volume(msrest.serialization.Model): :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 fro SMB protocol. + :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 @@ -2422,6 +2641,18 @@ class Volume(msrest.serialization.Model): :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 """ _validation = { @@ -2439,6 +2670,8 @@ class Volume(msrest.serialization.Model): 'subnet_id': {'required': 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}, } _attribute_map = { @@ -2470,6 +2703,9 @@ class Volume(msrest.serialization.Model): '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'}, } def __init__( @@ -2496,6 +2732,9 @@ def __init__( 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", **kwargs ): super(Volume, self).__init__(**kwargs) @@ -2527,6 +2766,9 @@ def __init__( 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 class VolumeBackupProperties(msrest.serialization.Model): @@ -2704,20 +2946,25 @@ class VolumePatchPropertiesDataProtection(msrest.serialization.Model): :param backup: Backup Properties. :type backup: ~azure.mgmt.netapp.models.VolumeBackupProperties + :param snapshot: Snapshot properties. + :type snapshot: ~azure.mgmt.netapp.models.VolumeSnapshotProperties """ _attribute_map = { 'backup': {'key': 'backup', 'type': 'VolumeBackupProperties'}, + 'snapshot': {'key': 'snapshot', 'type': 'VolumeSnapshotProperties'}, } def __init__( self, *, backup: Optional["VolumeBackupProperties"] = None, + snapshot: Optional["VolumeSnapshotProperties"] = None, **kwargs ): super(VolumePatchPropertiesDataProtection, self).__init__(**kwargs) self.backup = backup + self.snapshot = snapshot class VolumePatchPropertiesExportPolicy(msrest.serialization.Model): 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 6ef94d15a25ec..a81fa38d19fd6 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 @@ -30,11 +30,25 @@ class ActiveDirectoryStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) """Status of the Active Directory """ - CREATED = "Created" #: Active Directory created but not in use. - IN_USE = "InUse" #: Active Directory in use by SMB Volume. - DELETED = "Deleted" #: Active Directory Deleted. - ERROR = "Error" #: Error with the Active Directory. - UPDATING = "Updating" #: Active Directory Updating. + #: Active Directory created but not in use. + CREATED = "Created" + #: Active Directory in use by SMB Volume. + IN_USE = "InUse" + #: Active Directory Deleted. + DELETED = "Deleted" + #: Error with the Active Directory. + ERROR = "Error" + #: Active Directory Updating. + UPDATING = "Updating" + +class BackupType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of backup Manual or Scheduled + """ + + #: Manual backup. + MANUAL = "Manual" + #: Scheduled backup. + SCHEDULED = "Scheduled" class CheckNameResourceTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Resource type used for verification. @@ -54,6 +68,15 @@ class CheckQuotaNameResourceTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" +class ChownMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """This parameter specifies who is authorized to change the ownership of a file. restricted - Only + root user can change the ownership of the file. unrestricted - Non-root users can change + ownership of files that they own. + """ + + RESTRICTED = "Restricted" + UNRESTRICTED = "Unrestricted" + class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of identity that created the resource. """ @@ -91,8 +114,10 @@ class QosType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The qos type of the pool """ - AUTO = "Auto" #: qos type Auto. - MANUAL = "Manual" #: qos type Manual. + #: qos type Auto. + AUTO = "Auto" + #: qos type Manual. + MANUAL = "Manual" class RelationshipStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Status of the mirror relationship @@ -120,6 +145,9 @@ class ServiceLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The service level of the file system """ - STANDARD = "Standard" #: Standard service level. - PREMIUM = "Premium" #: Premium service level. - ULTRA = "Ultra" #: Ultra service level. + #: Standard service level. + STANDARD = "Standard" + #: Premium service level. + PREMIUM = "Premium" + #: Ultra service level. + ULTRA = "Ultra" 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 90d13bae02519..4295d8f62ad84 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 @@ -13,9 +13,9 @@ from ._volumes_operations import VolumesOperations from ._snapshots_operations import SnapshotsOperations from ._snapshot_policies_operations import SnapshotPoliciesOperations -from ._volume_backup_status_operations import VolumeBackupStatusOperations -from ._account_backups_operations import AccountBackupsOperations from ._backups_operations import BackupsOperations +from ._volume_restore_status_operations import VolumeRestoreStatusOperations +from ._account_backups_operations import AccountBackupsOperations from ._backup_policies_operations import BackupPoliciesOperations from ._vaults_operations import VaultsOperations @@ -27,9 +27,9 @@ 'VolumesOperations', 'SnapshotsOperations', 'SnapshotPoliciesOperations', - 'VolumeBackupStatusOperations', - 'AccountBackupsOperations', 'BackupsOperations', + 'VolumeRestoreStatusOperations', + 'AccountBackupsOperations', 'BackupPoliciesOperations', 'VaultsOperations', ] 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 434c3d118d81c..fa22e5542df66 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 @@ -9,6 +9,7 @@ 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 @@ -19,7 +20,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + 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]] @@ -52,7 +53,7 @@ def list( account_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.BackupsList" + # type: (...) -> Iterable["_models.BackupsList"] """List Backups for a Netapp Account. List all Backups for a Netapp Account. @@ -62,8 +63,8 @@ def list( :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: BackupsList, or the result of cls(response) - :rtype: ~azure.mgmt.netapp.models.BackupsList + :return: An iterator like instance of either BackupsList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.BackupsList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupsList"] @@ -71,40 +72,56 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - '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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + '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('BackupsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + def get_next(next_link=None): + request = prepare_request(next_link) - 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) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - deserialized = self._deserialize('BackupsList', pipeline_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) - if cls: - return cls(pipeline_response, deserialized, {}) + return pipeline_response - return deserialized + return ItemPaged( + get_next, extract_data + ) list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups'} # type: ignore def get( @@ -117,7 +134,7 @@ def get( # type: (...) -> "_models.Backup" """Get Backup for a Netapp Account. - Get Backup for a Netapp Account. + Gets the specified backup for a Netapp Account. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -135,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL @@ -185,7 +202,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -227,7 +244,7 @@ def begin_delete( # type: (...) -> LROPoller[None] """Delete Backup for a Netapp Account. - Delete Backup for a Netapp Account. + Delete the specified Backup for a Netapp Account. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -237,8 +254,8 @@ def begin_delete( :type backup_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) 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 6a4aca3631ed7..9c98ce5c5b66c 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 @@ -69,7 +69,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -145,7 +145,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL @@ -194,7 +194,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -259,8 +259,8 @@ def begin_create_or_update( :type body: ~azure.mgmt.netapp.models.NetAppAccount :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 NetAppAccount or the result of cls(response) @@ -325,7 +325,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -373,8 +373,8 @@ def begin_delete( :type account_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) @@ -436,7 +436,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -501,8 +501,8 @@ def begin_update( :type body: ~azure.mgmt.netapp.models.NetAppAccountPatch :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 NetAppAccount or the result of cls(response) 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 c7424da5c7df8..dbe220346ad70 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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -273,8 +273,8 @@ def begin_create( :type body: ~azure.mgmt.netapp.models.BackupPolicy :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 BackupPolicy or the result of cls(response) @@ -329,7 +329,7 @@ def get_long_running_output(pipeline_response): 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}/backupPolicies/{backupPolicyName}'} # type: ignore - def update( + def _update_initial( self, resource_group_name, # type: str account_name, # type: str @@ -338,34 +338,17 @@ def update( **kwargs # type: Any ): # type: (...) -> "_models.BackupPolicy" - """Patch a backup policy. - - Patch a backup policy for Netapp 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 - :param backup_policy_name: Backup policy Name which uniquely identify backup policy. - :type backup_policy_name: str - :param body: Backup policy object supplied in the body of the operation. - :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.netapp.models.BackupPolicy - :raises: ~azure.core.exceptions.HttpResponseError - """ cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self._update_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\._\(\)]+$'), @@ -404,7 +387,86 @@ def update( return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}'} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + account_name, # type: str + backup_policy_name, # type: str + body, # type: "_models.BackupPolicyPatch" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.BackupPolicy"] + """Patch a backup policy. + + Patch a backup policy for Netapp 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 + :param backup_policy_name: Backup policy Name which uniquely identify backup policy. + :type backup_policy_name: str + :param body: Backup policy object supplied in the body of the operation. + :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch + :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: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 BackupPolicy or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupPolicy"] + 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._update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + backup_policy_name=backup_policy_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('BackupPolicy', 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'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, 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_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}'} # type: ignore def _delete_initial( self, @@ -419,7 +481,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -471,8 +533,8 @@ def begin_delete( :type backup_policy_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) 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 14bd7afdad656..e461cef7e3a61 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 @@ -47,6 +47,75 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + def get_status( + self, + resource_group_name, # type: str + account_name, # type: str + pool_name, # type: str + volume_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupStatus" + """Get volume's backup status. + + Get the status of the backup for a volume. + + :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 pool_name: The name of the capacity pool. + :type pool_name: str + :param volume_name: The name of the volume. + :type volume_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupStatus, or the result of cls(response) + :rtype: ~azure.mgmt.netapp.models.BackupStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get_status.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'), + 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'), + 'volumeName': self._serialize.url("volume_name", volume_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z][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('BackupStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus'} # type: ignore + def list( self, resource_group_name, # type: str @@ -78,7 +147,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -144,7 +213,7 @@ def get( # type: (...) -> "_models.Backup" """Get a backup. - Get a particular backup of the volume. + Gets the specified backup of the volume. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -166,7 +235,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL @@ -221,7 +290,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -299,8 +368,8 @@ def begin_create( :type body: ~azure.mgmt.netapp.models.Backup :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 Backup or the result of cls(response) @@ -375,7 +444,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -455,8 +524,8 @@ def begin_update( :type body: ~azure.mgmt.netapp.models.BackupPatch :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 Backup or the result of cls(response) @@ -530,7 +599,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -590,8 +659,8 @@ def begin_delete( :type backup_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) 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 0d9c4d4f9e7df..7dd8c4b8c1262 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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -121,8 +121,7 @@ def check_file_path_availability( self, location, # type: str name, # type: str - type, # type: Union[str, "_models.CheckNameResourceTypes"] - resource_group, # type: str + subnet_id, # type: str **kwargs # type: Any ): # type: (...) -> "_models.CheckAvailabilityResponse" @@ -132,12 +131,11 @@ def check_file_path_availability( :param location: The location. :type location: str - :param name: Resource name to verify. + :param name: File path to verify. :type name: str - :param type: Resource type used for verification. - :type type: str or ~azure.mgmt.netapp.models.CheckNameResourceTypes - :param resource_group: Resource group name. - :type resource_group: str + :param subnet_id: The Azure Resource URI for a delegated subnet. Must have the delegation + Microsoft.NetApp/volumes. + :type subnet_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckAvailabilityResponse, or the result of cls(response) :rtype: ~azure.mgmt.netapp.models.CheckAvailabilityResponse @@ -149,8 +147,8 @@ def check_file_path_availability( } error_map.update(kwargs.pop('error_map', {})) - _body = _models.ResourceNameAvailabilityRequest(name=name, type=type, resource_group=resource_group) - api_version = "2020-12-01" + _body = _models.FilePathAvailabilityRequest(name=name, subnet_id=subnet_id) + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -172,7 +170,7 @@ def check_file_path_availability( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_body, 'ResourceNameAvailabilityRequest') + body_content = self._serialize.body(_body, 'FilePathAvailabilityRequest') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -223,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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -262,3 +260,56 @@ def check_quota_availability( return deserialized check_quota_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkQuotaAvailability'} # type: ignore + + def get_quota_limits( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.QuotaLimitsResponse" + """Get quota limits. + + Get the default and current limits for quotas. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: QuotaLimitsResponse, or the result of cls(response) + :rtype: ~azure.mgmt.netapp.models.QuotaLimitsResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.QuotaLimitsResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get_quota_limits.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(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('QuotaLimitsResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_quota_limits.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/getQuotaLimits'} # type: ignore 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 8836a0ead984d..bb05b1c9e9add 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 = "2020-12-01" + api_version = "2021-04-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 064096bae2c0a..79d2d972e6473 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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -272,8 +272,8 @@ def begin_create_or_update( :type body: ~azure.mgmt.netapp.models.CapacityPool :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 CapacityPool or the result of cls(response) @@ -342,7 +342,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -409,8 +409,8 @@ def begin_update( :type body: ~azure.mgmt.netapp.models.CapacityPoolPatch :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 CapacityPool or the result of cls(response) @@ -478,7 +478,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -530,8 +530,8 @@ def begin_delete( :type pool_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) 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 77c060bab7faf..b73feebb75bd5 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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -341,8 +341,8 @@ def begin_update( :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 SnapshotPolicy or the result of cls(response) @@ -410,7 +410,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -460,8 +460,8 @@ def begin_delete( :type snapshot_policy_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) @@ -540,7 +540,7 @@ def list_volumes( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-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 d75e875f9593e..ee60279d15b0b 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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -296,8 +296,8 @@ def begin_create( :type body: ~azure.mgmt.netapp.models.Snapshot :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 Snapshot or the result of cls(response) @@ -363,7 +363,7 @@ def _update_initial( pool_name, # type: str volume_name, # type: str snapshot_name, # type: str - body, # type: object + body, # type: str **kwargs # type: Any ): # type: (...) -> Optional["_models.Snapshot"] @@ -372,7 +372,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -398,7 +398,7 @@ def _update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(body, 'object') + body_content = self._serialize.body(body, 'str') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -425,7 +425,7 @@ def begin_update( pool_name, # type: str volume_name, # type: str snapshot_name, # type: str - body, # type: object + body, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller["_models.Snapshot"] @@ -444,11 +444,11 @@ def begin_update( :param snapshot_name: The name of the mount target. :type snapshot_name: str :param body: Snapshot object supplied in the body of the operation. - :type body: object + :type body: 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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 Snapshot or the result of cls(response) @@ -522,7 +522,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -582,8 +582,8 @@ def begin_delete( :type snapshot_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) 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 b9f0f9b5d98c2..3d0dd9af6a642 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 = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_backup_status_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_restore_status_operations.py similarity index 90% rename from sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_backup_status_operations.py rename to sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_restore_status_operations.py index eeb3599e12303..a3636e02daffd 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_backup_status_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_restore_status_operations.py @@ -22,8 +22,8 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class VolumeBackupStatusOperations(object): - """VolumeBackupStatusOperations operations. +class VolumeRestoreStatusOperations(object): + """VolumeRestoreStatusOperations 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. @@ -52,10 +52,10 @@ def get( volume_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.BackupStatus" - """Get volume's backup status. + # type: (...) -> "_models.RestoreStatus" + """Get volume's restore status. - Get the status of the backup for a volume. + Get the status of the restore for a volume. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -66,16 +66,16 @@ def get( :param volume_name: The name of the volume. :type volume_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupStatus, or the result of cls(response) - :rtype: ~azure.mgmt.netapp.models.BackupStatus + :return: RestoreStatus, or the result of cls(response) + :rtype: ~azure.mgmt.netapp.models.RestoreStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupStatus"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreStatus"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL @@ -105,10 +105,10 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackupStatus', pipeline_response) + deserialized = self._deserialize('RestoreStatus', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/restoreStatus'} # 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 139c6dde72ca3..b88a5b6593137 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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -286,8 +286,8 @@ def begin_create_or_update( :type body: ~azure.mgmt.netapp.models.Volume :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 Volume or the result of cls(response) @@ -359,7 +359,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -430,8 +430,8 @@ def begin_update( :type body: ~azure.mgmt.netapp.models.VolumePatch :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 Volume or the result of cls(response) @@ -502,7 +502,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -558,8 +558,8 @@ def begin_delete( :type volume_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) @@ -627,7 +627,7 @@ def _revert_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -691,8 +691,8 @@ def begin_revert( :type body: ~azure.mgmt.netapp.models.VolumeRevert :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) @@ -761,7 +761,7 @@ def _break_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -828,8 +828,8 @@ def begin_break_replication( :type body: ~azure.mgmt.netapp.models.BreakReplicationRequest :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) @@ -914,7 +914,7 @@ def replication_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-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 = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._resync_replication_initial.metadata['url'] # type: ignore @@ -1023,8 +1023,8 @@ def begin_resync_replication( :type volume_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) @@ -1091,7 +1091,7 @@ def _delete_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._delete_replication_initial.metadata['url'] # type: ignore @@ -1148,8 +1148,8 @@ def begin_delete_replication( :type volume_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) @@ -1217,7 +1217,7 @@ def _authorize_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -1281,8 +1281,8 @@ def begin_authorize_replication( :type body: ~azure.mgmt.netapp.models.AuthorizeRequest :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) @@ -1350,7 +1350,7 @@ def _re_initialize_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" # Construct URL url = self._re_initialize_replication_initial.metadata['url'] # type: ignore @@ -1406,8 +1406,8 @@ def begin_re_initialize_replication( :type volume_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) @@ -1475,7 +1475,7 @@ def _pool_change_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -1539,8 +1539,8 @@ def begin_pool_change( :type body: ~azure.mgmt.netapp.models.PoolChangeRequest :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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)