From 168e05d2ddf60be0c33a55277b04e4a485170666 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 4 Mar 2021 14:53:45 +0000 Subject: [PATCH] CodeGen from PR 13061 in Azure/azure-rest-api-specs Merge 80c62687650e204206cafdc7ee5ed23a72aef93f into 04d3607db5a71d02e90cd60b6c353ca740c8ed75 --- .../_azure_net_app_files_management_client.py | 7 +- .../azure/mgmt/netapp/models/__init__.py | 8 +- ...e_net_app_files_management_client_enums.py | 5 - .../azure/mgmt/netapp/models/_models.py | 123 ++++++++++++++--- .../azure/mgmt/netapp/models/_models_py3.py | 129 +++++++++++++++--- .../azure/mgmt/netapp/operations/__init__.py | 2 + .../operations/_account_backups_operations.py | 4 +- .../netapp/operations/_accounts_operations.py | 4 +- .../operations/_backup_policies_operations.py | 4 +- .../netapp/operations/_backups_operations.py | 4 +- .../_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 +- .../_volume_backup_status_operations.py | 109 +++++++++++++++ .../netapp/operations/_volumes_operations.py | 18 +-- 18 files changed, 363 insertions(+), 78 deletions(-) create mode 100644 sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_backup_status_operations.py 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 ad443a7a8f1f..b038001fe5f7 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,6 +20,7 @@ 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 BackupPoliciesOperations @@ -47,6 +48,8 @@ class AzureNetAppFilesManagementClient(SDKClient): :vartype snapshots: azure.mgmt.netapp.operations.SnapshotsOperations :ivar snapshot_policies: SnapshotPolicies operations :vartype snapshot_policies: azure.mgmt.netapp.operations.SnapshotPoliciesOperations + :ivar volume_backup_status: VolumeBackupStatus operations + :vartype volume_backup_status: azure.mgmt.netapp.operations.VolumeBackupStatusOperations :ivar account_backups: AccountBackups operations :vartype account_backups: azure.mgmt.netapp.operations.AccountBackupsOperations :ivar backups: Backups operations @@ -73,7 +76,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 = '2020-12-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -91,6 +94,8 @@ 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._client, self.config, self._serialize, self._deserialize) self.account_backups = AccountBackupsOperations( self._client, self.config, self._serialize, self._deserialize) self.backups = BackupsOperations( 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 462373d489c5..cfca687def7b 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 @@ -19,6 +19,7 @@ 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 +40,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 @@ -69,6 +71,7 @@ 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 +92,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 +127,6 @@ CheckNameResourceTypes, CheckQuotaNameResourceTypes, ActiveDirectoryStatus, - KeySource, CreatedByType, ServiceLevel, QosType, @@ -144,6 +147,7 @@ 'BackupPolicyDetails', 'BackupPolicyPatch', 'BackupsList', + 'BackupStatus', 'BreakReplicationRequest', 'CapacityPool', 'CapacityPoolPatch', @@ -164,6 +168,7 @@ 'QuotaAvailabilityRequest', 'ReplicationObject', 'ReplicationStatus', + 'ResourceIdentity', 'ResourceNameAvailabilityRequest', 'ServiceSpecification', 'Snapshot', @@ -197,7 +202,6 @@ 'CheckNameResourceTypes', 'CheckQuotaNameResourceTypes', 'ActiveDirectoryStatus', - 'KeySource', 'CreatedByType', 'ServiceLevel', 'QosType', 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 a7560ff7b2cf..30718151de50 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" 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 1378f4a3e679..28aed13c3668 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_fs_users_with_ldap: If enabled, NFS client local + users can also (in addition to LDAP users) access the NFS volumes. + :type allow_local_nfs_fs_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_fs_users_with_ldap': {'key': 'allowLocalNfsFSUsersWithLdap', '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_fs_users_with_ldap = kwargs.get('allow_local_nfs_fs_users_with_ldap', None) class AuthorizeRequest(Model): @@ -191,6 +196,8 @@ class Backup(Model): :vartype backup_type: str :ivar failure_reason: Failure reason :vartype failure_reason: str + :ivar volume_name: Volume name + :vartype volume_name: str """ _validation = { @@ -204,6 +211,7 @@ class Backup(Model): 'size': {'readonly': True}, 'backup_type': {'readonly': True}, 'failure_reason': {'readonly': True}, + 'volume_name': {'readonly': True}, } _attribute_map = { @@ -218,6 +226,7 @@ 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'}, } def __init__(self, **kwargs): @@ -233,6 +242,7 @@ def __init__(self, **kwargs): self.label = kwargs.get('label', None) self.backup_type = None self.failure_reason = None + self.volume_name = None class BackupPatch(Model): @@ -257,6 +267,8 @@ class BackupPatch(Model): :vartype backup_type: str :ivar failure_reason: Failure reason :vartype failure_reason: str + :ivar volume_name: Volume name + :vartype volume_name: str """ _validation = { @@ -266,6 +278,7 @@ class BackupPatch(Model): 'size': {'readonly': True}, 'backup_type': {'readonly': True}, 'failure_reason': {'readonly': True}, + 'volume_name': {'readonly': True}, } _attribute_map = { @@ -277,6 +290,7 @@ 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'}, } def __init__(self, **kwargs): @@ -289,6 +303,7 @@ def __init__(self, **kwargs): self.label = kwargs.get('label', None) self.backup_type = None self.failure_reason = None + self.volume_name = None class BackupPolicy(Model): @@ -547,6 +562,53 @@ def __init__(self, **kwargs): self.value = kwargs.get('value', None) +class BackupStatus(Model): + """Backup status. + + 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 = { + '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(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): """Break replication request. @@ -1442,6 +1504,39 @@ def __init__(self, **kwargs): self.error_message = kwargs.get('error_message', None) +class ResourceIdentity(Model): + """ResourceIdentity. + + 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 +1663,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 +1682,6 @@ class SnapshotPolicy(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1599,7 +1691,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 +1706,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 +1730,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 +1748,6 @@ class SnapshotPolicyDetails(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1670,7 +1757,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 +1772,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 +1796,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 +1814,6 @@ class SnapshotPolicyPatch(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1741,7 +1823,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 +1838,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) @@ -1954,6 +2034,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 +2053,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 +2084,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 +2116,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 +2213,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 = { 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 11f939139cd0..81e5f08b4234 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_fs_users_with_ldap: If enabled, NFS client local + users can also (in addition to LDAP users) access the NFS volumes. + :type allow_local_nfs_fs_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_fs_users_with_ldap': {'key': 'allowLocalNfsFSUsersWithLdap', '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_fs_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_fs_users_with_ldap = allow_local_nfs_fs_users_with_ldap class AuthorizeRequest(Model): @@ -191,6 +196,8 @@ class Backup(Model): :vartype backup_type: str :ivar failure_reason: Failure reason :vartype failure_reason: str + :ivar volume_name: Volume name + :vartype volume_name: str """ _validation = { @@ -204,6 +211,7 @@ class Backup(Model): 'size': {'readonly': True}, 'backup_type': {'readonly': True}, 'failure_reason': {'readonly': True}, + 'volume_name': {'readonly': True}, } _attribute_map = { @@ -218,6 +226,7 @@ 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'}, } def __init__(self, *, location: str, label: str=None, **kwargs) -> None: @@ -233,6 +242,7 @@ 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 class BackupPatch(Model): @@ -257,6 +267,8 @@ class BackupPatch(Model): :vartype backup_type: str :ivar failure_reason: Failure reason :vartype failure_reason: str + :ivar volume_name: Volume name + :vartype volume_name: str """ _validation = { @@ -266,6 +278,7 @@ class BackupPatch(Model): 'size': {'readonly': True}, 'backup_type': {'readonly': True}, 'failure_reason': {'readonly': True}, + 'volume_name': {'readonly': True}, } _attribute_map = { @@ -277,6 +290,7 @@ 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'}, } def __init__(self, *, tags=None, label: str=None, **kwargs) -> None: @@ -289,6 +303,7 @@ 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 class BackupPolicy(Model): @@ -547,6 +562,53 @@ def __init__(self, *, value=None, **kwargs) -> None: self.value = value +class BackupStatus(Model): + """Backup status. + + 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 = { + '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) -> 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): """Break replication request. @@ -1442,6 +1504,39 @@ def __init__(self, *, healthy: bool=None, relationship_status=None, mirror_state self.error_message = error_message +class ResourceIdentity(Model): + """ResourceIdentity. + + 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 +1663,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 +1682,6 @@ class SnapshotPolicy(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1599,7 +1691,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 +1706,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 +1730,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 +1748,6 @@ class SnapshotPolicyDetails(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1670,7 +1757,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 +1772,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 +1796,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 +1814,6 @@ class SnapshotPolicyPatch(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1741,7 +1823,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 +1838,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 @@ -1954,6 +2034,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 +2053,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 +2084,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 +2116,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 +2213,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 = { 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 3a28d1ebfc0c..aef160768ee6 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,6 +16,7 @@ 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 ._backup_policies_operations import BackupPoliciesOperations @@ -29,6 +30,7 @@ 'VolumesOperations', 'SnapshotsOperations', 'SnapshotPoliciesOperations', + 'VolumeBackupStatusOperations', 'AccountBackupsOperations', 'BackupsOperations', 'BackupPoliciesOperations', 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 b714a6bc8d94..c8c8f7d45dda 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: "2020-12-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 = "2020-12-01" self.config = config 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 9c4b7e3c424f..85f6246cd59a 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: "2020-12-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 = "2020-12-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 ea98049b5471..b1332a096edd 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: "2020-12-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 = "2020-12-01" self.config = config 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 b88d14670fd3..a7bfe331e1b8 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: "2020-12-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 = "2020-12-01" self.config = 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 c098ac603f34..beeef54422b6 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: "2020-12-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 = "2020-12-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 5f5ec96c46ad..029683c160b9 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: "2020-12-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 = "2020-12-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 c8ff286c0dde..7804dd047429 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: "2020-12-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 = "2020-12-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 15b9d4612015..1cf4c14fc6ce 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: "2020-12-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 = "2020-12-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 169d247540c0..21f1d7bb42cf 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: "2020-12-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 = "2020-12-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 8a87b9ee533e..2d424b0f7790 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: "2020-12-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 = "2020-12-01" self.config = config 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_backup_status_operations.py new file mode 100644 index 000000000000..e8ab17cf086b --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_backup_status_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VolumeBackupStatusOperations(object): + """VolumeBackupStatusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :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-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-12-01" + + self.config = config + + def get( + 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.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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus'} 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 50cc6baa0ca5..d4fff42d2095 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: "2020-12-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 = "2020-12-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)