From abeb26e353feac2bbfcf4d258613888a6f3bcf22 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 10 May 2021 09:50:08 +0000 Subject: [PATCH] CodeGen from PR 13814 in Azure/azure-rest-api-specs Merge ecb52181025e0248518ac481bd36ad4ff1242d18 into dda51a4bf761a7e9e22c9085623f6201910f5efd --- sdk/netapp/azure-mgmt-netapp/MANIFEST.in | 1 + sdk/netapp/azure-mgmt-netapp/_meta.json | 8 + .../_azure_net_app_files_management_client.py | 12 +- .../azure/mgmt/netapp/models/__init__.py | 13 +- ...e_net_app_files_management_client_enums.py | 11 +- .../azure/mgmt/netapp/models/_models.py | 149 ++++++++++++---- .../azure/mgmt/netapp/models/_models_py3.py | 163 ++++++++++++++---- .../azure/mgmt/netapp/operations/__init__.py | 4 +- .../operations/_account_backups_operations.py | 101 ++++++----- .../netapp/operations/_accounts_operations.py | 4 +- .../operations/_backup_policies_operations.py | 88 +++++++--- .../netapp/operations/_backups_operations.py | 107 +++++++++--- .../_net_app_resource_operations.py | 4 +- .../mgmt/netapp/operations/_operations.py | 4 +- .../netapp/operations/_pools_operations.py | 4 +- .../_snapshot_policies_operations.py | 4 +- .../operations/_snapshots_operations.py | 4 +- .../netapp/operations/_vaults_operations.py | 4 +- .../netapp/operations/_volumes_operations.py | 18 +- 19 files changed, 496 insertions(+), 207 deletions(-) create mode 100644 sdk/netapp/azure-mgmt-netapp/_meta.json 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..7f1aa6845de55 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "126ab7f1b4d5620b13e8298b082316b45739abc4", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/netapp/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/netapp/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_azure_net_app_files_management_client.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_azure_net_app_files_management_client.py index ad443a7a8f1f2..f7d821656c3a0 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_azure_net_app_files_management_client.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_azure_net_app_files_management_client.py @@ -20,8 +20,8 @@ from .operations import VolumesOperations from .operations import SnapshotsOperations from .operations import SnapshotPoliciesOperations -from .operations import AccountBackupsOperations from .operations import BackupsOperations +from .operations import AccountBackupsOperations from .operations import BackupPoliciesOperations from .operations import VaultsOperations from . import models @@ -47,10 +47,10 @@ class AzureNetAppFilesManagementClient(SDKClient): :vartype snapshots: azure.mgmt.netapp.operations.SnapshotsOperations :ivar snapshot_policies: SnapshotPolicies operations :vartype snapshot_policies: azure.mgmt.netapp.operations.SnapshotPoliciesOperations - :ivar account_backups: AccountBackups operations - :vartype account_backups: azure.mgmt.netapp.operations.AccountBackupsOperations :ivar backups: Backups operations :vartype backups: azure.mgmt.netapp.operations.BackupsOperations + :ivar account_backups: AccountBackups operations + :vartype account_backups: azure.mgmt.netapp.operations.AccountBackupsOperations :ivar backup_policies: BackupPolicies operations :vartype backup_policies: azure.mgmt.netapp.operations.BackupPoliciesOperations :ivar vaults: Vaults operations @@ -73,7 +73,7 @@ def __init__( super(AzureNetAppFilesManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-11-01' + self.api_version = '2021-02-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -91,10 +91,10 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.snapshot_policies = SnapshotPoliciesOperations( self._client, self.config, self._serialize, self._deserialize) - self.account_backups = AccountBackupsOperations( - self._client, self.config, self._serialize, self._deserialize) self.backups = BackupsOperations( self._client, self.config, self._serialize, self._deserialize) + 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( 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 462373d489c52..adf1b74fff725 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 @@ -18,7 +18,7 @@ from ._models_py3 import BackupPolicy from ._models_py3 import BackupPolicyDetails from ._models_py3 import BackupPolicyPatch - from ._models_py3 import BackupsList + from ._models_py3 import BackupStatus from ._models_py3 import BreakReplicationRequest from ._models_py3 import CapacityPool from ._models_py3 import CapacityPoolPatch @@ -39,6 +39,7 @@ from ._models_py3 import QuotaAvailabilityRequest from ._models_py3 import ReplicationObject from ._models_py3 import ReplicationStatus + from ._models_py3 import ResourceIdentity from ._models_py3 import ResourceNameAvailabilityRequest from ._models_py3 import ServiceSpecification from ._models_py3 import Snapshot @@ -68,7 +69,7 @@ from ._models import BackupPolicy from ._models import BackupPolicyDetails from ._models import BackupPolicyPatch - from ._models import BackupsList + from ._models import BackupStatus from ._models import BreakReplicationRequest from ._models import CapacityPool from ._models import CapacityPoolPatch @@ -89,6 +90,7 @@ from ._models import QuotaAvailabilityRequest from ._models import ReplicationObject from ._models import ReplicationStatus + from ._models import ResourceIdentity from ._models import ResourceNameAvailabilityRequest from ._models import ServiceSpecification from ._models import Snapshot @@ -123,7 +125,6 @@ CheckNameResourceTypes, CheckQuotaNameResourceTypes, ActiveDirectoryStatus, - KeySource, CreatedByType, ServiceLevel, QosType, @@ -132,6 +133,7 @@ SecurityStyle, RelationshipStatus, MirrorState, + BackupType, ) __all__ = [ @@ -143,7 +145,7 @@ 'BackupPolicy', 'BackupPolicyDetails', 'BackupPolicyPatch', - 'BackupsList', + 'BackupStatus', 'BreakReplicationRequest', 'CapacityPool', 'CapacityPoolPatch', @@ -164,6 +166,7 @@ 'QuotaAvailabilityRequest', 'ReplicationObject', 'ReplicationStatus', + 'ResourceIdentity', 'ResourceNameAvailabilityRequest', 'ServiceSpecification', 'Snapshot', @@ -197,7 +200,6 @@ 'CheckNameResourceTypes', 'CheckQuotaNameResourceTypes', 'ActiveDirectoryStatus', - 'KeySource', 'CreatedByType', 'ServiceLevel', 'QosType', @@ -206,4 +208,5 @@ 'SecurityStyle', 'RelationshipStatus', 'MirrorState', + 'BackupType', ] diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_azure_net_app_files_management_client_enums.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_azure_net_app_files_management_client_enums.py index a7560ff7b2cf9..7d17bd631b1c0 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_azure_net_app_files_management_client_enums.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_azure_net_app_files_management_client_enums.py @@ -43,11 +43,6 @@ class ActiveDirectoryStatus(str, Enum): updating = "Updating" #: Active Directory Updating -class KeySource(str, Enum): - - microsoft_net_app = "Microsoft.NetApp" #: The service manages the keys. - - class CreatedByType(str, Enum): user = "User" @@ -99,3 +94,9 @@ class MirrorState(str, Enum): uninitialized = "Uninitialized" mirrored = "Mirrored" broken = "Broken" + + +class BackupType(str, Enum): + + manual = "Manual" #: Manual backup + scheduled = "Scheduled" #: Scheduled backup 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 1378f4a3e679d..63f19ebbcfe49 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 @@ -17,8 +17,8 @@ class AccountEncryption(Model): """Encryption settings. :param key_source: Encryption Key Source. Possible values are: - 'Microsoft.NetApp'. Possible values include: 'Microsoft.NetApp' - :type key_source: str or ~azure.mgmt.netapp.models.KeySource + 'Microsoft.NetApp'. + :type key_source: str """ _attribute_map = { @@ -91,6 +91,9 @@ class ActiveDirectory(Model): :param ldap_over_tls: Specifies whether or not the LDAP traffic needs to be secured via TLS. :type ldap_over_tls: bool + :param allow_local_nfs_users_with_ldap: If enabled, NFS client local + users can also (in addition to LDAP users) access the NFS volumes. + :type allow_local_nfs_users_with_ldap: bool """ _validation = { @@ -121,6 +124,7 @@ class ActiveDirectory(Model): 'ldap_signing': {'key': 'ldapSigning', 'type': 'bool'}, 'security_operators': {'key': 'securityOperators', 'type': '[str]'}, 'ldap_over_tls': {'key': 'ldapOverTLS', 'type': 'bool'}, + 'allow_local_nfs_users_with_ldap': {'key': 'allowLocalNfsUsersWithLdap', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -143,6 +147,7 @@ def __init__(self, **kwargs): self.ldap_signing = kwargs.get('ldap_signing', None) self.security_operators = kwargs.get('security_operators', None) self.ldap_over_tls = kwargs.get('ldap_over_tls', None) + self.allow_local_nfs_users_with_ldap = kwargs.get('allow_local_nfs_users_with_ldap', None) class AuthorizeRequest(Model): @@ -187,10 +192,17 @@ class Backup(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: backupType. 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. Default value: False . + :type use_existing_snapshot: bool """ _validation = { @@ -204,6 +216,7 @@ class Backup(Model): 'size': {'readonly': True}, 'backup_type': {'readonly': True}, 'failure_reason': {'readonly': True}, + 'volume_name': {'readonly': True}, } _attribute_map = { @@ -218,6 +231,8 @@ class Backup(Model): 'label': {'key': 'properties.label', 'type': 'str'}, '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__(self, **kwargs): @@ -233,6 +248,8 @@ def __init__(self, **kwargs): self.label = kwargs.get('label', None) self.backup_type = None self.failure_reason = None + self.volume_name = None + self.use_existing_snapshot = kwargs.get('use_existing_snapshot', False) class BackupPatch(Model): @@ -253,10 +270,17 @@ class BackupPatch(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: backupType. 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. Default value: False . + :type use_existing_snapshot: bool """ _validation = { @@ -266,6 +290,7 @@ class BackupPatch(Model): 'size': {'readonly': True}, 'backup_type': {'readonly': True}, 'failure_reason': {'readonly': True}, + 'volume_name': {'readonly': True}, } _attribute_map = { @@ -277,6 +302,8 @@ class BackupPatch(Model): 'label': {'key': 'properties.label', 'type': 'str'}, '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__(self, **kwargs): @@ -289,6 +316,8 @@ def __init__(self, **kwargs): self.label = kwargs.get('label', None) self.backup_type = None self.failure_reason = None + self.volume_name = None + self.use_existing_snapshot = kwargs.get('use_existing_snapshot', False) class BackupPolicy(Model): @@ -531,20 +560,51 @@ def __init__(self, **kwargs): self.volume_backups = kwargs.get('volume_backups', None) -class BackupsList(Model): - """List of Backups. +class BackupStatus(Model): + """Backup status. - :param value: A list of Backups - :type value: list[~azure.mgmt.netapp.models.Backup] + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar healthy: Backup health status + :vartype healthy: bool + :ivar relationship_status: Status of the backup mirror relationship. + Possible values include: 'Idle', 'Transferring' + :vartype relationship_status: str or + ~azure.mgmt.netapp.models.RelationshipStatus + :ivar mirror_state: The status of the backup. Possible values include: + 'Uninitialized', 'Mirrored', 'Broken' + :vartype mirror_state: str or ~azure.mgmt.netapp.models.MirrorState + :ivar unhealthy_reason: Reason for the unhealthy backup relationship + :vartype unhealthy_reason: str + :ivar error_message: Displays error message if the backup is in an error + state + :vartype error_message: str """ + _validation = { + 'healthy': {'readonly': True}, + 'relationship_status': {'readonly': True}, + 'mirror_state': {'readonly': True}, + 'unhealthy_reason': {'readonly': True}, + 'error_message': {'readonly': True}, + } + _attribute_map = { - 'value': {'key': 'value', 'type': '[Backup]'}, + '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'}, } def __init__(self, **kwargs): - super(BackupsList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + super(BackupStatus, self).__init__(**kwargs) + self.healthy = None + self.relationship_status = None + self.mirror_state = None + self.unhealthy_reason = None + self.error_message = None class BreakReplicationRequest(Model): @@ -1442,6 +1502,39 @@ def __init__(self, **kwargs): self.error_message = kwargs.get('error_message', None) +class ResourceIdentity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: Object id of the identity resource + :vartype principal_id: str + :ivar tenant_id: The tenant id of the resource + :vartype tenant_id: str + :param type: Type of Identity. Supported values are: 'None', + 'SystemAssigned' + :type type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + class ResourceNameAvailabilityRequest(Model): """Resource name availability request content. @@ -1568,8 +1661,6 @@ class SnapshotPolicy(Model): :vartype type: str :param tags: Resource tags :type tags: dict[str, str] - :ivar name1: Snapshot policy name - :vartype name1: str :param hourly_schedule: hourlySchedule. Schedule for hourly snapshots :type hourly_schedule: ~azure.mgmt.netapp.models.HourlySchedule :param daily_schedule: dailySchedule. Schedule for daily snapshots @@ -1589,7 +1680,6 @@ class SnapshotPolicy(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1599,7 +1689,6 @@ class SnapshotPolicy(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'hourly_schedule': {'key': 'properties.hourlySchedule', 'type': 'HourlySchedule'}, 'daily_schedule': {'key': 'properties.dailySchedule', 'type': 'DailySchedule'}, 'weekly_schedule': {'key': 'properties.weeklySchedule', 'type': 'WeeklySchedule'}, @@ -1615,7 +1704,6 @@ def __init__(self, **kwargs): self.name = None self.type = None self.tags = kwargs.get('tags', None) - self.name1 = None self.hourly_schedule = kwargs.get('hourly_schedule', None) self.daily_schedule = kwargs.get('daily_schedule', None) self.weekly_schedule = kwargs.get('weekly_schedule', None) @@ -1640,8 +1728,6 @@ class SnapshotPolicyDetails(Model): :vartype type: str :param tags: Resource tags :type tags: dict[str, str] - :ivar name1: Snapshot policy name - :vartype name1: str :param hourly_schedule: hourlySchedule. Schedule for hourly snapshots :type hourly_schedule: ~azure.mgmt.netapp.models.HourlySchedule :param daily_schedule: dailySchedule. Schedule for daily snapshots @@ -1660,7 +1746,6 @@ class SnapshotPolicyDetails(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1670,7 +1755,6 @@ class SnapshotPolicyDetails(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'hourly_schedule': {'key': 'properties.hourlySchedule', 'type': 'HourlySchedule'}, 'daily_schedule': {'key': 'properties.dailySchedule', 'type': 'DailySchedule'}, 'weekly_schedule': {'key': 'properties.weeklySchedule', 'type': 'WeeklySchedule'}, @@ -1686,7 +1770,6 @@ def __init__(self, **kwargs): self.name = None self.type = None self.tags = kwargs.get('tags', None) - self.name1 = None self.hourly_schedule = kwargs.get('hourly_schedule', None) self.daily_schedule = kwargs.get('daily_schedule', None) self.weekly_schedule = kwargs.get('weekly_schedule', None) @@ -1711,8 +1794,6 @@ class SnapshotPolicyPatch(Model): :vartype type: str :param tags: Resource tags :type tags: dict[str, str] - :ivar name1: Snapshot policy name - :vartype name1: str :param hourly_schedule: hourlySchedule. Schedule for hourly snapshots :type hourly_schedule: ~azure.mgmt.netapp.models.HourlySchedule :param daily_schedule: dailySchedule. Schedule for daily snapshots @@ -1731,7 +1812,6 @@ class SnapshotPolicyPatch(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1741,7 +1821,6 @@ class SnapshotPolicyPatch(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'hourly_schedule': {'key': 'properties.hourlySchedule', 'type': 'HourlySchedule'}, 'daily_schedule': {'key': 'properties.dailySchedule', 'type': 'DailySchedule'}, 'weekly_schedule': {'key': 'properties.weeklySchedule', 'type': 'WeeklySchedule'}, @@ -1757,7 +1836,6 @@ def __init__(self, **kwargs): self.name = None self.type = None self.tags = kwargs.get('tags', None) - self.name1 = None self.hourly_schedule = kwargs.get('hourly_schedule', None) self.daily_schedule = kwargs.get('daily_schedule', None) self.weekly_schedule = kwargs.get('weekly_schedule', None) @@ -1902,7 +1980,7 @@ class Volume(Model): :type export_policy: ~azure.mgmt.netapp.models.VolumePropertiesExportPolicy :param protocol_types: protocolTypes. Set of protocol types, default - NFSv3, CIFS fro SMB protocol + NFSv3, CIFS for SMB protocol :type protocol_types: list[str] :ivar provisioning_state: Azure lifecycle management :vartype provisioning_state: str @@ -1954,6 +2032,9 @@ class Volume(Model): :param encryption_key_source: Encryption Key Source. Possible values are: 'Microsoft.NetApp' :type encryption_key_source: str + :param ldap_enabled: Specifies whether LDAP is enabled or not for a given + NFS volume. Default value: False . + :type ldap_enabled: bool """ _validation = { @@ -1970,7 +2051,7 @@ class Volume(Model): 'baremetal_tenant_id': {'readonly': True}, 'subnet_id': {'required': True}, 'mount_targets': {'readonly': True}, - 'throughput_mibps': {'maximum': 4500, 'minimum': 0, 'multiple': 0.001}, + 'throughput_mibps': {'maximum': 4500, 'minimum': 0}, } _attribute_map = { @@ -2001,6 +2082,7 @@ class Volume(Model): 'smb_continuously_available': {'key': 'properties.smbContinuouslyAvailable', 'type': 'bool'}, 'throughput_mibps': {'key': 'properties.throughputMibps', 'type': 'float'}, 'encryption_key_source': {'key': 'properties.encryptionKeySource', 'type': 'str'}, + 'ldap_enabled': {'key': 'properties.ldapEnabled', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -2032,6 +2114,7 @@ def __init__(self, **kwargs): self.smb_continuously_available = kwargs.get('smb_continuously_available', False) self.throughput_mibps = kwargs.get('throughput_mibps', 0) self.encryption_key_source = kwargs.get('encryption_key_source', None) + self.ldap_enabled = kwargs.get('ldap_enabled', False) class VolumeBackupProperties(Model): @@ -2128,7 +2211,7 @@ class VolumePatch(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'usage_threshold': {'maximum': 109951162777600, 'minimum': 107374182400}, - 'throughput_mibps': {'maximum': 4500, 'minimum': 1, 'multiple': 0.001}, + 'throughput_mibps': {'maximum': 4500, 'minimum': 1}, } _attribute_map = { @@ -2166,15 +2249,19 @@ class VolumePatchPropertiesDataProtection(Model): :param backup: Backup. Backup Properties :type backup: ~azure.mgmt.netapp.models.VolumeBackupProperties + :param snapshot: 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, **kwargs): super(VolumePatchPropertiesDataProtection, self).__init__(**kwargs) self.backup = kwargs.get('backup', None) + self.snapshot = kwargs.get('snapshot', None) class VolumePatchPropertiesExportPolicy(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 11f939139cd0d..fca58e944d414 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 @@ -17,15 +17,15 @@ class AccountEncryption(Model): """Encryption settings. :param key_source: Encryption Key Source. Possible values are: - 'Microsoft.NetApp'. Possible values include: 'Microsoft.NetApp' - :type key_source: str or ~azure.mgmt.netapp.models.KeySource + 'Microsoft.NetApp'. + :type key_source: str """ _attribute_map = { 'key_source': {'key': 'keySource', 'type': 'str'}, } - def __init__(self, *, key_source=None, **kwargs) -> None: + def __init__(self, *, key_source: str=None, **kwargs) -> None: super(AccountEncryption, self).__init__(**kwargs) self.key_source = key_source @@ -91,6 +91,9 @@ class ActiveDirectory(Model): :param ldap_over_tls: Specifies whether or not the LDAP traffic needs to be secured via TLS. :type ldap_over_tls: bool + :param allow_local_nfs_users_with_ldap: If enabled, NFS client local + users can also (in addition to LDAP users) access the NFS volumes. + :type allow_local_nfs_users_with_ldap: bool """ _validation = { @@ -121,9 +124,10 @@ class ActiveDirectory(Model): 'ldap_signing': {'key': 'ldapSigning', 'type': 'bool'}, 'security_operators': {'key': 'securityOperators', 'type': '[str]'}, 'ldap_over_tls': {'key': 'ldapOverTLS', 'type': 'bool'}, + 'allow_local_nfs_users_with_ldap': {'key': 'allowLocalNfsUsersWithLdap', 'type': 'bool'}, } - def __init__(self, *, active_directory_id: str=None, username: str=None, password: str=None, domain: str=None, dns: str=None, smb_server_name: str=None, organizational_unit: str="CN=Computers", site: str=None, backup_operators=None, kdc_ip: str=None, ad_name: str=None, server_root_ca_certificate: str=None, aes_encryption: bool=None, ldap_signing: bool=None, security_operators=None, ldap_over_tls: bool=None, **kwargs) -> None: + def __init__(self, *, active_directory_id: str=None, username: str=None, password: str=None, domain: str=None, dns: str=None, smb_server_name: str=None, organizational_unit: str="CN=Computers", site: str=None, backup_operators=None, kdc_ip: str=None, ad_name: str=None, server_root_ca_certificate: str=None, aes_encryption: bool=None, ldap_signing: bool=None, security_operators=None, ldap_over_tls: bool=None, allow_local_nfs_users_with_ldap: bool=None, **kwargs) -> None: super(ActiveDirectory, self).__init__(**kwargs) self.active_directory_id = active_directory_id self.username = username @@ -143,6 +147,7 @@ def __init__(self, *, active_directory_id: str=None, username: str=None, passwor self.ldap_signing = ldap_signing self.security_operators = security_operators self.ldap_over_tls = ldap_over_tls + self.allow_local_nfs_users_with_ldap = allow_local_nfs_users_with_ldap class AuthorizeRequest(Model): @@ -187,10 +192,17 @@ class Backup(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: backupType. 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. Default value: False . + :type use_existing_snapshot: bool """ _validation = { @@ -204,6 +216,7 @@ class Backup(Model): 'size': {'readonly': True}, 'backup_type': {'readonly': True}, 'failure_reason': {'readonly': True}, + 'volume_name': {'readonly': True}, } _attribute_map = { @@ -218,9 +231,11 @@ class Backup(Model): 'label': {'key': 'properties.label', 'type': 'str'}, '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__(self, *, location: str, label: str=None, **kwargs) -> None: + def __init__(self, *, location: str, label: str=None, use_existing_snapshot: bool=False, **kwargs) -> None: super(Backup, self).__init__(**kwargs) self.location = location self.id = None @@ -233,6 +248,8 @@ def __init__(self, *, location: str, label: str=None, **kwargs) -> None: self.label = label self.backup_type = None self.failure_reason = None + self.volume_name = None + self.use_existing_snapshot = use_existing_snapshot class BackupPatch(Model): @@ -253,10 +270,17 @@ class BackupPatch(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: backupType. 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. Default value: False . + :type use_existing_snapshot: bool """ _validation = { @@ -266,6 +290,7 @@ class BackupPatch(Model): 'size': {'readonly': True}, 'backup_type': {'readonly': True}, 'failure_reason': {'readonly': True}, + 'volume_name': {'readonly': True}, } _attribute_map = { @@ -277,9 +302,11 @@ class BackupPatch(Model): 'label': {'key': 'properties.label', 'type': 'str'}, '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__(self, *, tags=None, label: str=None, **kwargs) -> None: + def __init__(self, *, tags=None, label: str=None, use_existing_snapshot: bool=False, **kwargs) -> None: super(BackupPatch, self).__init__(**kwargs) self.tags = tags self.backup_id = None @@ -289,6 +316,8 @@ def __init__(self, *, tags=None, label: str=None, **kwargs) -> None: self.label = label self.backup_type = None self.failure_reason = None + self.volume_name = None + self.use_existing_snapshot = use_existing_snapshot class BackupPolicy(Model): @@ -531,20 +560,51 @@ def __init__(self, *, location: str=None, tags=None, daily_backups_to_keep: int= self.volume_backups = volume_backups -class BackupsList(Model): - """List of Backups. +class BackupStatus(Model): + """Backup status. - :param value: A list of Backups - :type value: list[~azure.mgmt.netapp.models.Backup] + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar healthy: Backup health status + :vartype healthy: bool + :ivar relationship_status: Status of the backup mirror relationship. + Possible values include: 'Idle', 'Transferring' + :vartype relationship_status: str or + ~azure.mgmt.netapp.models.RelationshipStatus + :ivar mirror_state: The status of the backup. Possible values include: + 'Uninitialized', 'Mirrored', 'Broken' + :vartype mirror_state: str or ~azure.mgmt.netapp.models.MirrorState + :ivar unhealthy_reason: Reason for the unhealthy backup relationship + :vartype unhealthy_reason: str + :ivar error_message: Displays error message if the backup is in an error + state + :vartype error_message: str """ + _validation = { + 'healthy': {'readonly': True}, + 'relationship_status': {'readonly': True}, + 'mirror_state': {'readonly': True}, + 'unhealthy_reason': {'readonly': True}, + 'error_message': {'readonly': True}, + } + _attribute_map = { - 'value': {'key': 'value', 'type': '[Backup]'}, + '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'}, } - def __init__(self, *, value=None, **kwargs) -> None: - super(BackupsList, self).__init__(**kwargs) - self.value = value + def __init__(self, **kwargs) -> None: + super(BackupStatus, self).__init__(**kwargs) + self.healthy = None + self.relationship_status = None + self.mirror_state = None + self.unhealthy_reason = None + self.error_message = None class BreakReplicationRequest(Model): @@ -1442,6 +1502,39 @@ def __init__(self, *, healthy: bool=None, relationship_status=None, mirror_state self.error_message = error_message +class ResourceIdentity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: Object id of the identity resource + :vartype principal_id: str + :ivar tenant_id: The tenant id of the resource + :vartype tenant_id: str + :param type: Type of Identity. Supported values are: 'None', + 'SystemAssigned' + :type type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, type: str=None, **kwargs) -> None: + super(ResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + class ResourceNameAvailabilityRequest(Model): """Resource name availability request content. @@ -1568,8 +1661,6 @@ class SnapshotPolicy(Model): :vartype type: str :param tags: Resource tags :type tags: dict[str, str] - :ivar name1: Snapshot policy name - :vartype name1: str :param hourly_schedule: hourlySchedule. Schedule for hourly snapshots :type hourly_schedule: ~azure.mgmt.netapp.models.HourlySchedule :param daily_schedule: dailySchedule. Schedule for daily snapshots @@ -1589,7 +1680,6 @@ class SnapshotPolicy(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1599,7 +1689,6 @@ class SnapshotPolicy(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'hourly_schedule': {'key': 'properties.hourlySchedule', 'type': 'HourlySchedule'}, 'daily_schedule': {'key': 'properties.dailySchedule', 'type': 'DailySchedule'}, 'weekly_schedule': {'key': 'properties.weeklySchedule', 'type': 'WeeklySchedule'}, @@ -1615,7 +1704,6 @@ def __init__(self, *, location: str, tags=None, hourly_schedule=None, daily_sche self.name = None self.type = None self.tags = tags - self.name1 = None self.hourly_schedule = hourly_schedule self.daily_schedule = daily_schedule self.weekly_schedule = weekly_schedule @@ -1640,8 +1728,6 @@ class SnapshotPolicyDetails(Model): :vartype type: str :param tags: Resource tags :type tags: dict[str, str] - :ivar name1: Snapshot policy name - :vartype name1: str :param hourly_schedule: hourlySchedule. Schedule for hourly snapshots :type hourly_schedule: ~azure.mgmt.netapp.models.HourlySchedule :param daily_schedule: dailySchedule. Schedule for daily snapshots @@ -1660,7 +1746,6 @@ class SnapshotPolicyDetails(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1670,7 +1755,6 @@ class SnapshotPolicyDetails(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'hourly_schedule': {'key': 'properties.hourlySchedule', 'type': 'HourlySchedule'}, 'daily_schedule': {'key': 'properties.dailySchedule', 'type': 'DailySchedule'}, 'weekly_schedule': {'key': 'properties.weeklySchedule', 'type': 'WeeklySchedule'}, @@ -1686,7 +1770,6 @@ def __init__(self, *, location: str=None, tags=None, hourly_schedule=None, daily self.name = None self.type = None self.tags = tags - self.name1 = None self.hourly_schedule = hourly_schedule self.daily_schedule = daily_schedule self.weekly_schedule = weekly_schedule @@ -1711,8 +1794,6 @@ class SnapshotPolicyPatch(Model): :vartype type: str :param tags: Resource tags :type tags: dict[str, str] - :ivar name1: Snapshot policy name - :vartype name1: str :param hourly_schedule: hourlySchedule. Schedule for hourly snapshots :type hourly_schedule: ~azure.mgmt.netapp.models.HourlySchedule :param daily_schedule: dailySchedule. Schedule for daily snapshots @@ -1731,7 +1812,6 @@ class SnapshotPolicyPatch(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1741,7 +1821,6 @@ class SnapshotPolicyPatch(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'hourly_schedule': {'key': 'properties.hourlySchedule', 'type': 'HourlySchedule'}, 'daily_schedule': {'key': 'properties.dailySchedule', 'type': 'DailySchedule'}, 'weekly_schedule': {'key': 'properties.weeklySchedule', 'type': 'WeeklySchedule'}, @@ -1757,7 +1836,6 @@ def __init__(self, *, location: str=None, tags=None, hourly_schedule=None, daily self.name = None self.type = None self.tags = tags - self.name1 = None self.hourly_schedule = hourly_schedule self.daily_schedule = daily_schedule self.weekly_schedule = weekly_schedule @@ -1902,7 +1980,7 @@ class Volume(Model): :type export_policy: ~azure.mgmt.netapp.models.VolumePropertiesExportPolicy :param protocol_types: protocolTypes. Set of protocol types, default - NFSv3, CIFS fro SMB protocol + NFSv3, CIFS for SMB protocol :type protocol_types: list[str] :ivar provisioning_state: Azure lifecycle management :vartype provisioning_state: str @@ -1954,6 +2032,9 @@ class Volume(Model): :param encryption_key_source: Encryption Key Source. Possible values are: 'Microsoft.NetApp' :type encryption_key_source: str + :param ldap_enabled: Specifies whether LDAP is enabled or not for a given + NFS volume. Default value: False . + :type ldap_enabled: bool """ _validation = { @@ -1970,7 +2051,7 @@ class Volume(Model): 'baremetal_tenant_id': {'readonly': True}, 'subnet_id': {'required': True}, 'mount_targets': {'readonly': True}, - 'throughput_mibps': {'maximum': 4500, 'minimum': 0, 'multiple': 0.001}, + 'throughput_mibps': {'maximum': 4500, 'minimum': 0}, } _attribute_map = { @@ -2001,9 +2082,10 @@ class Volume(Model): 'smb_continuously_available': {'key': 'properties.smbContinuouslyAvailable', 'type': 'bool'}, 'throughput_mibps': {'key': 'properties.throughputMibps', 'type': 'float'}, 'encryption_key_source': {'key': 'properties.encryptionKeySource', 'type': 'str'}, + 'ldap_enabled': {'key': 'properties.ldapEnabled', 'type': 'bool'}, } - def __init__(self, *, location: str, creation_token: str, subnet_id: str, tags=None, service_level="Premium", usage_threshold: int=107374182400, export_policy=None, protocol_types=None, snapshot_id: str=None, backup_id: str=None, volume_type: str=None, data_protection=None, is_restoring: bool=None, snapshot_directory_visible: bool=True, kerberos_enabled: bool=False, security_style="unix", smb_encryption: bool=False, smb_continuously_available: bool=False, throughput_mibps: float=0, encryption_key_source: str=None, **kwargs) -> None: + def __init__(self, *, location: str, creation_token: str, subnet_id: str, tags=None, service_level="Premium", usage_threshold: int=107374182400, export_policy=None, protocol_types=None, snapshot_id: str=None, backup_id: str=None, volume_type: str=None, data_protection=None, is_restoring: bool=None, snapshot_directory_visible: bool=True, kerberos_enabled: bool=False, security_style="unix", smb_encryption: bool=False, smb_continuously_available: bool=False, throughput_mibps: float=0, encryption_key_source: str=None, ldap_enabled: bool=False, **kwargs) -> None: super(Volume, self).__init__(**kwargs) self.location = location self.id = None @@ -2032,6 +2114,7 @@ def __init__(self, *, location: str, creation_token: str, subnet_id: str, tags=N self.smb_continuously_available = smb_continuously_available self.throughput_mibps = throughput_mibps self.encryption_key_source = encryption_key_source + self.ldap_enabled = ldap_enabled class VolumeBackupProperties(Model): @@ -2128,7 +2211,7 @@ class VolumePatch(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'usage_threshold': {'maximum': 109951162777600, 'minimum': 107374182400}, - 'throughput_mibps': {'maximum': 4500, 'minimum': 1, 'multiple': 0.001}, + 'throughput_mibps': {'maximum': 4500, 'minimum': 1}, } _attribute_map = { @@ -2166,15 +2249,19 @@ class VolumePatchPropertiesDataProtection(Model): :param backup: Backup. Backup Properties :type backup: ~azure.mgmt.netapp.models.VolumeBackupProperties + :param snapshot: 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=None, **kwargs) -> None: + def __init__(self, *, backup=None, snapshot=None, **kwargs) -> None: super(VolumePatchPropertiesDataProtection, self).__init__(**kwargs) self.backup = backup + self.snapshot = snapshot class VolumePatchPropertiesExportPolicy(Model): 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 3a28d1ebfc0c9..d47157eb5a07c 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 @@ -16,8 +16,8 @@ from ._volumes_operations import VolumesOperations from ._snapshots_operations import SnapshotsOperations from ._snapshot_policies_operations import SnapshotPoliciesOperations -from ._account_backups_operations import AccountBackupsOperations from ._backups_operations import BackupsOperations +from ._account_backups_operations import AccountBackupsOperations from ._backup_policies_operations import BackupPoliciesOperations from ._vaults_operations import VaultsOperations @@ -29,8 +29,8 @@ 'VolumesOperations', 'SnapshotsOperations', 'SnapshotPoliciesOperations', - 'AccountBackupsOperations', 'BackupsOperations', + '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 b714a6bc8d943..623e4d5248139 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 @@ -27,7 +27,7 @@ class AccountBackupsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-11-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-02-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-11-01" + self.api_version = "2021-02-01" self.config = config @@ -56,50 +56,61 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: BackupsList or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.netapp.models.BackupsList or - ~msrest.pipeline.ClientRawResponse + :return: An iterator like instance of Backup + :rtype: + ~azure.mgmt.netapp.models.BackupPaged[~azure.mgmt.netapp.models.Backup] :raises: :class:`CloudError` """ - # Construct URL - url = self.list.metadata['url'] - 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupsList', response) - + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + header_dict = {} + deserialized = models.BackupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups'} @@ -108,7 +119,7 @@ def get( self, resource_group_name, account_name, backup_name, custom_headers=None, raw=False, **operation_config): """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 @@ -213,7 +224,7 @@ def delete( self, resource_group_name, account_name, backup_name, custom_headers=None, raw=False, polling=True, **operation_config): """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 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 9c4b7e3c424f6..29c26cbf9cef7 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 @@ -27,7 +27,7 @@ class AccountsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-11-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-02-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-11-01" + self.api_version = "2021-02-01" self.config = config 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 ea98049b54715..54d65fc01a9a6 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 @@ -27,7 +27,7 @@ class BackupPoliciesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-11-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-02-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-11-01" + self.api_version = "2021-02-01" self.config = config @@ -292,32 +292,9 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}'} - def update( - self, resource_group_name, account_name, backup_policy_name, body, custom_headers=None, raw=False, **operation_config): - """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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.netapp.models.BackupPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _update_initial( + self, resource_group_name, account_name, backup_policy_name, body, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.update.metadata['url'] path_format_arguments = { @@ -356,6 +333,7 @@ def update( raise exp deserialized = None + if response.status_code == 200: deserialized = self._deserialize('BackupPolicy', response) if response.status_code == 202: @@ -366,6 +344,62 @@ def update( return client_raw_response return deserialized + + def update( + self, resource_group_name, account_name, backup_policy_name, body, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns BackupPolicy or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.netapp.models.BackupPolicy] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.netapp.models.BackupPolicy]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + backup_policy_name=backup_policy_name, + body=body, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('BackupPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}'} 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 b88d14670fd34..ace71aa4bcdd3 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 @@ -27,7 +27,7 @@ class BackupsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-11-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-02-01". """ models = models @@ -37,10 +37,79 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-11-01" + self.api_version = "2021-02-01" self.config = config + def get_status( + self, resource_group_name, account_name, pool_name, volume_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.netapp.models.BackupStatus or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_status.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus'} + def list( self, resource_group_name, account_name, pool_name, volume_name, custom_headers=None, raw=False, **operation_config): """List Backups. @@ -125,7 +194,7 @@ def get( self, resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers=None, raw=False, **operation_config): """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 @@ -195,9 +264,7 @@ def get( def _create_initial( - self, resource_group_name, account_name, pool_name, volume_name, backup_name, location, label=None, custom_headers=None, raw=False, **operation_config): - body = models.Backup(location=location, label=label) - + self, resource_group_name, account_name, pool_name, volume_name, backup_name, body, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create.metadata['url'] path_format_arguments = { @@ -251,7 +318,7 @@ def _create_initial( return deserialized def create( - self, resource_group_name, account_name, pool_name, volume_name, backup_name, location, label=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, pool_name, volume_name, backup_name, body, custom_headers=None, raw=False, polling=True, **operation_config): """Create a backup. Create a backup for the volume. @@ -266,10 +333,8 @@ def create( :type volume_name: str :param backup_name: The name of the backup :type backup_name: str - :param location: Resource location - :type location: str - :param label: Label for backup - :type label: str + :param body: Backup object supplied in the body of the operation. + :type body: ~azure.mgmt.netapp.models.Backup :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -289,8 +354,7 @@ def create( pool_name=pool_name, volume_name=volume_name, backup_name=backup_name, - location=location, - label=label, + body=body, custom_headers=custom_headers, raw=True, **operation_config @@ -316,11 +380,7 @@ def get_long_running_output(response): def _update_initial( - self, resource_group_name, account_name, pool_name, volume_name, backup_name, tags=None, label=None, custom_headers=None, raw=False, **operation_config): - body = None - if tags is not None or label is not None: - body = models.BackupPatch(tags=tags, label=label) - + self, resource_group_name, account_name, pool_name, volume_name, backup_name, body=None, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.update.metadata['url'] path_format_arguments = { @@ -377,7 +437,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, account_name, pool_name, volume_name, backup_name, tags=None, label=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, pool_name, volume_name, backup_name, body=None, custom_headers=None, raw=False, polling=True, **operation_config): """Patch a backup. Patch a backup for the volume. @@ -392,10 +452,8 @@ def update( :type volume_name: str :param backup_name: The name of the backup :type backup_name: str - :param tags: Resource tags - :type tags: dict[str, str] - :param label: Label for backup - :type label: str + :param body: Backup object supplied in the body of the operation. + :type body: ~azure.mgmt.netapp.models.BackupPatch :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -415,8 +473,7 @@ def update( pool_name=pool_name, volume_name=volume_name, backup_name=backup_name, - tags=tags, - label=label, + body=body, custom_headers=custom_headers, raw=True, **operation_config 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 c098ac603f343..4ffe02f1197bb 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 @@ -25,7 +25,7 @@ class NetAppResourceOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-11-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-02-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-11-01" + self.api_version = "2021-02-01" self.config = config diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py index 5f5ec96c46ad3..67e356abbfca3 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 @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-11-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-02-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-11-01" + self.api_version = "2021-02-01" self.config = config diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py index c8ff286c0dde2..ce5fc2328feb8 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 @@ -27,7 +27,7 @@ class PoolsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-11-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-02-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-11-01" + self.api_version = "2021-02-01" self.config = config 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 15b9d46120158..dfeab3ce161de 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 @@ -27,7 +27,7 @@ class SnapshotPoliciesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-11-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-02-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-11-01" + self.api_version = "2021-02-01" self.config = config 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 169d247540c03..5c8cc4ca0f3a4 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 @@ -27,7 +27,7 @@ class SnapshotsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-11-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-02-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-11-01" + self.api_version = "2021-02-01" self.config = config 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 8a87b9ee533eb..7482100241f00 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 @@ -25,7 +25,7 @@ class VaultsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-11-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-02-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-11-01" + self.api_version = "2021-02-01" self.config = config 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 50cc6baa0ca5d..196d748bdec52 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 @@ -27,7 +27,7 @@ class VolumesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-11-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-02-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-11-01" + self.api_version = "2021-02-01" self.config = config @@ -590,7 +590,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) @@ -694,7 +694,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) @@ -854,7 +854,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) @@ -944,7 +944,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) @@ -1042,7 +1042,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) @@ -1131,7 +1131,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) @@ -1229,7 +1229,7 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method)