diff --git a/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md b/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md
index d9696037270f..571c8884416f 100644
--- a/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md
+++ b/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md
@@ -1,5 +1,35 @@
# Release History
+## 15.0.0 (2026-02-12)
+
+### Features Added
+
+ - Client `NetAppManagementClient` added operation group `ransomware_reports`
+ - Model `VolumePatchPropertiesDataProtection` added property `ransomware_protection`
+ - Model `VolumePropertiesDataProtection` added property `ransomware_protection`
+ - Added enum `ActualRansomwareProtectionState`
+ - Added enum `DesiredRansomwareProtectionState`
+ - Added model `ListQuotaReportResponse`
+ - Added model `QuotaReport`
+ - Added model `QuotaReportFilterRequest`
+ - Added enum `QuotaType`
+ - Added model `RansomwareProtectionPatchSettings`
+ - Added model `RansomwareProtectionSettings`
+ - Added model `RansomwareReport`
+ - Added model `RansomwareReportProperties`
+ - Added enum `RansomwareReportSeverity`
+ - Added enum `RansomwareReportState`
+ - Added enum `RansomwareSuspectResolution`
+ - Added model `RansomwareSuspects`
+ - Added model `RansomwareSuspectsClearRequest`
+ - Added model `SuspectFile`
+ - Model `VolumesOperations` added method `begin_list_quota_report`
+ - Added model `RansomwareReportsOperations`
+
+### Breaking Changes
+
+ - Deleted or renamed model `Type`
+
## 14.1.0b1 (2025-12-02)
### Features Added
diff --git a/sdk/netapp/azure-mgmt-netapp/_metadata.json b/sdk/netapp/azure-mgmt-netapp/_metadata.json
index 8ab0ee46748f..643112668e53 100644
--- a/sdk/netapp/azure-mgmt-netapp/_metadata.json
+++ b/sdk/netapp/azure-mgmt-netapp/_metadata.json
@@ -1,7 +1,10 @@
{
- "apiVersion": "2025-09-01-preview",
- "commit": "fa4de8af2faa4a809027619c6ec8ed45b1e0a761",
+ "apiVersion": "2025-12-01",
+ "apiVersions": {
+ "Microsoft.NetApp": "2025-12-01"
+ },
+ "commit": "52b0e717060c167a12d21cb96932bec72bc5cd0c",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/netapp/resource-manager/Microsoft.NetApp/NetApp",
- "emitterVersion": "0.54.0"
+ "emitterVersion": "0.60.1"
}
\ No newline at end of file
diff --git a/sdk/netapp/azure-mgmt-netapp/apiview-properties.json b/sdk/netapp/azure-mgmt-netapp/apiview-properties.json
index dc7107fe0611..e6282e812c8e 100644
--- a/sdk/netapp/azure-mgmt-netapp/apiview-properties.json
+++ b/sdk/netapp/azure-mgmt-netapp/apiview-properties.json
@@ -4,17 +4,13 @@
"azure.mgmt.netapp.models.AccountEncryption": "Microsoft.NetApp.AccountEncryption",
"azure.mgmt.netapp.models.AccountProperties": "Microsoft.NetApp.AccountProperties",
"azure.mgmt.netapp.models.ActiveDirectory": "Microsoft.NetApp.ActiveDirectory",
- "azure.mgmt.netapp.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
- "azure.mgmt.netapp.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource",
- "azure.mgmt.netapp.models.ActiveDirectoryConfig": "Microsoft.NetApp.ActiveDirectoryConfig",
- "azure.mgmt.netapp.models.ActiveDirectoryConfigProperties": "Microsoft.NetApp.ActiveDirectoryConfigProperties",
- "azure.mgmt.netapp.models.ActiveDirectoryConfigUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
- "azure.mgmt.netapp.models.ActiveDirectoryConfigUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
"azure.mgmt.netapp.models.AuthorizeRequest": "Microsoft.NetApp.AuthorizeRequest",
+ "azure.mgmt.netapp.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
"azure.mgmt.netapp.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource",
"azure.mgmt.netapp.models.Backup": "Microsoft.NetApp.Backup",
"azure.mgmt.netapp.models.BackupPatch": "Microsoft.NetApp.BackupPatch",
"azure.mgmt.netapp.models.BackupPatchProperties": "Microsoft.NetApp.BackupPatchProperties",
+ "azure.mgmt.netapp.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource",
"azure.mgmt.netapp.models.BackupPolicy": "Microsoft.NetApp.BackupPolicy",
"azure.mgmt.netapp.models.BackupPolicyPatch": "Microsoft.NetApp.BackupPolicyPatch",
"azure.mgmt.netapp.models.BackupPolicyProperties": "Microsoft.NetApp.BackupPolicyProperties",
@@ -27,77 +23,14 @@
"azure.mgmt.netapp.models.BackupVaultProperties": "Microsoft.NetApp.BackupVaultProperties",
"azure.mgmt.netapp.models.BreakFileLocksRequest": "Microsoft.NetApp.BreakFileLocksRequest",
"azure.mgmt.netapp.models.BreakReplicationRequest": "Microsoft.NetApp.BreakReplicationRequest",
- "azure.mgmt.netapp.models.Bucket": "Microsoft.NetApp.Bucket",
- "azure.mgmt.netapp.models.BucketCredentialsExpiry": "Microsoft.NetApp.BucketCredentialsExpiry",
- "azure.mgmt.netapp.models.BucketGenerateCredentials": "Microsoft.NetApp.BucketGenerateCredentials",
- "azure.mgmt.netapp.models.BucketPatch": "Microsoft.NetApp.BucketPatch",
- "azure.mgmt.netapp.models.BucketPatchProperties": "Microsoft.NetApp.BucketPatchProperties",
- "azure.mgmt.netapp.models.BucketProperties": "Microsoft.NetApp.BucketProperties",
- "azure.mgmt.netapp.models.BucketServerPatchProperties": "Microsoft.NetApp.BucketServerPatchProperties",
- "azure.mgmt.netapp.models.BucketServerProperties": "Microsoft.NetApp.BucketServerProperties",
- "azure.mgmt.netapp.models.Cache": "Microsoft.NetApp.Cache",
- "azure.mgmt.netapp.models.CacheMountTargetProperties": "Microsoft.NetApp.CacheMountTargetProperties",
- "azure.mgmt.netapp.models.CacheProperties": "Microsoft.NetApp.CacheProperties",
- "azure.mgmt.netapp.models.CachePropertiesExportPolicy": "Microsoft.NetApp.CachePropertiesExportPolicy",
- "azure.mgmt.netapp.models.CacheUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
- "azure.mgmt.netapp.models.CacheUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
"azure.mgmt.netapp.models.CapacityPool": "Microsoft.NetApp.CapacityPool",
"azure.mgmt.netapp.models.CapacityPoolPatch": "Microsoft.NetApp.CapacityPoolPatch",
"azure.mgmt.netapp.models.ChangeKeyVault": "Microsoft.NetApp.ChangeKeyVault",
- "azure.mgmt.netapp.models.ChangeZoneRequest": "Microsoft.NetApp.ChangeZoneRequest",
"azure.mgmt.netapp.models.CheckAvailabilityResponse": "Microsoft.NetApp.CheckAvailabilityResponse",
- "azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse": "Microsoft.NetApp.CheckElasticResourceAvailabilityResponse",
- "azure.mgmt.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest": "Microsoft.NetApp.CheckElasticVolumeFilePathAvailabilityRequest",
- "azure.mgmt.netapp.models.CifsUser": "Microsoft.NetApp.CifsUser",
"azure.mgmt.netapp.models.ClusterPeerCommandResponse": "Microsoft.NetApp.ClusterPeerCommandResponse",
"azure.mgmt.netapp.models.DailySchedule": "Microsoft.NetApp.DailySchedule",
"azure.mgmt.netapp.models.DestinationReplication": "Microsoft.NetApp.DestinationReplication",
"azure.mgmt.netapp.models.Dimension": "Microsoft.NetApp.Dimension",
- "azure.mgmt.netapp.models.ElasticAccount": "Microsoft.NetApp.ElasticAccount",
- "azure.mgmt.netapp.models.ElasticAccountProperties": "Microsoft.NetApp.ElasticAccountProperties",
- "azure.mgmt.netapp.models.ElasticAccountUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
- "azure.mgmt.netapp.models.ElasticAccountUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
- "azure.mgmt.netapp.models.ElasticBackup": "Microsoft.NetApp.ElasticBackup",
- "azure.mgmt.netapp.models.ElasticBackupPolicy": "Microsoft.NetApp.ElasticBackupPolicy",
- "azure.mgmt.netapp.models.ElasticBackupPolicyProperties": "Microsoft.NetApp.ElasticBackupPolicyProperties",
- "azure.mgmt.netapp.models.ElasticBackupPolicyUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
- "azure.mgmt.netapp.models.ElasticBackupPolicyUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
- "azure.mgmt.netapp.models.ElasticBackupProperties": "Microsoft.NetApp.ElasticBackupProperties",
- "azure.mgmt.netapp.models.ElasticBackupVault": "Microsoft.NetApp.ElasticBackupVault",
- "azure.mgmt.netapp.models.ElasticBackupVaultProperties": "Microsoft.NetApp.ElasticBackupVaultProperties",
- "azure.mgmt.netapp.models.ElasticBackupVaultUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
- "azure.mgmt.netapp.models.ElasticCapacityPool": "Microsoft.NetApp.ElasticCapacityPool",
- "azure.mgmt.netapp.models.ElasticCapacityPoolProperties": "Microsoft.NetApp.ElasticCapacityPoolProperties",
- "azure.mgmt.netapp.models.ElasticCapacityPoolUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
- "azure.mgmt.netapp.models.ElasticCapacityPoolUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
- "azure.mgmt.netapp.models.ElasticEncryption": "Microsoft.NetApp.ElasticEncryption",
- "azure.mgmt.netapp.models.ElasticEncryptionConfiguration": "Microsoft.NetApp.ElasticEncryptionConfiguration",
- "azure.mgmt.netapp.models.ElasticEncryptionIdentity": "Microsoft.NetApp.ElasticEncryptionIdentity",
- "azure.mgmt.netapp.models.ElasticExportPolicy": "Microsoft.NetApp.ElasticExportPolicy",
- "azure.mgmt.netapp.models.ElasticExportPolicyRule": "Microsoft.NetApp.ElasticExportPolicyRule",
- "azure.mgmt.netapp.models.ElasticKeyVaultProperties": "Microsoft.NetApp.ElasticKeyVaultProperties",
- "azure.mgmt.netapp.models.ElasticMountTargetProperties": "Microsoft.NetApp.ElasticMountTargetProperties",
- "azure.mgmt.netapp.models.ElasticSmbPatchProperties": "Microsoft.NetApp.ElasticSmbPatchProperties",
- "azure.mgmt.netapp.models.ElasticSmbProperties": "Microsoft.NetApp.ElasticSmbProperties",
- "azure.mgmt.netapp.models.ElasticSnapshot": "Microsoft.NetApp.ElasticSnapshot",
- "azure.mgmt.netapp.models.ElasticSnapshotPolicy": "Microsoft.NetApp.ElasticSnapshotPolicy",
- "azure.mgmt.netapp.models.ElasticSnapshotPolicyDailySchedule": "Microsoft.NetApp.ElasticSnapshotPolicyDailySchedule",
- "azure.mgmt.netapp.models.ElasticSnapshotPolicyHourlySchedule": "Microsoft.NetApp.ElasticSnapshotPolicyHourlySchedule",
- "azure.mgmt.netapp.models.ElasticSnapshotPolicyMonthlySchedule": "Microsoft.NetApp.ElasticSnapshotPolicyMonthlySchedule",
- "azure.mgmt.netapp.models.ElasticSnapshotPolicyProperties": "Microsoft.NetApp.ElasticSnapshotPolicyProperties",
- "azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
- "azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
- "azure.mgmt.netapp.models.ElasticSnapshotPolicyWeeklySchedule": "Microsoft.NetApp.ElasticSnapshotPolicyWeeklySchedule",
- "azure.mgmt.netapp.models.ElasticSnapshotProperties": "Microsoft.NetApp.ElasticSnapshotProperties",
- "azure.mgmt.netapp.models.ElasticVolume": "Microsoft.NetApp.ElasticVolume",
- "azure.mgmt.netapp.models.ElasticVolumeBackupProperties": "Microsoft.NetApp.ElasticVolumeBackupProperties",
- "azure.mgmt.netapp.models.ElasticVolumeDataProtectionPatchProperties": "Microsoft.NetApp.ElasticVolumeDataProtectionPatchProperties",
- "azure.mgmt.netapp.models.ElasticVolumeDataProtectionProperties": "Microsoft.NetApp.ElasticVolumeDataProtectionProperties",
- "azure.mgmt.netapp.models.ElasticVolumeProperties": "Microsoft.NetApp.ElasticVolumeProperties",
- "azure.mgmt.netapp.models.ElasticVolumeRevert": "Microsoft.NetApp.ElasticVolumeRevert",
- "azure.mgmt.netapp.models.ElasticVolumeSnapshotProperties": "Microsoft.NetApp.ElasticVolumeSnapshotProperties",
- "azure.mgmt.netapp.models.ElasticVolumeUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
- "azure.mgmt.netapp.models.ElasticVolumeUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
"azure.mgmt.netapp.models.EncryptionIdentity": "Microsoft.NetApp.EncryptionIdentity",
"azure.mgmt.netapp.models.EncryptionTransitionRequest": "Microsoft.NetApp.EncryptionTransitionRequest",
"azure.mgmt.netapp.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
@@ -105,7 +38,6 @@
"azure.mgmt.netapp.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse",
"azure.mgmt.netapp.models.ExportPolicyRule": "Microsoft.NetApp.ExportPolicyRule",
"azure.mgmt.netapp.models.FilePathAvailabilityRequest": "Microsoft.NetApp.FilePathAvailabilityRequest",
- "azure.mgmt.netapp.models.FileSystemUser": "Microsoft.NetApp.FileSystemUser",
"azure.mgmt.netapp.models.GetGroupIdListForLDAPUserRequest": "Microsoft.NetApp.GetGroupIdListForLdapUserRequest",
"azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse": "Microsoft.NetApp.GetGroupIdListForLdapUserResponse",
"azure.mgmt.netapp.models.GetKeyVaultStatusResponse": "Microsoft.NetApp.GetKeyVaultStatusResponse",
@@ -113,7 +45,6 @@
"azure.mgmt.netapp.models.HourlySchedule": "Microsoft.NetApp.HourlySchedule",
"azure.mgmt.netapp.models.KeyVaultPrivateEndpoint": "Microsoft.NetApp.KeyVaultPrivateEndpoint",
"azure.mgmt.netapp.models.KeyVaultProperties": "Microsoft.NetApp.KeyVaultProperties",
- "azure.mgmt.netapp.models.LdapConfiguration": "Microsoft.NetApp.LdapConfiguration",
"azure.mgmt.netapp.models.LdapSearchScopeOpt": "Microsoft.NetApp.LdapSearchScopeOpt",
"azure.mgmt.netapp.models.ListQuotaReportResponse": "Microsoft.NetApp.ListQuotaReportResponse",
"azure.mgmt.netapp.models.ListReplicationsRequest": "Microsoft.NetApp.ListReplicationsRequest",
@@ -125,14 +56,11 @@
"azure.mgmt.netapp.models.NetAppAccount": "Microsoft.NetApp.NetAppAccount",
"azure.mgmt.netapp.models.NetAppAccountPatch": "Microsoft.NetApp.NetAppAccountPatch",
"azure.mgmt.netapp.models.NetworkSiblingSet": "Microsoft.NetApp.NetworkSiblingSet",
- "azure.mgmt.netapp.models.NfsUser": "Microsoft.NetApp.NfsUser",
"azure.mgmt.netapp.models.NicInfo": "Microsoft.NetApp.NicInfo",
"azure.mgmt.netapp.models.Operation": "Microsoft.NetApp.Operation",
"azure.mgmt.netapp.models.OperationDisplay": "Microsoft.NetApp.OperationDisplay",
"azure.mgmt.netapp.models.OperationProperties": "Microsoft.NetApp.OperationProperties",
- "azure.mgmt.netapp.models.OriginClusterInformation": "Microsoft.NetApp.OriginClusterInformation",
"azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest": "Microsoft.NetApp.PeerClusterForVolumeMigrationRequest",
- "azure.mgmt.netapp.models.PeeringPassphrases": "Microsoft.NetApp.PeeringPassphrases",
"azure.mgmt.netapp.models.PlacementKeyValuePairs": "Microsoft.NetApp.PlacementKeyValuePairs",
"azure.mgmt.netapp.models.PoolChangeRequest": "Microsoft.NetApp.PoolChangeRequest",
"azure.mgmt.netapp.models.PoolPatchProperties": "Microsoft.NetApp.PoolPatchProperties",
@@ -142,6 +70,7 @@
"azure.mgmt.netapp.models.QuotaItem": "Microsoft.NetApp.QuotaItem",
"azure.mgmt.netapp.models.QuotaItemProperties": "Microsoft.NetApp.QuotaItemProperties",
"azure.mgmt.netapp.models.QuotaReport": "Microsoft.NetApp.QuotaReport",
+ "azure.mgmt.netapp.models.QuotaReportFilterRequest": "Microsoft.NetApp.QuotaReportFilterRequest",
"azure.mgmt.netapp.models.RansomwareProtectionPatchSettings": "Microsoft.NetApp.RansomwareProtectionPatchSettings",
"azure.mgmt.netapp.models.RansomwareProtectionSettings": "Microsoft.NetApp.RansomwareProtectionSettings",
"azure.mgmt.netapp.models.RansomwareReport": "Microsoft.NetApp.RansomwareReport",
@@ -159,11 +88,7 @@
"azure.mgmt.netapp.models.ReplicationStatus": "Microsoft.NetApp.ReplicationStatus",
"azure.mgmt.netapp.models.ResourceNameAvailabilityRequest": "Microsoft.NetApp.ResourceNameAvailabilityRequest",
"azure.mgmt.netapp.models.RestoreStatus": "Microsoft.NetApp.RestoreStatus",
- "azure.mgmt.netapp.models.SecretPassword": "Microsoft.NetApp.SecretPassword",
- "azure.mgmt.netapp.models.SecretPasswordIdentity": "Microsoft.NetApp.SecretPasswordIdentity",
- "azure.mgmt.netapp.models.SecretPasswordKeyVaultProperties": "Microsoft.NetApp.SecretPasswordKeyVaultProperties",
"azure.mgmt.netapp.models.ServiceSpecification": "Microsoft.NetApp.ServiceSpecification",
- "azure.mgmt.netapp.models.SmbSettings": "Microsoft.NetApp.SmbSettings",
"azure.mgmt.netapp.models.Snapshot": "Microsoft.NetApp.Snapshot",
"azure.mgmt.netapp.models.SnapshotPatch": "Microsoft.NetApp.SnapshotPatch",
"azure.mgmt.netapp.models.SnapshotPolicy": "Microsoft.NetApp.SnapshotPolicy",
@@ -219,9 +144,6 @@
"azure.mgmt.netapp.models.EndpointType": "Microsoft.NetApp.EndpointType",
"azure.mgmt.netapp.models.ReplicationSchedule": "Microsoft.NetApp.ReplicationSchedule",
"azure.mgmt.netapp.models.ReplicationType": "Microsoft.NetApp.ReplicationType",
- "azure.mgmt.netapp.models.ExternalReplicationSetupStatus": "Microsoft.NetApp.ExternalReplicationSetupStatus",
- "azure.mgmt.netapp.models.MirrorState": "Microsoft.NetApp.MirrorState",
- "azure.mgmt.netapp.models.VolumeReplicationRelationshipStatus": "Microsoft.NetApp.VolumeReplicationRelationshipStatus",
"azure.mgmt.netapp.models.DesiredRansomwareProtectionState": "Microsoft.NetApp.DesiredRansomwareProtectionState",
"azure.mgmt.netapp.models.ActualRansomwareProtectionState": "Microsoft.NetApp.ActualRansomwareProtectionState",
"azure.mgmt.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit": "Microsoft.NetApp.AcceptGrowCapacityPoolForShortTermCloneSplit",
@@ -229,65 +151,29 @@
"azure.mgmt.netapp.models.SmbAccessBasedEnumeration": "Microsoft.NetApp.SmbAccessBasedEnumeration",
"azure.mgmt.netapp.models.SmbNonBrowsable": "Microsoft.NetApp.SmbNonBrowsable",
"azure.mgmt.netapp.models.EncryptionKeySource": "Microsoft.NetApp.EncryptionKeySource",
- "azure.mgmt.netapp.models.LdapServerType": "Microsoft.NetApp.LdapServerType",
"azure.mgmt.netapp.models.CoolAccessRetrievalPolicy": "Microsoft.NetApp.CoolAccessRetrievalPolicy",
"azure.mgmt.netapp.models.CoolAccessTieringPolicy": "Microsoft.NetApp.CoolAccessTieringPolicy",
"azure.mgmt.netapp.models.FileAccessLogs": "Microsoft.NetApp.FileAccessLogs",
"azure.mgmt.netapp.models.AvsDataStore": "Microsoft.NetApp.AvsDataStore",
"azure.mgmt.netapp.models.EnableSubvolumes": "Microsoft.NetApp.EnableSubvolumes",
- "azure.mgmt.netapp.models.LargeVolumeType": "Microsoft.NetApp.LargeVolumeType",
- "azure.mgmt.netapp.models.VolumeLanguage": "Microsoft.NetApp.VolumeLanguage",
- "azure.mgmt.netapp.models.BreakthroughMode": "Microsoft.NetApp.BreakthroughMode",
"azure.mgmt.netapp.models.BackupType": "Microsoft.NetApp.BackupType",
"azure.mgmt.netapp.models.VolumeBackupRelationshipStatus": "Microsoft.NetApp.VolumeBackupRelationshipStatus",
+ "azure.mgmt.netapp.models.MirrorState": "Microsoft.NetApp.MirrorState",
"azure.mgmt.netapp.models.VolumeRestoreRelationshipStatus": "Microsoft.NetApp.VolumeRestoreRelationshipStatus",
+ "azure.mgmt.netapp.models.VolumeReplicationRelationshipStatus": "Microsoft.NetApp.VolumeReplicationRelationshipStatus",
"azure.mgmt.netapp.models.ReplicationMirrorState": "Microsoft.NetApp.ReplicationMirrorState",
"azure.mgmt.netapp.models.Exclude": "Microsoft.NetApp.Exclude",
- "azure.mgmt.netapp.models.Type": "Microsoft.NetApp.Type",
+ "azure.mgmt.netapp.models.QuotaType": "Microsoft.NetApp.QuotaType",
"azure.mgmt.netapp.models.NetAppProvisioningState": "Microsoft.NetApp.NetAppProvisioningState",
"azure.mgmt.netapp.models.RansomwareReportState": "Microsoft.NetApp.RansomwareReportState",
"azure.mgmt.netapp.models.RansomwareReportSeverity": "Microsoft.NetApp.RansomwareReportSeverity",
"azure.mgmt.netapp.models.RansomwareSuspectResolution": "Microsoft.NetApp.RansomwareSuspectResolution",
- "azure.mgmt.netapp.models.CredentialsStatus": "Microsoft.NetApp.CredentialsStatus",
- "azure.mgmt.netapp.models.BucketPermissions": "Microsoft.NetApp.BucketPermissions",
- "azure.mgmt.netapp.models.BucketPatchPermissions": "Microsoft.NetApp.BucketPatchPermissions",
- "azure.mgmt.netapp.models.ProtocolTypes": "Microsoft.NetApp.ProtocolTypes",
- "azure.mgmt.netapp.models.CacheProvisioningState": "Microsoft.NetApp.CacheProvisioningState",
- "azure.mgmt.netapp.models.CacheLifeCycleState": "Microsoft.NetApp.CacheLifeCycleState",
- "azure.mgmt.netapp.models.KerberosState": "Microsoft.NetApp.KerberosState",
- "azure.mgmt.netapp.models.SmbEncryptionState": "Microsoft.NetApp.SmbEncryptionState",
- "azure.mgmt.netapp.models.EncryptionState": "Microsoft.NetApp.EncryptionState",
- "azure.mgmt.netapp.models.LdapState": "Microsoft.NetApp.LdapState",
- "azure.mgmt.netapp.models.CifsChangeNotifyState": "Microsoft.NetApp.CifsChangeNotifyState",
- "azure.mgmt.netapp.models.GlobalFileLockingState": "Microsoft.NetApp.GlobalFileLockingState",
- "azure.mgmt.netapp.models.EnableWriteBackState": "Microsoft.NetApp.EnableWriteBackState",
- "azure.mgmt.netapp.models.KeySource": "Microsoft.NetApp.KeySource",
- "azure.mgmt.netapp.models.ElasticKeyVaultStatus": "Microsoft.NetApp.ElasticKeyVaultStatus",
- "azure.mgmt.netapp.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType",
- "azure.mgmt.netapp.models.ElasticServiceLevel": "Microsoft.NetApp.ElasticServiceLevel",
- "azure.mgmt.netapp.models.ElasticPoolEncryptionKeySource": "Microsoft.NetApp.ElasticPoolEncryptionKeySource",
- "azure.mgmt.netapp.models.ElasticResourceAvailabilityStatus": "Microsoft.NetApp.ElasticResourceAvailabilityStatus",
- "azure.mgmt.netapp.models.CheckElasticResourceAvailabilityStatus": "Microsoft.NetApp.CheckElasticResourceAvailabilityStatus",
- "azure.mgmt.netapp.models.CheckElasticResourceAvailabilityReason": "Microsoft.NetApp.CheckElasticResourceAvailabilityReason",
- "azure.mgmt.netapp.models.ElasticUnixAccessRule": "Microsoft.NetApp.ElasticUnixAccessRule",
- "azure.mgmt.netapp.models.ElasticNfsv3Access": "Microsoft.NetApp.ElasticNfsv3Access",
- "azure.mgmt.netapp.models.ElasticNfsv4Access": "Microsoft.NetApp.ElasticNfsv4Access",
- "azure.mgmt.netapp.models.ElasticRootAccess": "Microsoft.NetApp.ElasticRootAccess",
- "azure.mgmt.netapp.models.ElasticProtocolType": "Microsoft.NetApp.ElasticProtocolType",
- "azure.mgmt.netapp.models.ElasticVolumePolicyEnforcement": "Microsoft.NetApp.ElasticVolumePolicyEnforcement",
- "azure.mgmt.netapp.models.SnapshotDirectoryVisibility": "Microsoft.NetApp.SnapshotDirectoryVisibility",
- "azure.mgmt.netapp.models.ElasticSmbEncryption": "Microsoft.NetApp.ElasticSmbEncryption",
- "azure.mgmt.netapp.models.ElasticVolumeRestorationState": "Microsoft.NetApp.ElasticVolumeRestorationState",
- "azure.mgmt.netapp.models.DayOfWeek": "Microsoft.NetApp.DayOfWeek",
- "azure.mgmt.netapp.models.PolicyStatus": "Microsoft.NetApp.PolicyStatus",
- "azure.mgmt.netapp.models.ElasticBackupPolicyState": "Microsoft.NetApp.ElasticBackupPolicyState",
- "azure.mgmt.netapp.models.ElasticBackupType": "Microsoft.NetApp.ElasticBackupType",
- "azure.mgmt.netapp.models.SnapshotUsage": "Microsoft.NetApp.SnapshotUsage",
- "azure.mgmt.netapp.models.VolumeSize": "Microsoft.NetApp.VolumeSize",
- "azure.mgmt.netapp.models.ActiveDirectoryStatus": "Microsoft.NetApp.ActiveDirectoryStatus",
"azure.mgmt.netapp.models.RegionStorageToNetworkProximity": "Microsoft.NetApp.RegionStorageToNetworkProximity",
+ "azure.mgmt.netapp.models.ActiveDirectoryStatus": "Microsoft.NetApp.ActiveDirectoryStatus",
+ "azure.mgmt.netapp.models.KeySource": "Microsoft.NetApp.KeySource",
"azure.mgmt.netapp.models.KeyVaultStatus": "Microsoft.NetApp.KeyVaultStatus",
"azure.mgmt.netapp.models.MultiAdStatus": "Microsoft.NetApp.MultiAdStatus",
+ "azure.mgmt.netapp.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType",
"azure.mgmt.netapp.models.QosType": "Microsoft.NetApp.QosType",
"azure.mgmt.netapp.models.EncryptionType": "Microsoft.NetApp.EncryptionType",
"azure.mgmt.netapp.models.InAvailabilityReasonType": "Microsoft.NetApp.InAvailabilityReasonType",
@@ -438,132 +324,6 @@
"azure.mgmt.netapp.aio.operations.BackupVaultsOperations.begin_delete": "Microsoft.NetApp.BackupVaults.delete",
"azure.mgmt.netapp.operations.BackupVaultsOperations.list_by_net_app_account": "Microsoft.NetApp.BackupVaults.listByNetAppAccount",
"azure.mgmt.netapp.aio.operations.BackupVaultsOperations.list_by_net_app_account": "Microsoft.NetApp.BackupVaults.listByNetAppAccount",
- "azure.mgmt.netapp.operations.BucketsOperations.get": "Microsoft.NetApp.Buckets.get",
- "azure.mgmt.netapp.aio.operations.BucketsOperations.get": "Microsoft.NetApp.Buckets.get",
- "azure.mgmt.netapp.operations.BucketsOperations.begin_create_or_update": "Microsoft.NetApp.Buckets.createOrUpdate",
- "azure.mgmt.netapp.aio.operations.BucketsOperations.begin_create_or_update": "Microsoft.NetApp.Buckets.createOrUpdate",
- "azure.mgmt.netapp.operations.BucketsOperations.begin_update": "Microsoft.NetApp.Buckets.update",
- "azure.mgmt.netapp.aio.operations.BucketsOperations.begin_update": "Microsoft.NetApp.Buckets.update",
- "azure.mgmt.netapp.operations.BucketsOperations.begin_delete": "Microsoft.NetApp.Buckets.delete",
- "azure.mgmt.netapp.aio.operations.BucketsOperations.begin_delete": "Microsoft.NetApp.Buckets.delete",
- "azure.mgmt.netapp.operations.BucketsOperations.list": "Microsoft.NetApp.Buckets.list",
- "azure.mgmt.netapp.aio.operations.BucketsOperations.list": "Microsoft.NetApp.Buckets.list",
- "azure.mgmt.netapp.operations.BucketsOperations.generate_credentials": "Microsoft.NetApp.Buckets.generateCredentials",
- "azure.mgmt.netapp.aio.operations.BucketsOperations.generate_credentials": "Microsoft.NetApp.Buckets.generateCredentials",
- "azure.mgmt.netapp.operations.CachesOperations.get": "Microsoft.NetApp.Caches.get",
- "azure.mgmt.netapp.aio.operations.CachesOperations.get": "Microsoft.NetApp.Caches.get",
- "azure.mgmt.netapp.operations.CachesOperations.begin_create_or_update": "Microsoft.NetApp.Caches.createOrUpdate",
- "azure.mgmt.netapp.aio.operations.CachesOperations.begin_create_or_update": "Microsoft.NetApp.Caches.createOrUpdate",
- "azure.mgmt.netapp.operations.CachesOperations.begin_update": "Microsoft.NetApp.Caches.update",
- "azure.mgmt.netapp.aio.operations.CachesOperations.begin_update": "Microsoft.NetApp.Caches.update",
- "azure.mgmt.netapp.operations.CachesOperations.begin_delete": "Microsoft.NetApp.Caches.delete",
- "azure.mgmt.netapp.aio.operations.CachesOperations.begin_delete": "Microsoft.NetApp.Caches.delete",
- "azure.mgmt.netapp.operations.CachesOperations.list_by_capacity_pools": "Microsoft.NetApp.Caches.listByCapacityPools",
- "azure.mgmt.netapp.aio.operations.CachesOperations.list_by_capacity_pools": "Microsoft.NetApp.Caches.listByCapacityPools",
- "azure.mgmt.netapp.operations.CachesOperations.list_peering_passphrases": "Microsoft.NetApp.Caches.listPeeringPassphrases",
- "azure.mgmt.netapp.aio.operations.CachesOperations.list_peering_passphrases": "Microsoft.NetApp.Caches.listPeeringPassphrases",
- "azure.mgmt.netapp.operations.CachesOperations.begin_pool_change": "Microsoft.NetApp.Caches.poolChange",
- "azure.mgmt.netapp.aio.operations.CachesOperations.begin_pool_change": "Microsoft.NetApp.Caches.poolChange",
- "azure.mgmt.netapp.operations.ElasticAccountsOperations.get": "Microsoft.NetApp.ElasticAccounts.get",
- "azure.mgmt.netapp.aio.operations.ElasticAccountsOperations.get": "Microsoft.NetApp.ElasticAccounts.get",
- "azure.mgmt.netapp.operations.ElasticAccountsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticAccounts.createOrUpdate",
- "azure.mgmt.netapp.aio.operations.ElasticAccountsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticAccounts.createOrUpdate",
- "azure.mgmt.netapp.operations.ElasticAccountsOperations.begin_update": "Microsoft.NetApp.ElasticAccounts.update",
- "azure.mgmt.netapp.aio.operations.ElasticAccountsOperations.begin_update": "Microsoft.NetApp.ElasticAccounts.update",
- "azure.mgmt.netapp.operations.ElasticAccountsOperations.begin_delete": "Microsoft.NetApp.ElasticAccounts.delete",
- "azure.mgmt.netapp.aio.operations.ElasticAccountsOperations.begin_delete": "Microsoft.NetApp.ElasticAccounts.delete",
- "azure.mgmt.netapp.operations.ElasticAccountsOperations.list_by_resource_group": "Microsoft.NetApp.ElasticAccounts.listByResourceGroup",
- "azure.mgmt.netapp.aio.operations.ElasticAccountsOperations.list_by_resource_group": "Microsoft.NetApp.ElasticAccounts.listByResourceGroup",
- "azure.mgmt.netapp.operations.ElasticAccountsOperations.list_by_subscription": "Microsoft.NetApp.ElasticAccounts.listBySubscription",
- "azure.mgmt.netapp.aio.operations.ElasticAccountsOperations.list_by_subscription": "Microsoft.NetApp.ElasticAccounts.listBySubscription",
- "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.get": "Microsoft.NetApp.ElasticCapacityPools.get",
- "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.get": "Microsoft.NetApp.ElasticCapacityPools.get",
- "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticCapacityPools.createOrUpdate",
- "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticCapacityPools.createOrUpdate",
- "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.begin_update": "Microsoft.NetApp.ElasticCapacityPools.update",
- "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.begin_update": "Microsoft.NetApp.ElasticCapacityPools.update",
- "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.begin_delete": "Microsoft.NetApp.ElasticCapacityPools.delete",
- "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.begin_delete": "Microsoft.NetApp.ElasticCapacityPools.delete",
- "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticCapacityPools.listByElasticAccount",
- "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticCapacityPools.listByElasticAccount",
- "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.begin_change_zone": "Microsoft.NetApp.ElasticCapacityPools.changeZone",
- "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.begin_change_zone": "Microsoft.NetApp.ElasticCapacityPools.changeZone",
- "azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations.check_volume_file_path_availability": "Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability",
- "azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations.check_volume_file_path_availability": "Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability",
- "azure.mgmt.netapp.operations.ElasticVolumesOperations.get": "Microsoft.NetApp.ElasticVolumes.get",
- "azure.mgmt.netapp.aio.operations.ElasticVolumesOperations.get": "Microsoft.NetApp.ElasticVolumes.get",
- "azure.mgmt.netapp.operations.ElasticVolumesOperations.begin_create_or_update": "Microsoft.NetApp.ElasticVolumes.createOrUpdate",
- "azure.mgmt.netapp.aio.operations.ElasticVolumesOperations.begin_create_or_update": "Microsoft.NetApp.ElasticVolumes.createOrUpdate",
- "azure.mgmt.netapp.operations.ElasticVolumesOperations.begin_update": "Microsoft.NetApp.ElasticVolumes.update",
- "azure.mgmt.netapp.aio.operations.ElasticVolumesOperations.begin_update": "Microsoft.NetApp.ElasticVolumes.update",
- "azure.mgmt.netapp.operations.ElasticVolumesOperations.begin_delete": "Microsoft.NetApp.ElasticVolumes.delete",
- "azure.mgmt.netapp.aio.operations.ElasticVolumesOperations.begin_delete": "Microsoft.NetApp.ElasticVolumes.delete",
- "azure.mgmt.netapp.operations.ElasticVolumesOperations.list_by_elastic_pool": "Microsoft.NetApp.ElasticVolumes.listByElasticPool",
- "azure.mgmt.netapp.aio.operations.ElasticVolumesOperations.list_by_elastic_pool": "Microsoft.NetApp.ElasticVolumes.listByElasticPool",
- "azure.mgmt.netapp.operations.ElasticVolumesOperations.begin_revert": "Microsoft.NetApp.ElasticVolumes.revert",
- "azure.mgmt.netapp.aio.operations.ElasticVolumesOperations.begin_revert": "Microsoft.NetApp.ElasticVolumes.revert",
- "azure.mgmt.netapp.operations.ElasticSnapshotsOperations.get": "Microsoft.NetApp.ElasticSnapshots.get",
- "azure.mgmt.netapp.aio.operations.ElasticSnapshotsOperations.get": "Microsoft.NetApp.ElasticSnapshots.get",
- "azure.mgmt.netapp.operations.ElasticSnapshotsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticSnapshots.createOrUpdate",
- "azure.mgmt.netapp.aio.operations.ElasticSnapshotsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticSnapshots.createOrUpdate",
- "azure.mgmt.netapp.operations.ElasticSnapshotsOperations.begin_delete": "Microsoft.NetApp.ElasticSnapshots.delete",
- "azure.mgmt.netapp.aio.operations.ElasticSnapshotsOperations.begin_delete": "Microsoft.NetApp.ElasticSnapshots.delete",
- "azure.mgmt.netapp.operations.ElasticSnapshotsOperations.list_by_elastic_volume": "Microsoft.NetApp.ElasticSnapshots.listByElasticVolume",
- "azure.mgmt.netapp.aio.operations.ElasticSnapshotsOperations.list_by_elastic_volume": "Microsoft.NetApp.ElasticSnapshots.listByElasticVolume",
- "azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations.get": "Microsoft.NetApp.ElasticSnapshotPolicies.get",
- "azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations.get": "Microsoft.NetApp.ElasticSnapshotPolicies.get",
- "azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations.begin_create_or_update": "Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate",
- "azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations.begin_create_or_update": "Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate",
- "azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations.begin_update": "Microsoft.NetApp.ElasticSnapshotPolicies.update",
- "azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations.begin_update": "Microsoft.NetApp.ElasticSnapshotPolicies.update",
- "azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations.begin_delete": "Microsoft.NetApp.ElasticSnapshotPolicies.delete",
- "azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations.begin_delete": "Microsoft.NetApp.ElasticSnapshotPolicies.delete",
- "azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticSnapshotPolicies.listByElasticAccount",
- "azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticSnapshotPolicies.listByElasticAccount",
- "azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations.list_elastic_volumes": "Microsoft.NetApp.ElasticSnapshotPolicies.listElasticVolumes",
- "azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations.list_elastic_volumes": "Microsoft.NetApp.ElasticSnapshotPolicies.listElasticVolumes",
- "azure.mgmt.netapp.operations.ElasticBackupVaultsOperations.get": "Microsoft.NetApp.ElasticBackupVaults.get",
- "azure.mgmt.netapp.aio.operations.ElasticBackupVaultsOperations.get": "Microsoft.NetApp.ElasticBackupVaults.get",
- "azure.mgmt.netapp.operations.ElasticBackupVaultsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticBackupVaults.createOrUpdate",
- "azure.mgmt.netapp.aio.operations.ElasticBackupVaultsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticBackupVaults.createOrUpdate",
- "azure.mgmt.netapp.operations.ElasticBackupVaultsOperations.begin_update": "Microsoft.NetApp.ElasticBackupVaults.update",
- "azure.mgmt.netapp.aio.operations.ElasticBackupVaultsOperations.begin_update": "Microsoft.NetApp.ElasticBackupVaults.update",
- "azure.mgmt.netapp.operations.ElasticBackupVaultsOperations.begin_delete": "Microsoft.NetApp.ElasticBackupVaults.delete",
- "azure.mgmt.netapp.aio.operations.ElasticBackupVaultsOperations.begin_delete": "Microsoft.NetApp.ElasticBackupVaults.delete",
- "azure.mgmt.netapp.operations.ElasticBackupVaultsOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticBackupVaults.listByElasticAccount",
- "azure.mgmt.netapp.aio.operations.ElasticBackupVaultsOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticBackupVaults.listByElasticAccount",
- "azure.mgmt.netapp.operations.ElasticBackupPoliciesOperations.get": "Microsoft.NetApp.ElasticBackupPolicies.get",
- "azure.mgmt.netapp.aio.operations.ElasticBackupPoliciesOperations.get": "Microsoft.NetApp.ElasticBackupPolicies.get",
- "azure.mgmt.netapp.operations.ElasticBackupPoliciesOperations.begin_create_or_update": "Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate",
- "azure.mgmt.netapp.aio.operations.ElasticBackupPoliciesOperations.begin_create_or_update": "Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate",
- "azure.mgmt.netapp.operations.ElasticBackupPoliciesOperations.begin_update": "Microsoft.NetApp.ElasticBackupPolicies.update",
- "azure.mgmt.netapp.aio.operations.ElasticBackupPoliciesOperations.begin_update": "Microsoft.NetApp.ElasticBackupPolicies.update",
- "azure.mgmt.netapp.operations.ElasticBackupPoliciesOperations.begin_delete": "Microsoft.NetApp.ElasticBackupPolicies.delete",
- "azure.mgmt.netapp.aio.operations.ElasticBackupPoliciesOperations.begin_delete": "Microsoft.NetApp.ElasticBackupPolicies.delete",
- "azure.mgmt.netapp.operations.ElasticBackupPoliciesOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticBackupPolicies.listByElasticAccount",
- "azure.mgmt.netapp.aio.operations.ElasticBackupPoliciesOperations.list_by_elastic_account": "Microsoft.NetApp.ElasticBackupPolicies.listByElasticAccount",
- "azure.mgmt.netapp.operations.ElasticBackupsOperations.get": "Microsoft.NetApp.ElasticBackups.get",
- "azure.mgmt.netapp.aio.operations.ElasticBackupsOperations.get": "Microsoft.NetApp.ElasticBackups.get",
- "azure.mgmt.netapp.operations.ElasticBackupsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticBackups.createOrUpdate",
- "azure.mgmt.netapp.aio.operations.ElasticBackupsOperations.begin_create_or_update": "Microsoft.NetApp.ElasticBackups.createOrUpdate",
- "azure.mgmt.netapp.operations.ElasticBackupsOperations.begin_update": "Microsoft.NetApp.ElasticBackups.update",
- "azure.mgmt.netapp.aio.operations.ElasticBackupsOperations.begin_update": "Microsoft.NetApp.ElasticBackups.update",
- "azure.mgmt.netapp.operations.ElasticBackupsOperations.begin_delete": "Microsoft.NetApp.ElasticBackups.delete",
- "azure.mgmt.netapp.aio.operations.ElasticBackupsOperations.begin_delete": "Microsoft.NetApp.ElasticBackups.delete",
- "azure.mgmt.netapp.operations.ElasticBackupsOperations.list_by_vault": "Microsoft.NetApp.ElasticBackups.listByVault",
- "azure.mgmt.netapp.aio.operations.ElasticBackupsOperations.list_by_vault": "Microsoft.NetApp.ElasticBackups.listByVault",
- "azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations.get": "Microsoft.NetApp.ActiveDirectoryConfigs.get",
- "azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations.get": "Microsoft.NetApp.ActiveDirectoryConfigs.get",
- "azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations.begin_create_or_update": "Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate",
- "azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations.begin_create_or_update": "Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate",
- "azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations.begin_update": "Microsoft.NetApp.ActiveDirectoryConfigs.update",
- "azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations.begin_update": "Microsoft.NetApp.ActiveDirectoryConfigs.update",
- "azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations.begin_delete": "Microsoft.NetApp.ActiveDirectoryConfigs.delete",
- "azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations.begin_delete": "Microsoft.NetApp.ActiveDirectoryConfigs.delete",
- "azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations.list_by_resource_group": "Microsoft.NetApp.ActiveDirectoryConfigs.listByResourceGroup",
- "azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations.list_by_resource_group": "Microsoft.NetApp.ActiveDirectoryConfigs.listByResourceGroup",
- "azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations.list_by_subscription": "Microsoft.NetApp.ActiveDirectoryConfigs.listBySubscription",
- "azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations.list_by_subscription": "Microsoft.NetApp.ActiveDirectoryConfigs.listBySubscription",
"azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsOperations.get": "Microsoft.NetApp.SubscriptionQuotaItems.get",
"azure.mgmt.netapp.aio.operations.NetAppResourceQuotaLimitsOperations.get": "Microsoft.NetApp.SubscriptionQuotaItems.get",
"azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsOperations.list": "Microsoft.NetApp.SubscriptionQuotaItems.list",
diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_client.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_client.py
index 9c7b593989cf..3d3cf9cf063f 100644
--- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_client.py
+++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_client.py
@@ -21,23 +21,12 @@
from ._utils.serialization import Deserializer, Serializer
from .operations import (
AccountsOperations,
- ActiveDirectoryConfigsOperations,
BackupPoliciesOperations,
BackupVaultsOperations,
BackupsOperations,
BackupsUnderAccountOperations,
BackupsUnderBackupVaultOperations,
BackupsUnderVolumeOperations,
- BucketsOperations,
- CachesOperations,
- ElasticAccountsOperations,
- ElasticBackupPoliciesOperations,
- ElasticBackupVaultsOperations,
- ElasticBackupsOperations,
- ElasticCapacityPoolsOperations,
- ElasticSnapshotPoliciesOperations,
- ElasticSnapshotsOperations,
- ElasticVolumesOperations,
NetAppResourceOperations,
NetAppResourceQuotaLimitsAccountOperations,
NetAppResourceQuotaLimitsOperations,
@@ -86,30 +75,6 @@ class NetAppManagementClient: # pylint: disable=too-many-instance-attributes
:vartype ransomware_reports: azure.mgmt.netapp.operations.RansomwareReportsOperations
:ivar backup_vaults: BackupVaultsOperations operations
:vartype backup_vaults: azure.mgmt.netapp.operations.BackupVaultsOperations
- :ivar buckets: BucketsOperations operations
- :vartype buckets: azure.mgmt.netapp.operations.BucketsOperations
- :ivar caches: CachesOperations operations
- :vartype caches: azure.mgmt.netapp.operations.CachesOperations
- :ivar elastic_accounts: ElasticAccountsOperations operations
- :vartype elastic_accounts: azure.mgmt.netapp.operations.ElasticAccountsOperations
- :ivar elastic_capacity_pools: ElasticCapacityPoolsOperations operations
- :vartype elastic_capacity_pools: azure.mgmt.netapp.operations.ElasticCapacityPoolsOperations
- :ivar elastic_volumes: ElasticVolumesOperations operations
- :vartype elastic_volumes: azure.mgmt.netapp.operations.ElasticVolumesOperations
- :ivar elastic_snapshots: ElasticSnapshotsOperations operations
- :vartype elastic_snapshots: azure.mgmt.netapp.operations.ElasticSnapshotsOperations
- :ivar elastic_snapshot_policies: ElasticSnapshotPoliciesOperations operations
- :vartype elastic_snapshot_policies:
- azure.mgmt.netapp.operations.ElasticSnapshotPoliciesOperations
- :ivar elastic_backup_vaults: ElasticBackupVaultsOperations operations
- :vartype elastic_backup_vaults: azure.mgmt.netapp.operations.ElasticBackupVaultsOperations
- :ivar elastic_backup_policies: ElasticBackupPoliciesOperations operations
- :vartype elastic_backup_policies: azure.mgmt.netapp.operations.ElasticBackupPoliciesOperations
- :ivar elastic_backups: ElasticBackupsOperations operations
- :vartype elastic_backups: azure.mgmt.netapp.operations.ElasticBackupsOperations
- :ivar active_directory_configs: ActiveDirectoryConfigsOperations operations
- :vartype active_directory_configs:
- azure.mgmt.netapp.operations.ActiveDirectoryConfigsOperations
:ivar net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations operations
:vartype net_app_resource_quota_limits:
azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsOperations
@@ -142,9 +107,9 @@ class NetAppManagementClient: # pylint: disable=too-many-instance-attributes
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:paramtype cloud_setting: ~azure.core.AzureClouds
- :keyword api_version: The API version to use for this operation. Default value is
- "2025-09-01-preview". Note that overriding this default value may result in unsupported
- behavior.
+ :keyword api_version: The API version to use for this operation. Known values are "2025-12-01"
+ and None. Default value is "2025-12-01". Note that overriding this default value may result in
+ unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
@@ -216,31 +181,6 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.backup_vaults = BackupVaultsOperations(self._client, self._config, self._serialize, self._deserialize)
- self.buckets = BucketsOperations(self._client, self._config, self._serialize, self._deserialize)
- self.caches = CachesOperations(self._client, self._config, self._serialize, self._deserialize)
- self.elastic_accounts = ElasticAccountsOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.elastic_capacity_pools = ElasticCapacityPoolsOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.elastic_volumes = ElasticVolumesOperations(self._client, self._config, self._serialize, self._deserialize)
- self.elastic_snapshots = ElasticSnapshotsOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.elastic_snapshot_policies = ElasticSnapshotPoliciesOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.elastic_backup_vaults = ElasticBackupVaultsOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.elastic_backup_policies = ElasticBackupPoliciesOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.elastic_backups = ElasticBackupsOperations(self._client, self._config, self._serialize, self._deserialize)
- self.active_directory_configs = ActiveDirectoryConfigsOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
self.net_app_resource_quota_limits = NetAppResourceQuotaLimitsOperations(
self._client, self._config, self._serialize, self._deserialize
)
diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py
index f75137c501cc..3327e3b9a3d0 100644
--- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py
+++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py
@@ -33,9 +33,9 @@ class NetAppManagementClientConfiguration: # pylint: disable=too-many-instance-
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:type cloud_setting: ~azure.core.AzureClouds
- :keyword api_version: The API version to use for this operation. Default value is
- "2025-09-01-preview". Note that overriding this default value may result in unsupported
- behavior.
+ :keyword api_version: The API version to use for this operation. Known values are "2025-12-01"
+ and None. Default value is "2025-12-01". Note that overriding this default value may result in
+ unsupported behavior.
:paramtype api_version: str
"""
@@ -47,7 +47,7 @@ def __init__(
cloud_setting: Optional["AzureClouds"] = None,
**kwargs: Any
) -> None:
- api_version: str = kwargs.pop("api_version", "2025-09-01-preview")
+ api_version: str = kwargs.pop("api_version", "2025-12-01")
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_utils/model_base.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_utils/model_base.py
index 12926fa98dcf..c402af2afc63 100644
--- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_utils/model_base.py
+++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_utils/model_base.py
@@ -37,6 +37,7 @@
TZ_UTC = timezone.utc
_T = typing.TypeVar("_T")
+_NONE_TYPE = type(None)
def _timedelta_as_isostr(td: timedelta) -> str:
@@ -171,6 +172,21 @@ def default(self, o): # pylint: disable=too-many-return-statements
r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT"
)
+_ARRAY_ENCODE_MAPPING = {
+ "pipeDelimited": "|",
+ "spaceDelimited": " ",
+ "commaDelimited": ",",
+ "newlineDelimited": "\n",
+}
+
+
+def _deserialize_array_encoded(delimit: str, attr):
+ if isinstance(attr, str):
+ if attr == "":
+ return []
+ return attr.split(delimit)
+ return attr
+
def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime:
"""Deserialize ISO-8601 formatted string into Datetime object.
@@ -202,7 +218,7 @@ def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime:
test_utc = date_obj.utctimetuple()
if test_utc.tm_year > 9999 or test_utc.tm_year < 1:
raise OverflowError("Hit max or min date")
- return date_obj
+ return date_obj # type: ignore[no-any-return]
def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime:
@@ -256,7 +272,7 @@ def _deserialize_time(attr: typing.Union[str, time]) -> time:
"""
if isinstance(attr, time):
return attr
- return isodate.parse_time(attr)
+ return isodate.parse_time(attr) # type: ignore[no-any-return]
def _deserialize_bytes(attr):
@@ -315,6 +331,8 @@ def _deserialize_int_as_str(attr):
def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None):
if annotation is int and rf and rf._format == "str":
return _deserialize_int_as_str
+ if annotation is str and rf and rf._format in _ARRAY_ENCODE_MAPPING:
+ return functools.partial(_deserialize_array_encoded, _ARRAY_ENCODE_MAPPING[rf._format])
if rf and rf._format:
return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format)
return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore
@@ -353,9 +371,39 @@ def __contains__(self, key: typing.Any) -> bool:
return key in self._data
def __getitem__(self, key: str) -> typing.Any:
+ # If this key has been deserialized (for mutable types), we need to handle serialization
+ if hasattr(self, "_attr_to_rest_field"):
+ cache_attr = f"_deserialized_{key}"
+ if hasattr(self, cache_attr):
+ rf = _get_rest_field(getattr(self, "_attr_to_rest_field"), key)
+ if rf:
+ value = self._data.get(key)
+ if isinstance(value, (dict, list, set)):
+ # For mutable types, serialize and return
+ # But also update _data with serialized form and clear flag
+ # so mutations via this returned value affect _data
+ serialized = _serialize(value, rf._format)
+ # If serialized form is same type (no transformation needed),
+ # return _data directly so mutations work
+ if isinstance(serialized, type(value)) and serialized == value:
+ return self._data.get(key)
+ # Otherwise return serialized copy and clear flag
+ try:
+ object.__delattr__(self, cache_attr)
+ except AttributeError:
+ pass
+ # Store serialized form back
+ self._data[key] = serialized
+ return serialized
return self._data.__getitem__(key)
def __setitem__(self, key: str, value: typing.Any) -> None:
+ # Clear any cached deserialized value when setting through dictionary access
+ cache_attr = f"_deserialized_{key}"
+ try:
+ object.__delattr__(self, cache_attr)
+ except AttributeError:
+ pass
self._data.__setitem__(key, value)
def __delitem__(self, key: str) -> None:
@@ -483,6 +531,8 @@ def _is_model(obj: typing.Any) -> bool:
def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements
if isinstance(o, list):
+ if format in _ARRAY_ENCODE_MAPPING and all(isinstance(x, str) for x in o):
+ return _ARRAY_ENCODE_MAPPING[format].join(o)
return [_serialize(x, format) for x in o]
if isinstance(o, dict):
return {k: _serialize(v, format) for k, v in o.items()}
@@ -758,6 +808,14 @@ def _deserialize_multiple_sequence(
return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers))
+def _is_array_encoded_deserializer(deserializer: functools.partial) -> bool:
+ return (
+ isinstance(deserializer, functools.partial)
+ and isinstance(deserializer.args[0], functools.partial)
+ and deserializer.args[0].func == _deserialize_array_encoded # pylint: disable=comparison-with-callable
+ )
+
+
def _deserialize_sequence(
deserializer: typing.Optional[typing.Callable],
module: typing.Optional[str],
@@ -767,6 +825,19 @@ def _deserialize_sequence(
return obj
if isinstance(obj, ET.Element):
obj = list(obj)
+
+ # encoded string may be deserialized to sequence
+ if isinstance(obj, str) and isinstance(deserializer, functools.partial):
+ # for list[str]
+ if _is_array_encoded_deserializer(deserializer):
+ return deserializer(obj)
+
+ # for list[Union[...]]
+ if isinstance(deserializer.args[0], list):
+ for sub_deserializer in deserializer.args[0]:
+ if _is_array_encoded_deserializer(sub_deserializer):
+ return sub_deserializer(obj)
+
return type(obj)(_deserialize(deserializer, entry, module) for entry in obj)
@@ -817,16 +888,16 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur
# is it optional?
try:
- if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore
+ if any(a is _NONE_TYPE for a in annotation.__args__): # pyright: ignore
if len(annotation.__args__) <= 2: # pyright: ignore
if_obj_deserializer = _get_deserialize_callable_from_annotation(
- next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore
+ next(a for a in annotation.__args__ if a is not _NONE_TYPE), module, rf # pyright: ignore
)
return functools.partial(_deserialize_with_optional, if_obj_deserializer)
# the type is Optional[Union[...]], we need to remove the None type from the Union
annotation_copy = copy.copy(annotation)
- annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore
+ annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a is not _NONE_TYPE] # pyright: ignore
return _get_deserialize_callable_from_annotation(annotation_copy, module, rf)
except AttributeError:
pass
@@ -952,7 +1023,7 @@ def _failsafe_deserialize(
) -> typing.Any:
try:
return _deserialize(deserializer, response.json(), module, rf, format)
- except DeserializationError:
+ except Exception: # pylint: disable=broad-except
_LOGGER.warning(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
@@ -965,7 +1036,7 @@ def _failsafe_deserialize_xml(
) -> typing.Any:
try:
return _deserialize_xml(deserializer, response.text())
- except DeserializationError:
+ except Exception: # pylint: disable=broad-except
_LOGGER.warning(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
@@ -998,7 +1069,11 @@ def __init__(
@property
def _class_type(self) -> typing.Any:
- return getattr(self._type, "args", [None])[0]
+ result = getattr(self._type, "args", [None])[0]
+ # type may be wrapped by nested functools.partial so we need to check for that
+ if isinstance(result, functools.partial):
+ return getattr(result, "args", [None])[0]
+ return result
@property
def _rest_name(self) -> str:
@@ -1009,14 +1084,37 @@ def _rest_name(self) -> str:
def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin
# by this point, type and rest_name will have a value bc we default
# them in __new__ of the Model class
- item = obj.get(self._rest_name)
+ # Use _data.get() directly to avoid triggering __getitem__ which clears the cache
+ item = obj._data.get(self._rest_name)
if item is None:
return item
if self._is_model:
return item
- return _deserialize(self._type, _serialize(item, self._format), rf=self)
+
+ # For mutable types, we want mutations to directly affect _data
+ # Check if we've already deserialized this value
+ cache_attr = f"_deserialized_{self._rest_name}"
+ if hasattr(obj, cache_attr):
+ # Return the value from _data directly (it's been deserialized in place)
+ return obj._data.get(self._rest_name)
+
+ deserialized = _deserialize(self._type, _serialize(item, self._format), rf=self)
+
+ # For mutable types, store the deserialized value back in _data
+ # so mutations directly affect _data
+ if isinstance(deserialized, (dict, list, set)):
+ obj._data[self._rest_name] = deserialized
+ object.__setattr__(obj, cache_attr, True) # Mark as deserialized
+ return deserialized
+
+ return deserialized
def __set__(self, obj: Model, value) -> None:
+ # Clear the cached deserialized object when setting a new value
+ cache_attr = f"_deserialized_{self._rest_name}"
+ if hasattr(obj, cache_attr):
+ object.__delattr__(obj, cache_attr)
+
if value is None:
# we want to wipe out entries if users set attr to None
try:
@@ -1184,7 +1282,7 @@ def _get_wrapped_element(
_get_element(v, exclude_readonly, meta, wrapped_element)
else:
wrapped_element.text = _get_primitive_type_value(v)
- return wrapped_element
+ return wrapped_element # type: ignore[no-any-return]
def _get_primitive_type_value(v) -> str:
@@ -1197,7 +1295,9 @@ def _get_primitive_type_value(v) -> str:
return str(v)
-def _create_xml_element(tag, prefix=None, ns=None):
+def _create_xml_element(
+ tag: typing.Any, prefix: typing.Optional[str] = None, ns: typing.Optional[str] = None
+) -> ET.Element:
if prefix and ns:
ET.register_namespace(prefix, ns)
if ns:
diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_utils/serialization.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_utils/serialization.py
index 45a3e44e45cb..81ec1de5922b 100644
--- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_utils/serialization.py
+++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_utils/serialization.py
@@ -821,13 +821,20 @@ def serialize_basic(cls, data, data_type, **kwargs):
:param str data_type: Type of object in the iterable.
:rtype: str, int, float, bool
:return: serialized object
+ :raises TypeError: raise if data_type is not one of str, int, float, bool.
"""
custom_serializer = cls._get_custom_serializers(data_type, **kwargs)
if custom_serializer:
return custom_serializer(data)
if data_type == "str":
return cls.serialize_unicode(data)
- return eval(data_type)(data) # nosec # pylint: disable=eval-used
+ if data_type == "int":
+ return int(data)
+ if data_type == "float":
+ return float(data)
+ if data_type == "bool":
+ return bool(data)
+ raise TypeError("Unknown basic data type: {}".format(data_type))
@classmethod
def serialize_unicode(cls, data):
@@ -1757,7 +1764,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return
:param str data_type: deserialization data type.
:return: Deserialized basic type.
:rtype: str, int, float or bool
- :raises TypeError: if string format is not valid.
+ :raises TypeError: if string format is not valid or data_type is not one of str, int, float, bool.
"""
# If we're here, data is supposed to be a basic type.
# If it's still an XML node, take the text
@@ -1783,7 +1790,11 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return
if data_type == "str":
return self.deserialize_unicode(attr)
- return eval(data_type)(attr) # nosec # pylint: disable=eval-used
+ if data_type == "int":
+ return int(attr)
+ if data_type == "float":
+ return float(attr)
+ raise TypeError("Unknown basic data type: {}".format(data_type))
@staticmethod
def deserialize_unicode(data):
diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py
index 26c472edd480..256979095a07 100644
--- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py
+++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "14.1.0b1"
+VERSION = "15.0.0"
diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_client.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_client.py
index 843da9f373bd..0056786e02da 100644
--- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_client.py
+++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_client.py
@@ -21,23 +21,12 @@
from ._configuration import NetAppManagementClientConfiguration
from .operations import (
AccountsOperations,
- ActiveDirectoryConfigsOperations,
BackupPoliciesOperations,
BackupVaultsOperations,
BackupsOperations,
BackupsUnderAccountOperations,
BackupsUnderBackupVaultOperations,
BackupsUnderVolumeOperations,
- BucketsOperations,
- CachesOperations,
- ElasticAccountsOperations,
- ElasticBackupPoliciesOperations,
- ElasticBackupVaultsOperations,
- ElasticBackupsOperations,
- ElasticCapacityPoolsOperations,
- ElasticSnapshotPoliciesOperations,
- ElasticSnapshotsOperations,
- ElasticVolumesOperations,
NetAppResourceOperations,
NetAppResourceQuotaLimitsAccountOperations,
NetAppResourceQuotaLimitsOperations,
@@ -86,32 +75,6 @@ class NetAppManagementClient: # pylint: disable=too-many-instance-attributes
:vartype ransomware_reports: azure.mgmt.netapp.aio.operations.RansomwareReportsOperations
:ivar backup_vaults: BackupVaultsOperations operations
:vartype backup_vaults: azure.mgmt.netapp.aio.operations.BackupVaultsOperations
- :ivar buckets: BucketsOperations operations
- :vartype buckets: azure.mgmt.netapp.aio.operations.BucketsOperations
- :ivar caches: CachesOperations operations
- :vartype caches: azure.mgmt.netapp.aio.operations.CachesOperations
- :ivar elastic_accounts: ElasticAccountsOperations operations
- :vartype elastic_accounts: azure.mgmt.netapp.aio.operations.ElasticAccountsOperations
- :ivar elastic_capacity_pools: ElasticCapacityPoolsOperations operations
- :vartype elastic_capacity_pools:
- azure.mgmt.netapp.aio.operations.ElasticCapacityPoolsOperations
- :ivar elastic_volumes: ElasticVolumesOperations operations
- :vartype elastic_volumes: azure.mgmt.netapp.aio.operations.ElasticVolumesOperations
- :ivar elastic_snapshots: ElasticSnapshotsOperations operations
- :vartype elastic_snapshots: azure.mgmt.netapp.aio.operations.ElasticSnapshotsOperations
- :ivar elastic_snapshot_policies: ElasticSnapshotPoliciesOperations operations
- :vartype elastic_snapshot_policies:
- azure.mgmt.netapp.aio.operations.ElasticSnapshotPoliciesOperations
- :ivar elastic_backup_vaults: ElasticBackupVaultsOperations operations
- :vartype elastic_backup_vaults: azure.mgmt.netapp.aio.operations.ElasticBackupVaultsOperations
- :ivar elastic_backup_policies: ElasticBackupPoliciesOperations operations
- :vartype elastic_backup_policies:
- azure.mgmt.netapp.aio.operations.ElasticBackupPoliciesOperations
- :ivar elastic_backups: ElasticBackupsOperations operations
- :vartype elastic_backups: azure.mgmt.netapp.aio.operations.ElasticBackupsOperations
- :ivar active_directory_configs: ActiveDirectoryConfigsOperations operations
- :vartype active_directory_configs:
- azure.mgmt.netapp.aio.operations.ActiveDirectoryConfigsOperations
:ivar net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations operations
:vartype net_app_resource_quota_limits:
azure.mgmt.netapp.aio.operations.NetAppResourceQuotaLimitsOperations
@@ -145,9 +108,9 @@ class NetAppManagementClient: # pylint: disable=too-many-instance-attributes
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:paramtype cloud_setting: ~azure.core.AzureClouds
- :keyword api_version: The API version to use for this operation. Default value is
- "2025-09-01-preview". Note that overriding this default value may result in unsupported
- behavior.
+ :keyword api_version: The API version to use for this operation. Known values are "2025-12-01"
+ and None. Default value is "2025-12-01". Note that overriding this default value may result in
+ unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
@@ -221,31 +184,6 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.backup_vaults = BackupVaultsOperations(self._client, self._config, self._serialize, self._deserialize)
- self.buckets = BucketsOperations(self._client, self._config, self._serialize, self._deserialize)
- self.caches = CachesOperations(self._client, self._config, self._serialize, self._deserialize)
- self.elastic_accounts = ElasticAccountsOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.elastic_capacity_pools = ElasticCapacityPoolsOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.elastic_volumes = ElasticVolumesOperations(self._client, self._config, self._serialize, self._deserialize)
- self.elastic_snapshots = ElasticSnapshotsOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.elastic_snapshot_policies = ElasticSnapshotPoliciesOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.elastic_backup_vaults = ElasticBackupVaultsOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.elastic_backup_policies = ElasticBackupPoliciesOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.elastic_backups = ElasticBackupsOperations(self._client, self._config, self._serialize, self._deserialize)
- self.active_directory_configs = ActiveDirectoryConfigsOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
self.net_app_resource_quota_limits = NetAppResourceQuotaLimitsOperations(
self._client, self._config, self._serialize, self._deserialize
)
diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py
index 7ebe73e9eada..0c061d4fbce5 100644
--- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py
+++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py
@@ -33,9 +33,9 @@ class NetAppManagementClientConfiguration: # pylint: disable=too-many-instance-
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:type cloud_setting: ~azure.core.AzureClouds
- :keyword api_version: The API version to use for this operation. Default value is
- "2025-09-01-preview". Note that overriding this default value may result in unsupported
- behavior.
+ :keyword api_version: The API version to use for this operation. Known values are "2025-12-01"
+ and None. Default value is "2025-12-01". Note that overriding this default value may result in
+ unsupported behavior.
:paramtype api_version: str
"""
@@ -47,7 +47,7 @@ def __init__(
cloud_setting: Optional["AzureClouds"] = None,
**kwargs: Any
) -> None:
- api_version: str = kwargs.pop("api_version", "2025-09-01-preview")
+ api_version: str = kwargs.pop("api_version", "2025-12-01")
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/__init__.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/__init__.py
index dc8916780c55..c5f8e5b377a9 100644
--- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/__init__.py
+++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/__init__.py
@@ -23,17 +23,6 @@
from ._operations import VolumeQuotaRulesOperations # type: ignore
from ._operations import RansomwareReportsOperations # type: ignore
from ._operations import BackupVaultsOperations # type: ignore
-from ._operations import BucketsOperations # type: ignore
-from ._operations import CachesOperations # type: ignore
-from ._operations import ElasticAccountsOperations # type: ignore
-from ._operations import ElasticCapacityPoolsOperations # type: ignore
-from ._operations import ElasticVolumesOperations # type: ignore
-from ._operations import ElasticSnapshotsOperations # type: ignore
-from ._operations import ElasticSnapshotPoliciesOperations # type: ignore
-from ._operations import ElasticBackupVaultsOperations # type: ignore
-from ._operations import ElasticBackupPoliciesOperations # type: ignore
-from ._operations import ElasticBackupsOperations # type: ignore
-from ._operations import ActiveDirectoryConfigsOperations # type: ignore
from ._operations import NetAppResourceQuotaLimitsOperations # type: ignore
from ._operations import NetAppResourceRegionInfosOperations # type: ignore
from ._operations import AccountsOperations # type: ignore
@@ -61,17 +50,6 @@
"VolumeQuotaRulesOperations",
"RansomwareReportsOperations",
"BackupVaultsOperations",
- "BucketsOperations",
- "CachesOperations",
- "ElasticAccountsOperations",
- "ElasticCapacityPoolsOperations",
- "ElasticVolumesOperations",
- "ElasticSnapshotsOperations",
- "ElasticSnapshotPoliciesOperations",
- "ElasticBackupVaultsOperations",
- "ElasticBackupPoliciesOperations",
- "ElasticBackupsOperations",
- "ActiveDirectoryConfigsOperations",
"NetAppResourceQuotaLimitsOperations",
"NetAppResourceRegionInfosOperations",
"AccountsOperations",
diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py
index cf97e9975cb3..287f9deee78e 100644
--- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py
+++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py
@@ -48,12 +48,6 @@
build_accounts_renew_credentials_request,
build_accounts_transition_to_cmk_request,
build_accounts_update_request,
- build_active_directory_configs_create_or_update_request,
- build_active_directory_configs_delete_request,
- build_active_directory_configs_get_request,
- build_active_directory_configs_list_by_resource_group_request,
- build_active_directory_configs_list_by_subscription_request,
- build_active_directory_configs_update_request,
build_backup_policies_create_request,
build_backup_policies_delete_request,
build_backup_policies_get_request,
@@ -74,63 +68,6 @@
build_backups_under_backup_vault_restore_files_request,
build_backups_under_volume_migrate_backups_request,
build_backups_update_request,
- build_buckets_create_or_update_request,
- build_buckets_delete_request,
- build_buckets_generate_credentials_request,
- build_buckets_get_request,
- build_buckets_list_request,
- build_buckets_update_request,
- build_caches_create_or_update_request,
- build_caches_delete_request,
- build_caches_get_request,
- build_caches_list_by_capacity_pools_request,
- build_caches_list_peering_passphrases_request,
- build_caches_pool_change_request,
- build_caches_update_request,
- build_elastic_accounts_create_or_update_request,
- build_elastic_accounts_delete_request,
- build_elastic_accounts_get_request,
- build_elastic_accounts_list_by_resource_group_request,
- build_elastic_accounts_list_by_subscription_request,
- build_elastic_accounts_update_request,
- build_elastic_backup_policies_create_or_update_request,
- build_elastic_backup_policies_delete_request,
- build_elastic_backup_policies_get_request,
- build_elastic_backup_policies_list_by_elastic_account_request,
- build_elastic_backup_policies_update_request,
- build_elastic_backup_vaults_create_or_update_request,
- build_elastic_backup_vaults_delete_request,
- build_elastic_backup_vaults_get_request,
- build_elastic_backup_vaults_list_by_elastic_account_request,
- build_elastic_backup_vaults_update_request,
- build_elastic_backups_create_or_update_request,
- build_elastic_backups_delete_request,
- build_elastic_backups_get_request,
- build_elastic_backups_list_by_vault_request,
- build_elastic_backups_update_request,
- build_elastic_capacity_pools_change_zone_request,
- build_elastic_capacity_pools_check_volume_file_path_availability_request,
- build_elastic_capacity_pools_create_or_update_request,
- build_elastic_capacity_pools_delete_request,
- build_elastic_capacity_pools_get_request,
- build_elastic_capacity_pools_list_by_elastic_account_request,
- build_elastic_capacity_pools_update_request,
- build_elastic_snapshot_policies_create_or_update_request,
- build_elastic_snapshot_policies_delete_request,
- build_elastic_snapshot_policies_get_request,
- build_elastic_snapshot_policies_list_by_elastic_account_request,
- build_elastic_snapshot_policies_list_elastic_volumes_request,
- build_elastic_snapshot_policies_update_request,
- build_elastic_snapshots_create_or_update_request,
- build_elastic_snapshots_delete_request,
- build_elastic_snapshots_get_request,
- build_elastic_snapshots_list_by_elastic_volume_request,
- build_elastic_volumes_create_or_update_request,
- build_elastic_volumes_delete_request,
- build_elastic_volumes_get_request,
- build_elastic_volumes_list_by_elastic_pool_request,
- build_elastic_volumes_revert_request,
- build_elastic_volumes_update_request,
build_net_app_resource_check_file_path_availability_request,
build_net_app_resource_check_name_availability_request,
build_net_app_resource_check_quota_availability_request,
@@ -358,6 +295,7 @@ def __init__(self, *args, **kwargs) -> None:
"2025-08-01-preview",
"2025-09-01",
"2025-09-01-preview",
+ "2025-12-01",
],
)
async def get(
@@ -445,6 +383,7 @@ async def get(
"2025-08-01-preview",
"2025-09-01",
"2025-09-01-preview",
+ "2025-12-01",
],
)
def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncItemPaged["_models.QuotaItem"]:
@@ -3923,7 +3862,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
"accept",
]
},
- api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
+ api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview", "2025-12-01"],
)
async def _list_get_group_id_list_for_ldap_user_initial( # pylint: disable=name-too-long
self,
@@ -4126,7 +4065,7 @@ async def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-to
"accept",
]
},
- api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
+ api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview", "2025-12-01"],
)
async def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
self,
@@ -4925,7 +4864,7 @@ def list_replications(
"accept",
]
},
- api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
+ api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview", "2025-12-01"],
)
def list_replications(
self,
@@ -7118,22 +7057,29 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
@api_version_validation(
- method_added_on="2025-07-01-preview",
+ method_added_on="2025-12-01",
params_added_on={
- "2025-07-01-preview": [
+ "2025-12-01": [
"api_version",
"subscription_id",
"resource_group_name",
"account_name",
"pool_name",
"volume_name",
+ "content_type",
"accept",
]
},
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
+ api_versions_list=["2025-12-01"],
)
async def _list_quota_report_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[Union[_models.QuotaReportFilterRequest, JSON, IO[bytes]]] = None,
+ **kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -7143,18 +7089,32 @@ async def _list_quota_report_initial(
}
error_map.update(kwargs.pop("error_map", {}) or {})
- _headers = kwargs.pop("headers", {}) or {}
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ content_type = content_type if body else None
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+ content_type = content_type or "application/json" if body else None
+ _content = None
+ if isinstance(body, (IOBase, bytes)):
+ _content = body
+ else:
+ if body is not None:
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ else:
+ _content = None
+
_request = build_volumes_list_quota_report_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
subscription_id=self._config.subscription_id,
+ content_type=content_type,
api_version=self._config.api_version,
+ content=_content,
headers=_headers,
params=_params,
)
@@ -7197,26 +7157,135 @@ async def _list_quota_report_initial(
return deserialized # type: ignore
+ @overload
+ async def begin_list_quota_report(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[_models.QuotaReportFilterRequest] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.ListQuotaReportResponse]:
+ """Get quota report for volume (with filter support).
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: The content of the action request. Default value is None.
+ :type body: ~azure.mgmt.netapp.models.QuotaReportFilterRequest
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns ListQuotaReportResponse. The
+ ListQuotaReportResponse is compatible with MutableMapping
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ListQuotaReportResponse]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_list_quota_report(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[JSON] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.ListQuotaReportResponse]:
+ """Get quota report for volume (with filter support).
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: The content of the action request. Default value is None.
+ :type body: JSON
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns ListQuotaReportResponse. The
+ ListQuotaReportResponse is compatible with MutableMapping
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ListQuotaReportResponse]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_list_quota_report(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[IO[bytes]] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.ListQuotaReportResponse]:
+ """Get quota report for volume (with filter support).
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: The content of the action request. Default value is None.
+ :type body: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns ListQuotaReportResponse. The
+ ListQuotaReportResponse is compatible with MutableMapping
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ListQuotaReportResponse]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
@distributed_trace_async
@api_version_validation(
- method_added_on="2025-07-01-preview",
+ method_added_on="2025-12-01",
params_added_on={
- "2025-07-01-preview": [
+ "2025-12-01": [
"api_version",
"subscription_id",
"resource_group_name",
"account_name",
"pool_name",
"volume_name",
+ "content_type",
"accept",
]
},
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
+ api_versions_list=["2025-12-01"],
)
async def begin_list_quota_report(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[Union[_models.QuotaReportFilterRequest, JSON, IO[bytes]]] = None,
+ **kwargs: Any
) -> AsyncLROPoller[_models.ListQuotaReportResponse]:
- """A long-running resource action.
+ """Get quota report for volume (with filter support).
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -7227,14 +7296,19 @@ async def begin_list_quota_report(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
+ :param body: The content of the action request. Is one of the following types:
+ QuotaReportFilterRequest, JSON, IO[bytes] Default value is None.
+ :type body: ~azure.mgmt.netapp.models.QuotaReportFilterRequest or JSON or IO[bytes]
:return: An instance of AsyncLROPoller that returns ListQuotaReportResponse. The
ListQuotaReportResponse is compatible with MutableMapping
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ListQuotaReportResponse]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = kwargs.pop("headers", {}) or {}
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ content_type = content_type if body else None
cls: ClsType[_models.ListQuotaReportResponse] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@@ -7245,6 +7319,8 @@ async def begin_list_quota_report(
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
+ body=body,
+ content_type=content_type,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -11036,7 +11112,7 @@ def __init__(self, *args, **kwargs) -> None:
"accept",
]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=["2025-09-01-preview", "2025-12-01"],
)
async def get(
self,
@@ -11047,12 +11123,11 @@ async def get(
ransomware_report_name: str,
**kwargs: Any
) -> _models.RansomwareReport:
- """Get details of the specified ransomware report (ARP)
- ARP reports are created with a list of suspected files when it detects any combination of high
- data entropy, abnormal volume activity with data encryption, and unusual file extensions.
- ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware
- threat. You can use one of these ARP snapshots or another snapshot of your volume to restore
- data.
+ """Get details of the specified ransomware report (ARP) ARP reports are created with a list of
+ suspected files when it detects any combination of high data entropy, abnormal volume activity
+ with data encryption, and unusual file extensions. ARP creates snapshots named
+ Anti_ransomware_backup when it detects a potential ransomware threat. You can use one of these
+ ARP snapshots or another snapshot of your volume to restore data.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -11142,18 +11217,17 @@ async def get(
"accept",
]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=["2025-09-01-preview", "2025-12-01"],
)
def list(
self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
) -> AsyncItemPaged["_models.RansomwareReport"]:
- """List all ransomware reports for the volume
- Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume.
- ARP reports are created with a list of suspected files when it detects any combination of high
- data entropy, abnormal volume activity with data encryption, and unusual file extensions.
- ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware
- threat. You can use one of these ARP snapshots or another snapshot of your volume to restore
- data".
+ """List all ransomware reports for the volume Returns a list of the Advanced Ransomware Protection
+ (ARP) reports for the volume. ARP reports are created with a list of suspected files when it
+ detects any combination of high data entropy, abnormal volume activity with data encryption,
+ and unusual file extensions. ARP creates snapshots named Anti_ransomware_backup when it detects
+ a potential ransomware threat. You can use one of these ARP snapshots or another snapshot of
+ your volume to restore data".
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -11265,7 +11339,7 @@ async def get_next(next_link=None):
"content_type",
]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=["2025-09-01-preview", "2025-12-01"],
)
async def _clear_suspects_initial(
self,
@@ -11359,12 +11433,11 @@ async def begin_clear_suspects(
content_type: str = "application/json",
**kwargs: Any
) -> AsyncLROPoller[None]:
- """ "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
+ """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
evaluate the report to determine whether the activity is acceptable (false positive) or whether
- an attack seems malicious.
- ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware
- threat. You can use one of these ARP snapshots or another snapshot of your volume to restore
- data",.
+ an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a
+ potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your
+ volume to restore data",.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -11400,12 +11473,11 @@ async def begin_clear_suspects(
content_type: str = "application/json",
**kwargs: Any
) -> AsyncLROPoller[None]:
- """ "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
+ """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
evaluate the report to determine whether the activity is acceptable (false positive) or whether
- an attack seems malicious.
- ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware
- threat. You can use one of these ARP snapshots or another snapshot of your volume to restore
- data",.
+ an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a
+ potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your
+ volume to restore data",.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -11441,12 +11513,11 @@ async def begin_clear_suspects(
content_type: str = "application/json",
**kwargs: Any
) -> AsyncLROPoller[None]:
- """ "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
+ """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
evaluate the report to determine whether the activity is acceptable (false positive) or whether
- an attack seems malicious.
- ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware
- threat. You can use one of these ARP snapshots or another snapshot of your volume to restore
- data",.
+ an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a
+ potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your
+ volume to restore data",.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -11484,7 +11555,7 @@ async def begin_clear_suspects(
"content_type",
]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=["2025-09-01-preview", "2025-12-01"],
)
async def begin_clear_suspects(
self,
@@ -11496,12 +11567,11 @@ async def begin_clear_suspects(
body: Union[_models.RansomwareSuspectsClearRequest, JSON, IO[bytes]],
**kwargs: Any
) -> AsyncLROPoller[None]:
- """ "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
+ """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
evaluate the report to determine whether the activity is acceptable (false positive) or whether
- an attack seems malicious.
- ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware
- threat. You can use one of these ARP snapshots or another snapshot of your volume to restore
- data",.
+ an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a
+ potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your
+ volume to restore data",.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -12381,11783 +12451,6 @@ async def get_next(next_link=None):
return AsyncItemPaged(get_next, extract_data)
-class BucketsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s
- :attr:`buckets` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
- async def get(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- **kwargs: Any
- ) -> _models.Bucket:
- """Get the details of the specified volume's bucket. A bucket allows additional services, such as
- AI services, connect to the volume data contained in those buckets.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :return: Bucket. The Bucket is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.Bucket
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.Bucket] = kwargs.pop("cls", None)
-
- _request = build_buckets_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- bucket_name=bucket_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.Bucket, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
- async def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: Union[_models.Bucket, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_buckets_create_or_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- bucket_name=bucket_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: _models.Bucket,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Bucket]:
- """Creates or updates a bucket for a volume. A bucket allows additional services, such as AI
- services, connect to the volume data contained in those buckets.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Required.
- :type body: ~azure.mgmt.netapp.models.Bucket
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns Bucket. The Bucket is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Bucket]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Bucket]:
- """Creates or updates a bucket for a volume. A bucket allows additional services, such as AI
- services, connect to the volume data contained in those buckets.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns Bucket. The Bucket is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Bucket]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Bucket]:
- """Creates or updates a bucket for a volume. A bucket allows additional services, such as AI
- services, connect to the volume data contained in those buckets.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns Bucket. The Bucket is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Bucket]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: Union[_models.Bucket, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Bucket]:
- """Creates or updates a bucket for a volume. A bucket allows additional services, such as AI
- services, connect to the volume data contained in those buckets.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Is one of the following types: Bucket, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.Bucket or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns Bucket. The Bucket is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Bucket]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.Bucket] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._create_or_update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- bucket_name=bucket_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.Bucket, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.Bucket].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.Bucket](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
- async def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: Union[_models.BucketPatch, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_buckets_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- bucket_name=bucket_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: _models.BucketPatch,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Bucket]:
- """Updates the details of a volume bucket.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Required.
- :type body: ~azure.mgmt.netapp.models.BucketPatch
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns Bucket. The Bucket is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Bucket]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Bucket]:
- """Updates the details of a volume bucket.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns Bucket. The Bucket is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Bucket]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Bucket]:
- """Updates the details of a volume bucket.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns Bucket. The Bucket is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Bucket]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: Union[_models.BucketPatch, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Bucket]:
- """Updates the details of a volume bucket.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Is one of the following types: BucketPatch, JSON, IO[bytes]
- Required.
- :type body: ~azure.mgmt.netapp.models.BucketPatch or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns Bucket. The Bucket is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Bucket]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.Bucket] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- bucket_name=bucket_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.Bucket, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.Bucket].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.Bucket](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
- async def _delete_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_buckets_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- bucket_name=bucket_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
- async def begin_delete(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Delete a volume's bucket.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- bucket_name=bucket_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
- def list(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> AsyncItemPaged["_models.Bucket"]:
- """Describes all buckets belonging to a volume. Buckets allow additional services, such as AI
- services, connect to the volume data contained in those buckets.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An iterator like instance of Bucket
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.Bucket]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.Bucket]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_buckets_list_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.Bucket], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
- @overload
- async def generate_credentials(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: _models.BucketCredentialsExpiry,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> _models.BucketGenerateCredentials:
- """Generate the access key and secret key used for accessing the specified volume bucket. Also
- return expiry date and time of key pair (in UTC).
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket's Access and Secret key pair expiry time expressed as the number of
- days from now. Required.
- :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with
- MutableMapping
- :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def generate_credentials(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> _models.BucketGenerateCredentials:
- """Generate the access key and secret key used for accessing the specified volume bucket. Also
- return expiry date and time of key pair (in UTC).
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket's Access and Secret key pair expiry time expressed as the number of
- days from now. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with
- MutableMapping
- :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def generate_credentials(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> _models.BucketGenerateCredentials:
- """Generate the access key and secret key used for accessing the specified volume bucket. Also
- return expiry date and time of key pair (in UTC).
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket's Access and Secret key pair expiry time expressed as the number of
- days from now. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with
- MutableMapping
- :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
- async def generate_credentials(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- body: Union[_models.BucketCredentialsExpiry, JSON, IO[bytes]],
- **kwargs: Any
- ) -> _models.BucketGenerateCredentials:
- """Generate the access key and secret key used for accessing the specified volume bucket. Also
- return expiry date and time of key pair (in UTC).
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket's Access and Secret key pair expiry time expressed as the number of
- days from now. Is one of the following types: BucketCredentialsExpiry, JSON, IO[bytes]
- Required.
- :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry or JSON or IO[bytes]
- :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with
- MutableMapping
- :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.BucketGenerateCredentials] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_buckets_generate_credentials_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- bucket_name=bucket_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.BucketGenerateCredentials, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
-
-class CachesOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s
- :attr:`caches` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def get(
- self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any
- ) -> _models.Cache:
- """Get the details of the specified Cache.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :return: Cache. The Cache is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.Cache
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.Cache] = kwargs.pop("cls", None)
-
- _request = build_caches_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cache_name=cache_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.Cache, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: Union[_models.Cache, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_caches_create_or_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cache_name=cache_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: _models.Cache,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Cache]:
- """Create or update the specified Cache within the Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.Cache
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Cache]:
- """Create or update the specified Cache within the Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Resource create parameters. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Cache]:
- """Create or update the specified Cache within the Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Resource create parameters. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: Union[_models.Cache, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Cache]:
- """Create or update the specified Cache within the Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Resource create parameters. Is one of the following types: Cache, JSON, IO[bytes]
- Required.
- :type body: ~azure.mgmt.netapp.models.Cache or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.Cache] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._create_or_update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cache_name=cache_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.Cache, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.Cache].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.Cache](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: Union[_models.CacheUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_caches_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cache_name=cache_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: _models.CacheUpdate,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Cache]:
- """Patch the specified Cache.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.CacheUpdate
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Cache]:
- """Patch the specified Cache.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: The resource properties to be updated. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Cache]:
- """Patch the specified Cache.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: The resource properties to be updated. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: Union[_models.CacheUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.Cache]:
- """Patch the specified Cache.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: The resource properties to be updated. Is one of the following types: CacheUpdate,
- JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.CacheUpdate or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.Cache] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cache_name=cache_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.Cache, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.Cache].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.Cache](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _delete_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_caches_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cache_name=cache_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_delete(
- self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Delete the specified cache.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cache_name=cache_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_capacity_pools(
- self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any
- ) -> AsyncItemPaged["_models.Cache"]:
- """List all Caches within the Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :return: An iterator like instance of Cache
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.Cache]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_caches_list_by_capacity_pools_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.Cache], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def list_peering_passphrases(
- self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any
- ) -> _models.PeeringPassphrases:
- """This operation will list the cluster peering command, cluster peering passphrase and the
- vserver peering command.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :return: PeeringPassphrases. The PeeringPassphrases is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.PeeringPassphrases
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.PeeringPassphrases] = kwargs.pop("cls", None)
-
- _request = build_caches_list_peering_passphrases_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cache_name=cache_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.PeeringPassphrases, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _pool_change_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: Union[_models.PoolChangeRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_caches_pool_change_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cache_name=cache_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_pool_change(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: _models.PoolChangeRequest,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Moves Cache to another Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Move cache to the pool supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.PoolChangeRequest
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_pool_change(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Moves Cache to another Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Move cache to the pool supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_pool_change(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Moves Cache to another Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Move cache to the pool supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_pool_change(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: Union[_models.PoolChangeRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Moves Cache to another Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Move cache to the pool supplied in the body of the operation. Is one of the
- following types: PoolChangeRequest, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.PoolChangeRequest or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._pool_change_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cache_name=cache_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
-
-class ElasticAccountsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s
- :attr:`elastic_accounts` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def get(self, resource_group_name: str, account_name: str, **kwargs: Any) -> _models.ElasticAccount:
- """Get the NetApp Elastic Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :return: ElasticAccount. The ElasticAccount is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticAccount
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ElasticAccount] = kwargs.pop("cls", None)
-
- _request = build_elastic_accounts_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ElasticAccount, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- body: Union[_models.ElasticAccount, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_accounts_create_or_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- body: _models.ElasticAccount,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticAccount]:
- """Create or update the specified NetApp Elastic Account within the resource group.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticAccount
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticAccount]:
- """Create or update the specified NetApp Elastic Account within the resource group.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param body: Resource create parameters. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticAccount]:
- """Create or update the specified NetApp Elastic Account within the resource group.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param body: Resource create parameters. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- body: Union[_models.ElasticAccount, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticAccount]:
- """Create or update the specified NetApp Elastic Account within the resource group.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticAccount, JSON,
- IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticAccount or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticAccount] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._create_or_update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticAccount, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticAccount].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticAccount](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- body: Union[_models.ElasticAccountUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_accounts_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- body: _models.ElasticAccountUpdate,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticAccount]:
- """Patch the specified NetApp Elastic Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticAccountUpdate
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticAccount]:
- """Patch the specified NetApp Elastic Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param body: The resource properties to be updated. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticAccount]:
- """Patch the specified NetApp Elastic Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param body: The resource properties to be updated. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- body: Union[_models.ElasticAccountUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticAccount]:
- """Patch the specified NetApp Elastic Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticAccountUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticAccountUpdate or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticAccount. The ElasticAccount is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticAccount]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticAccount] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticAccount, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticAccount].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticAccount](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _delete_initial(self, resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_elastic_accounts_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_delete(self, resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncLROPoller[None]:
- """Delete the specified NetApp elastic account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={"2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]},
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_resource_group(
- self, resource_group_name: str, **kwargs: Any
- ) -> AsyncItemPaged["_models.ElasticAccount"]:
- """List and describe all NetApp elastic accounts in the resource group.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :return: An iterator like instance of ElasticAccount
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticAccount]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticAccount]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_accounts_list_by_resource_group_request(
- resource_group_name=resource_group_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticAccount], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={"2025-09-01-preview": ["api_version", "subscription_id", "accept"]},
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.ElasticAccount"]:
- """List and describe all NetApp elastic accounts in the subscription.
-
- :return: An iterator like instance of ElasticAccount
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticAccount]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticAccount]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_accounts_list_by_subscription_request(
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticAccount], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
-
-class ElasticCapacityPoolsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s
- :attr:`elastic_capacity_pools` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def get(
- self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any
- ) -> _models.ElasticCapacityPool:
- """Get the NetApp Elastic Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :return: ElasticCapacityPool. The ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticCapacityPool
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None)
-
- _request = build_elastic_capacity_pools_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ElasticCapacityPool, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: Union[_models.ElasticCapacityPool, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_capacity_pools_create_or_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: _models.ElasticCapacityPool,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticCapacityPool]:
- """Create or update the specified NetApp Elastic Capacity Pool within the resource group and
- NetApp Elastic Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticCapacityPool
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The
- ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticCapacityPool]:
- """Create or update the specified NetApp Elastic Capacity Pool within the resource group and
- NetApp Elastic Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: Resource create parameters. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The
- ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticCapacityPool]:
- """Create or update the specified NetApp Elastic Capacity Pool within the resource group and
- NetApp Elastic Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: Resource create parameters. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The
- ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: Union[_models.ElasticCapacityPool, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticCapacityPool]:
- """Create or update the specified NetApp Elastic Capacity Pool within the resource group and
- NetApp Elastic Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticCapacityPool,
- JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticCapacityPool or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The
- ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._create_or_update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticCapacityPool, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticCapacityPool].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticCapacityPool](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: Union[_models.ElasticCapacityPoolUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_capacity_pools_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: _models.ElasticCapacityPoolUpdate,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticCapacityPool]:
- """Patch the specified NetApp Elastic Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticCapacityPoolUpdate
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The
- ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticCapacityPool]:
- """Patch the specified NetApp Elastic Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The resource properties to be updated. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The
- ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticCapacityPool]:
- """Patch the specified NetApp Elastic Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The resource properties to be updated. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The
- ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: Union[_models.ElasticCapacityPoolUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticCapacityPool]:
- """Patch the specified NetApp Elastic Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticCapacityPoolUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticCapacityPoolUpdate or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The
- ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticCapacityPool, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticCapacityPool].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticCapacityPool](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "pool_name"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _delete_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_elastic_capacity_pools_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "pool_name"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_delete(
- self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Delete the specified NetApp Elastic Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_elastic_account(
- self, resource_group_name: str, account_name: str, **kwargs: Any
- ) -> AsyncItemPaged["_models.ElasticCapacityPool"]:
- """List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :return: An iterator like instance of ElasticCapacityPool
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticCapacityPool]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_capacity_pools_list_by_elastic_account_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticCapacityPool], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _change_zone_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: Union[_models.ChangeZoneRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_capacity_pools_change_zone_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_change_zone(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: _models.ChangeZoneRequest,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticCapacityPool]:
- """Moves pool to another zone.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The content of the action request. Required.
- :type body: ~azure.mgmt.netapp.models.ChangeZoneRequest
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The
- ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_change_zone(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticCapacityPool]:
- """Moves pool to another zone.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The content of the action request. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The
- ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_change_zone(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticCapacityPool]:
- """Moves pool to another zone.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The content of the action request. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The
- ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_change_zone(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: Union[_models.ChangeZoneRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticCapacityPool]:
- """Moves pool to another zone.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The content of the action request. Is one of the following types:
- ChangeZoneRequest, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ChangeZoneRequest or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticCapacityPool. The
- ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._change_zone_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response_headers = {}
- response = pipeline_response.http_response
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = _deserialize(_models.ElasticCapacityPool, response.json())
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticCapacityPool].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticCapacityPool](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @overload
- async def check_volume_file_path_availability(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: _models.CheckElasticVolumeFilePathAvailabilityRequest,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> _models.CheckElasticResourceAvailabilityResponse:
- """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The content of the action request. Required.
- :type body: ~azure.mgmt.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse
- is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def check_volume_file_path_availability(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> _models.CheckElasticResourceAvailabilityResponse:
- """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The content of the action request. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse
- is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def check_volume_file_path_availability(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> _models.CheckElasticResourceAvailabilityResponse:
- """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The content of the action request. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse
- is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def check_volume_file_path_availability(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: Union[_models.CheckElasticVolumeFilePathAvailabilityRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> _models.CheckElasticResourceAvailabilityResponse:
- """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The content of the action request. Is one of the following types:
- CheckElasticVolumeFilePathAvailabilityRequest, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest or JSON or
- IO[bytes]
- :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse
- is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.CheckElasticResourceAvailabilityResponse] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_capacity_pools_check_volume_file_path_availability_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.CheckElasticResourceAvailabilityResponse, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
-
-class ElasticVolumesOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s
- :attr:`elastic_volumes` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def get(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> _models.ElasticVolume:
- """Get the details of the specified volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :return: ElasticVolume. The ElasticVolume is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticVolume
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None)
-
- _request = build_elastic_volumes_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ElasticVolume, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.ElasticVolume, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_volumes_create_or_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: _models.ElasticVolume,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticVolume]:
- """Create or update the specified volume within the capacity pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticVolume
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticVolume]:
- """Create or update the specified volume within the capacity pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: Resource create parameters. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticVolume]:
- """Create or update the specified volume within the capacity pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: Resource create parameters. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.ElasticVolume, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticVolume]:
- """Create or update the specified volume within the capacity pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticVolume, JSON,
- IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticVolume or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._create_or_update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticVolume, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticVolume].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticVolume](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.ElasticVolumeUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_volumes_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: _models.ElasticVolumeUpdate,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticVolume]:
- """Patch the specified elastic volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticVolumeUpdate
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticVolume]:
- """Patch the specified elastic volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: The resource properties to be updated. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticVolume]:
- """Patch the specified elastic volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: The resource properties to be updated. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.ElasticVolumeUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticVolume]:
- """Patch the specified elastic volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticVolumeUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticVolumeUpdate or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticVolume, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticVolume].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticVolume](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _delete_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_elastic_volumes_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_delete(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Delete the specified Elastic Volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_elastic_pool(
- self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any
- ) -> AsyncItemPaged["_models.ElasticVolume"]:
- """List all Elastic Volumes within the Elastic Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :return: An iterator like instance of ElasticVolume
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticVolume]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_volumes_list_by_elastic_pool_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticVolume], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _revert_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.ElasticVolumeRevert, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_volumes_revert_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_revert(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: _models.ElasticVolumeRevert,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticVolume]:
- """Revert an Elastic Volume to the snapshot specified in the body.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: The content of the action request. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticVolumeRevert
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_revert(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticVolume]:
- """Revert an Elastic Volume to the snapshot specified in the body.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: The content of the action request. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_revert(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticVolume]:
- """Revert an Elastic Volume to the snapshot specified in the body.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: The content of the action request. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_revert(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.ElasticVolumeRevert, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticVolume]:
- """Revert an Elastic Volume to the snapshot specified in the body.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: The content of the action request. Is one of the following types:
- ElasticVolumeRevert, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticVolumeRevert or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticVolume. The ElasticVolume is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._revert_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response_headers = {}
- response = pipeline_response.http_response
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = _deserialize(_models.ElasticVolume, response.json())
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticVolume].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticVolume](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
-
-class ElasticSnapshotsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s
- :attr:`elastic_snapshots` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "snapshot_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def get(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- **kwargs: Any
- ) -> _models.ElasticSnapshot:
- """Get a ElasticSnapshot.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the ElasticSnapshot. Required.
- :type snapshot_name: str
- :return: ElasticSnapshot. The ElasticSnapshot is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticSnapshot
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ElasticSnapshot] = kwargs.pop("cls", None)
-
- _request = build_elastic_snapshots_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ElasticSnapshot, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "snapshot_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: Union[_models.ElasticSnapshot, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_snapshots_create_or_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: _models.ElasticSnapshot,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticSnapshot]:
- """Create a ElasticSnapshot.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the ElasticSnapshot. Required.
- :type snapshot_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticSnapshot
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticSnapshot. The ElasticSnapshot is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticSnapshot]:
- """Create a ElasticSnapshot.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the ElasticSnapshot. Required.
- :type snapshot_name: str
- :param body: Resource create parameters. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticSnapshot. The ElasticSnapshot is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticSnapshot]:
- """Create a ElasticSnapshot.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the ElasticSnapshot. Required.
- :type snapshot_name: str
- :param body: Resource create parameters. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticSnapshot. The ElasticSnapshot is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "snapshot_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: Union[_models.ElasticSnapshot, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticSnapshot]:
- """Create a ElasticSnapshot.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the ElasticSnapshot. Required.
- :type snapshot_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticSnapshot, JSON,
- IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticSnapshot or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticSnapshot. The ElasticSnapshot is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticSnapshot] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._create_or_update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticSnapshot, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticSnapshot].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticSnapshot](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "snapshot_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _delete_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_elastic_snapshots_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "snapshot_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_delete(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Delete a ElasticSnapshot.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the ElasticSnapshot. Required.
- :type snapshot_name: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_elastic_volume(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> AsyncItemPaged["_models.ElasticSnapshot"]:
- """List ElasticSnapshot resources by ElasticVolume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :return: An iterator like instance of ElasticSnapshot
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticSnapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticSnapshot]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_snapshots_list_by_elastic_volume_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticSnapshot], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
-
-class ElasticSnapshotPoliciesOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s
- :attr:`elastic_snapshot_policies` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def get(
- self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
- ) -> _models.ElasticSnapshotPolicy:
- """Get a ElasticSnapshotPolicy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
- :type snapshot_policy_name: str
- :return: ElasticSnapshotPolicy. The ElasticSnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticSnapshotPolicy
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ElasticSnapshotPolicy] = kwargs.pop("cls", None)
-
- _request = build_elastic_snapshot_policies_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: Union[_models.ElasticSnapshotPolicy, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_snapshot_policies_create_or_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: _models.ElasticSnapshotPolicy,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]:
- """Create a ElasticSnapshotPolicy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
- :type snapshot_policy_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicy
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The
- ElasticSnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]:
- """Create a ElasticSnapshotPolicy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
- :type snapshot_policy_name: str
- :param body: Resource create parameters. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The
- ElasticSnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]:
- """Create a ElasticSnapshotPolicy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
- :type snapshot_policy_name: str
- :param body: Resource create parameters. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The
- ElasticSnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: Union[_models.ElasticSnapshotPolicy, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]:
- """Create a ElasticSnapshotPolicy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
- :type snapshot_policy_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticSnapshotPolicy,
- JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicy or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The
- ElasticSnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticSnapshotPolicy] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._create_or_update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticSnapshotPolicy].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticSnapshotPolicy](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: Union[_models.ElasticSnapshotPolicyUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_snapshot_policies_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: _models.ElasticSnapshotPolicyUpdate,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]:
- """Update a ElasticSnapshotPolicy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
- :type snapshot_policy_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdate
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The
- ElasticSnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]:
- """Update a ElasticSnapshotPolicy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
- :type snapshot_policy_name: str
- :param body: The resource properties to be updated. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The
- ElasticSnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]:
- """Update a ElasticSnapshotPolicy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
- :type snapshot_policy_name: str
- :param body: The resource properties to be updated. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The
- ElasticSnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: Union[_models.ElasticSnapshotPolicyUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticSnapshotPolicy]:
- """Update a ElasticSnapshotPolicy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
- :type snapshot_policy_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticSnapshotPolicyUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdate or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticSnapshotPolicy. The
- ElasticSnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticSnapshotPolicy] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticSnapshotPolicy].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticSnapshotPolicy](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _delete_initial(
- self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_elastic_snapshot_policies_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_delete(
- self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Delete a ElasticSnapshotPolicy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
- :type snapshot_policy_name: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_elastic_account(
- self, resource_group_name: str, account_name: str, **kwargs: Any
- ) -> AsyncItemPaged["_models.ElasticSnapshotPolicy"]:
- """List ElasticSnapshotPolicy resources by ElasticAccount.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :return: An iterator like instance of ElasticSnapshotPolicy
- :rtype:
- ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticSnapshotPolicy]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_snapshot_policies_list_by_elastic_account_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticSnapshotPolicy], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_elastic_volumes(
- self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
- ) -> AsyncItemPaged["_models.ElasticVolume"]:
- """Get elastic volumes associated with Elastic Snapshot Policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
- :type snapshot_policy_name: str
- :return: An iterator like instance of ElasticVolume
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticVolume]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_snapshot_policies_list_elastic_volumes_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticVolume], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
-
-class ElasticBackupVaultsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s
- :attr:`elastic_backup_vaults` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def get(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
- ) -> _models.ElasticBackupVault:
- """Get the Elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :return: ElasticBackupVault. The ElasticBackupVault is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticBackupVault
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ElasticBackupVault] = kwargs.pop("cls", None)
-
- _request = build_elastic_backup_vaults_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ElasticBackupVault, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: Union[_models.ElasticBackupVault, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_backup_vaults_create_or_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: _models.ElasticBackupVault,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupVault]:
- """Create or update the specified Elastic Backup Vault in the Elastic NetApp account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupVault
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupVault]:
- """Create or update the specified Elastic Backup Vault in the Elastic NetApp account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: Resource create parameters. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupVault]:
- """Create or update the specified Elastic Backup Vault in the Elastic NetApp account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: Resource create parameters. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: Union[_models.ElasticBackupVault, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupVault]:
- """Create or update the specified Elastic Backup Vault in the Elastic NetApp account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticBackupVault,
- JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupVault or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticBackupVault] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._create_or_update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticBackupVault, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticBackupVault].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticBackupVault](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: Union[_models.ElasticBackupVaultUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_backup_vaults_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: _models.ElasticBackupVaultUpdate,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupVault]:
- """Patch the specified NetApp Elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupVaultUpdate
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupVault]:
- """Patch the specified NetApp Elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: The resource properties to be updated. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupVault]:
- """Patch the specified NetApp Elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: The resource properties to be updated. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: Union[_models.ElasticBackupVaultUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupVault]:
- """Patch the specified NetApp Elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticBackupVaultUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupVaultUpdate or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticBackupVault. The ElasticBackupVault
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticBackupVault] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticBackupVault, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticBackupVault].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticBackupVault](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _delete_initial(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_elastic_backup_vaults_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_delete(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Delete the specified Elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_elastic_account(
- self, resource_group_name: str, account_name: str, **kwargs: Any
- ) -> AsyncItemPaged["_models.ElasticBackupVault"]:
- """List and describe all Elastic Backup Vaults in the elastic account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :return: An iterator like instance of ElasticBackupVault
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticBackupVault]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticBackupVault]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_backup_vaults_list_by_elastic_account_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticBackupVault], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
-
-class ElasticBackupPoliciesOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s
- :attr:`elastic_backup_policies` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def get(
- self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any
- ) -> _models.ElasticBackupPolicy:
- """Get the Elastic Backup Policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :return: ElasticBackupPolicy. The ElasticBackupPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticBackupPolicy
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ElasticBackupPolicy] = kwargs.pop("cls", None)
-
- _request = build_elastic_backup_policies_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ElasticBackupPolicy, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: Union[_models.ElasticBackupPolicy, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_backup_policies_create_or_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: _models.ElasticBackupPolicy,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupPolicy]:
- """Create or update the specified Elastic Backup Policy in the NetApp account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicy
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The
- ElasticBackupPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupPolicy]:
- """Create or update the specified Elastic Backup Policy in the NetApp account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: Resource create parameters. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The
- ElasticBackupPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupPolicy]:
- """Create or update the specified Elastic Backup Policy in the NetApp account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: Resource create parameters. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The
- ElasticBackupPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: Union[_models.ElasticBackupPolicy, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupPolicy]:
- """Create or update the specified Elastic Backup Policy in the NetApp account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticBackupPolicy,
- JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicy or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The
- ElasticBackupPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticBackupPolicy] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._create_or_update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticBackupPolicy, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticBackupPolicy].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticBackupPolicy](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: Union[_models.ElasticBackupPolicyUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_backup_policies_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: _models.ElasticBackupPolicyUpdate,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupPolicy]:
- """Patch the specified NetApp Elastic Backup Policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicyUpdate
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The
- ElasticBackupPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupPolicy]:
- """Patch the specified NetApp Elastic Backup Policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: The resource properties to be updated. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The
- ElasticBackupPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupPolicy]:
- """Patch the specified NetApp Elastic Backup Policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: The resource properties to be updated. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The
- ElasticBackupPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: Union[_models.ElasticBackupPolicyUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackupPolicy]:
- """Patch the specified NetApp Elastic Backup Policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticBackupPolicyUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicyUpdate or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticBackupPolicy. The
- ElasticBackupPolicy is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticBackupPolicy] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticBackupPolicy, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticBackupPolicy].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticBackupPolicy](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _delete_initial(
- self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_elastic_backup_policies_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_delete(
- self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Delete the specified Elastic Policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_elastic_account(
- self, resource_group_name: str, account_name: str, **kwargs: Any
- ) -> AsyncItemPaged["_models.ElasticBackupPolicy"]:
- """List and describe all Elastic Backup Policies in the elastic account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :return: An iterator like instance of ElasticBackupPolicy
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticBackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticBackupPolicy]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_backup_policies_list_by_elastic_account_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticBackupPolicy], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
-
-class ElasticBackupsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s
- :attr:`elastic_backups` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "backup_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def get(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
- ) -> _models.ElasticBackup:
- """Get the specified Elastic Backup under Elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :return: ElasticBackup. The ElasticBackup is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticBackup
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ElasticBackup] = kwargs.pop("cls", None)
-
- _request = build_elastic_backups_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ElasticBackup, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "backup_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Union[_models.ElasticBackup, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_backups_create_or_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: _models.ElasticBackup,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackup]:
- """Create an elastic backup under the elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackup
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackup]:
- """Create an elastic backup under the elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: Resource create parameters. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackup]:
- """Create an elastic backup under the elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: Resource create parameters. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "backup_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Union[_models.ElasticBackup, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackup]:
- """Create an elastic backup under the elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticBackup, JSON,
- IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackup or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticBackup] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._create_or_update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticBackup, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticBackup].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticBackup](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "backup_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Union[_models.ElasticBackup, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_backups_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: _models.ElasticBackup,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackup]:
- """Patch an elastic Backup under the Elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackup
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackup]:
- """Patch an elastic Backup under the Elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: The resource properties to be updated. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackup]:
- """Patch an elastic Backup under the Elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: The resource properties to be updated. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "backup_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Union[_models.ElasticBackup, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ElasticBackup]:
- """Patch an elastic Backup under the Elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticBackup, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackup or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ElasticBackup. The ElasticBackup is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticBackup] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticBackup, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ElasticBackup].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ElasticBackup](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "backup_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _delete_initial(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_elastic_backups_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "backup_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_delete(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Delete a ElasticBackup.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_vault(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
- ) -> AsyncItemPaged["_models.ElasticBackup"]:
- """List all elastic backups Under an elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :return: An iterator like instance of ElasticBackup
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticBackup]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_backups_list_by_vault_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticBackup], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
-
-class ActiveDirectoryConfigsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s
- :attr:`active_directory_configs` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def get(
- self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any
- ) -> _models.ActiveDirectoryConfig:
- """Get the details of the specified active directory configuration.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :return: ActiveDirectoryConfig. The ActiveDirectoryConfig is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ActiveDirectoryConfig
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ActiveDirectoryConfig] = kwargs.pop("cls", None)
-
- _request = build_active_directory_configs_get_request(
- resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ActiveDirectoryConfig, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _create_or_update_initial(
- self,
- resource_group_name: str,
- active_directory_config_name: str,
- body: Union[_models.ActiveDirectoryConfig, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_active_directory_configs_create_or_update_request(
- resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- active_directory_config_name: str,
- body: _models.ActiveDirectoryConfig,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]:
- """Create or update the specified active directory configuration.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfig
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The
- ActiveDirectoryConfig is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- active_directory_config_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]:
- """Create or update the specified active directory configuration.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: Resource create parameters. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The
- ActiveDirectoryConfig is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- active_directory_config_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]:
- """Create or update the specified active directory configuration.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: Resource create parameters. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The
- ActiveDirectoryConfig is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_create_or_update(
- self,
- resource_group_name: str,
- active_directory_config_name: str,
- body: Union[_models.ActiveDirectoryConfig, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]:
- """Create or update the specified active directory configuration.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: Resource create parameters. Is one of the following types: ActiveDirectoryConfig,
- JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfig or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The
- ActiveDirectoryConfig is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ActiveDirectoryConfig] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._create_or_update_initial(
- resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ActiveDirectoryConfig, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ActiveDirectoryConfig].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ActiveDirectoryConfig](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _update_initial(
- self,
- resource_group_name: str,
- active_directory_config_name: str,
- body: Union[_models.ActiveDirectoryConfigUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_active_directory_configs_update_request(
- resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- active_directory_config_name: str,
- body: _models.ActiveDirectoryConfigUpdate,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]:
- """Patch the specified active directory configuration.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfigUpdate
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The
- ActiveDirectoryConfig is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- active_directory_config_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]:
- """Patch the specified active directory configuration.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: The resource properties to be updated. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The
- ActiveDirectoryConfig is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- async def begin_update(
- self,
- resource_group_name: str,
- active_directory_config_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]:
- """Patch the specified active directory configuration.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: The resource properties to be updated. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The
- ActiveDirectoryConfig is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_update(
- self,
- resource_group_name: str,
- active_directory_config_name: str,
- body: Union[_models.ActiveDirectoryConfigUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncLROPoller[_models.ActiveDirectoryConfig]:
- """Patch the specified active directory configuration.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ActiveDirectoryConfigUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfigUpdate or JSON or IO[bytes]
- :return: An instance of AsyncLROPoller that returns ActiveDirectoryConfig. The
- ActiveDirectoryConfig is compatible with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ActiveDirectoryConfig] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._update_initial(
- resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ActiveDirectoryConfig, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.ActiveDirectoryConfig].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.ActiveDirectoryConfig](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def _delete_initial(
- self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_active_directory_configs_delete_request(
- resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace_async
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- async def begin_delete(
- self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any
- ) -> AsyncLROPoller[None]:
- """Delete the specified Active Directory configuration.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :return: An instance of AsyncLROPoller that returns None
- :rtype: ~azure.core.polling.AsyncLROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._delete_initial(
- resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: AsyncPollingMethod = cast(
- AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
- else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={"2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]},
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_resource_group(
- self, resource_group_name: str, **kwargs: Any
- ) -> AsyncItemPaged["_models.ActiveDirectoryConfig"]:
- """List all active directory configurations within the resource group.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :return: An iterator like instance of ActiveDirectoryConfig
- :rtype:
- ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ActiveDirectoryConfig]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_active_directory_configs_list_by_resource_group_request(
- resource_group_name=resource_group_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ActiveDirectoryConfig], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={"2025-09-01-preview": ["api_version", "subscription_id", "accept"]},
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.ActiveDirectoryConfig"]:
- """List all active directory configurations within the subscription.
-
- :return: An iterator like instance of ActiveDirectoryConfig
- :rtype:
- ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ActiveDirectoryConfig]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_active_directory_configs_list_by_subscription_request(
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- async def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ActiveDirectoryConfig], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
-
- async def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return AsyncItemPaged(get_next, extract_data)
-
-
class NetAppResourceQuotaLimitsOperations:
"""
.. warning::
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 49327e68a922..761852960b98 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
@@ -17,10 +17,6 @@
AccountEncryption,
AccountProperties,
ActiveDirectory,
- ActiveDirectoryConfig,
- ActiveDirectoryConfigProperties,
- ActiveDirectoryConfigUpdate,
- ActiveDirectoryConfigUpdateProperties,
AuthorizeRequest,
Backup,
BackupPatch,
@@ -37,77 +33,14 @@
BackupsMigrationRequest,
BreakFileLocksRequest,
BreakReplicationRequest,
- Bucket,
- BucketCredentialsExpiry,
- BucketGenerateCredentials,
- BucketPatch,
- BucketPatchProperties,
- BucketProperties,
- BucketServerPatchProperties,
- BucketServerProperties,
- Cache,
- CacheMountTargetProperties,
- CacheProperties,
- CachePropertiesExportPolicy,
- CacheUpdate,
- CacheUpdateProperties,
CapacityPool,
CapacityPoolPatch,
ChangeKeyVault,
- ChangeZoneRequest,
CheckAvailabilityResponse,
- CheckElasticResourceAvailabilityResponse,
- CheckElasticVolumeFilePathAvailabilityRequest,
- CifsUser,
ClusterPeerCommandResponse,
DailySchedule,
DestinationReplication,
Dimension,
- ElasticAccount,
- ElasticAccountProperties,
- ElasticAccountUpdate,
- ElasticAccountUpdateProperties,
- ElasticBackup,
- ElasticBackupPolicy,
- ElasticBackupPolicyProperties,
- ElasticBackupPolicyUpdate,
- ElasticBackupPolicyUpdateProperties,
- ElasticBackupProperties,
- ElasticBackupVault,
- ElasticBackupVaultProperties,
- ElasticBackupVaultUpdate,
- ElasticCapacityPool,
- ElasticCapacityPoolProperties,
- ElasticCapacityPoolUpdate,
- ElasticCapacityPoolUpdateProperties,
- ElasticEncryption,
- ElasticEncryptionConfiguration,
- ElasticEncryptionIdentity,
- ElasticExportPolicy,
- ElasticExportPolicyRule,
- ElasticKeyVaultProperties,
- ElasticMountTargetProperties,
- ElasticSmbPatchProperties,
- ElasticSmbProperties,
- ElasticSnapshot,
- ElasticSnapshotPolicy,
- ElasticSnapshotPolicyDailySchedule,
- ElasticSnapshotPolicyHourlySchedule,
- ElasticSnapshotPolicyMonthlySchedule,
- ElasticSnapshotPolicyProperties,
- ElasticSnapshotPolicyUpdate,
- ElasticSnapshotPolicyUpdateProperties,
- ElasticSnapshotPolicyWeeklySchedule,
- ElasticSnapshotProperties,
- ElasticVolume,
- ElasticVolumeBackupProperties,
- ElasticVolumeDataProtectionPatchProperties,
- ElasticVolumeDataProtectionProperties,
- ElasticVolumeProperties,
- ElasticVolumeRevert,
- ElasticVolumeSnapshotProperties,
- ElasticVolumeUpdate,
- ElasticVolumeUpdateProperties,
EncryptionIdentity,
EncryptionTransitionRequest,
ErrorAdditionalInfo,
@@ -115,7 +48,6 @@
ErrorResponse,
ExportPolicyRule,
FilePathAvailabilityRequest,
- FileSystemUser,
GetGroupIdListForLDAPUserRequest,
GetGroupIdListForLDAPUserResponse,
GetKeyVaultStatusResponse,
@@ -123,7 +55,6 @@
HourlySchedule,
KeyVaultPrivateEndpoint,
KeyVaultProperties,
- LdapConfiguration,
LdapSearchScopeOpt,
ListQuotaReportResponse,
ListReplicationsRequest,
@@ -135,14 +66,11 @@
NetAppAccount,
NetAppAccountPatch,
NetworkSiblingSet,
- NfsUser,
NicInfo,
Operation,
OperationDisplay,
OperationProperties,
- OriginClusterInformation,
PeerClusterForVolumeMigrationRequest,
- PeeringPassphrases,
PlacementKeyValuePairs,
PoolChangeRequest,
PoolPatchProperties,
@@ -153,6 +81,7 @@
QuotaItem,
QuotaItemProperties,
QuotaReport,
+ QuotaReportFilterRequest,
RansomwareProtectionPatchSettings,
RansomwareProtectionSettings,
RansomwareReport,
@@ -171,11 +100,7 @@
Resource,
ResourceNameAvailabilityRequest,
RestoreStatus,
- SecretPassword,
- SecretPasswordIdentity,
- SecretPasswordKeyVaultProperties,
ServiceSpecification,
- SmbSettings,
Snapshot,
SnapshotPatch,
SnapshotPolicy,
@@ -231,54 +156,22 @@
ApplicationType,
AvsDataStore,
BackupType,
- BreakthroughMode,
- BucketPatchPermissions,
- BucketPermissions,
- CacheLifeCycleState,
- CacheProvisioningState,
- CheckElasticResourceAvailabilityReason,
- CheckElasticResourceAvailabilityStatus,
CheckNameResourceTypes,
CheckQuotaNameResourceTypes,
ChownMode,
- CifsChangeNotifyState,
CoolAccessRetrievalPolicy,
CoolAccessTieringPolicy,
CreatedByType,
- CredentialsStatus,
- DayOfWeek,
DesiredRansomwareProtectionState,
- ElasticBackupPolicyState,
- ElasticBackupType,
- ElasticKeyVaultStatus,
- ElasticNfsv3Access,
- ElasticNfsv4Access,
- ElasticPoolEncryptionKeySource,
- ElasticProtocolType,
- ElasticResourceAvailabilityStatus,
- ElasticRootAccess,
- ElasticServiceLevel,
- ElasticSmbEncryption,
- ElasticUnixAccessRule,
- ElasticVolumePolicyEnforcement,
- ElasticVolumeRestorationState,
EnableSubvolumes,
- EnableWriteBackState,
EncryptionKeySource,
- EncryptionState,
EncryptionType,
EndpointType,
Exclude,
- ExternalReplicationSetupStatus,
FileAccessLogs,
- GlobalFileLockingState,
InAvailabilityReasonType,
- KerberosState,
KeySource,
KeyVaultStatus,
- LargeVolumeType,
- LdapServerType,
- LdapState,
ManagedServiceIdentityType,
MetricAggregationType,
MirrorState,
@@ -286,9 +179,8 @@
NetAppProvisioningState,
NetworkFeatures,
NetworkSiblingSetProvisioningState,
- PolicyStatus,
- ProtocolTypes,
QosType,
+ QuotaType,
RansomwareReportSeverity,
RansomwareReportState,
RansomwareSuspectResolution,
@@ -299,16 +191,10 @@
SecurityStyle,
ServiceLevel,
SmbAccessBasedEnumeration,
- SmbEncryptionState,
SmbNonBrowsable,
- SnapshotDirectoryVisibility,
- SnapshotUsage,
- Type,
VolumeBackupRelationshipStatus,
- VolumeLanguage,
VolumeReplicationRelationshipStatus,
VolumeRestoreRelationshipStatus,
- VolumeSize,
VolumeStorageToNetworkProximity,
)
from ._patch import __all__ as _patch_all
@@ -319,10 +205,6 @@
"AccountEncryption",
"AccountProperties",
"ActiveDirectory",
- "ActiveDirectoryConfig",
- "ActiveDirectoryConfigProperties",
- "ActiveDirectoryConfigUpdate",
- "ActiveDirectoryConfigUpdateProperties",
"AuthorizeRequest",
"Backup",
"BackupPatch",
@@ -339,77 +221,14 @@
"BackupsMigrationRequest",
"BreakFileLocksRequest",
"BreakReplicationRequest",
- "Bucket",
- "BucketCredentialsExpiry",
- "BucketGenerateCredentials",
- "BucketPatch",
- "BucketPatchProperties",
- "BucketProperties",
- "BucketServerPatchProperties",
- "BucketServerProperties",
- "Cache",
- "CacheMountTargetProperties",
- "CacheProperties",
- "CachePropertiesExportPolicy",
- "CacheUpdate",
- "CacheUpdateProperties",
"CapacityPool",
"CapacityPoolPatch",
"ChangeKeyVault",
- "ChangeZoneRequest",
"CheckAvailabilityResponse",
- "CheckElasticResourceAvailabilityResponse",
- "CheckElasticVolumeFilePathAvailabilityRequest",
- "CifsUser",
"ClusterPeerCommandResponse",
"DailySchedule",
"DestinationReplication",
"Dimension",
- "ElasticAccount",
- "ElasticAccountProperties",
- "ElasticAccountUpdate",
- "ElasticAccountUpdateProperties",
- "ElasticBackup",
- "ElasticBackupPolicy",
- "ElasticBackupPolicyProperties",
- "ElasticBackupPolicyUpdate",
- "ElasticBackupPolicyUpdateProperties",
- "ElasticBackupProperties",
- "ElasticBackupVault",
- "ElasticBackupVaultProperties",
- "ElasticBackupVaultUpdate",
- "ElasticCapacityPool",
- "ElasticCapacityPoolProperties",
- "ElasticCapacityPoolUpdate",
- "ElasticCapacityPoolUpdateProperties",
- "ElasticEncryption",
- "ElasticEncryptionConfiguration",
- "ElasticEncryptionIdentity",
- "ElasticExportPolicy",
- "ElasticExportPolicyRule",
- "ElasticKeyVaultProperties",
- "ElasticMountTargetProperties",
- "ElasticSmbPatchProperties",
- "ElasticSmbProperties",
- "ElasticSnapshot",
- "ElasticSnapshotPolicy",
- "ElasticSnapshotPolicyDailySchedule",
- "ElasticSnapshotPolicyHourlySchedule",
- "ElasticSnapshotPolicyMonthlySchedule",
- "ElasticSnapshotPolicyProperties",
- "ElasticSnapshotPolicyUpdate",
- "ElasticSnapshotPolicyUpdateProperties",
- "ElasticSnapshotPolicyWeeklySchedule",
- "ElasticSnapshotProperties",
- "ElasticVolume",
- "ElasticVolumeBackupProperties",
- "ElasticVolumeDataProtectionPatchProperties",
- "ElasticVolumeDataProtectionProperties",
- "ElasticVolumeProperties",
- "ElasticVolumeRevert",
- "ElasticVolumeSnapshotProperties",
- "ElasticVolumeUpdate",
- "ElasticVolumeUpdateProperties",
"EncryptionIdentity",
"EncryptionTransitionRequest",
"ErrorAdditionalInfo",
@@ -417,7 +236,6 @@
"ErrorResponse",
"ExportPolicyRule",
"FilePathAvailabilityRequest",
- "FileSystemUser",
"GetGroupIdListForLDAPUserRequest",
"GetGroupIdListForLDAPUserResponse",
"GetKeyVaultStatusResponse",
@@ -425,7 +243,6 @@
"HourlySchedule",
"KeyVaultPrivateEndpoint",
"KeyVaultProperties",
- "LdapConfiguration",
"LdapSearchScopeOpt",
"ListQuotaReportResponse",
"ListReplicationsRequest",
@@ -437,14 +254,11 @@
"NetAppAccount",
"NetAppAccountPatch",
"NetworkSiblingSet",
- "NfsUser",
"NicInfo",
"Operation",
"OperationDisplay",
"OperationProperties",
- "OriginClusterInformation",
"PeerClusterForVolumeMigrationRequest",
- "PeeringPassphrases",
"PlacementKeyValuePairs",
"PoolChangeRequest",
"PoolPatchProperties",
@@ -455,6 +269,7 @@
"QuotaItem",
"QuotaItemProperties",
"QuotaReport",
+ "QuotaReportFilterRequest",
"RansomwareProtectionPatchSettings",
"RansomwareProtectionSettings",
"RansomwareReport",
@@ -473,11 +288,7 @@
"Resource",
"ResourceNameAvailabilityRequest",
"RestoreStatus",
- "SecretPassword",
- "SecretPasswordIdentity",
- "SecretPasswordKeyVaultProperties",
"ServiceSpecification",
- "SmbSettings",
"Snapshot",
"SnapshotPatch",
"SnapshotPolicy",
@@ -530,54 +341,22 @@
"ApplicationType",
"AvsDataStore",
"BackupType",
- "BreakthroughMode",
- "BucketPatchPermissions",
- "BucketPermissions",
- "CacheLifeCycleState",
- "CacheProvisioningState",
- "CheckElasticResourceAvailabilityReason",
- "CheckElasticResourceAvailabilityStatus",
"CheckNameResourceTypes",
"CheckQuotaNameResourceTypes",
"ChownMode",
- "CifsChangeNotifyState",
"CoolAccessRetrievalPolicy",
"CoolAccessTieringPolicy",
"CreatedByType",
- "CredentialsStatus",
- "DayOfWeek",
"DesiredRansomwareProtectionState",
- "ElasticBackupPolicyState",
- "ElasticBackupType",
- "ElasticKeyVaultStatus",
- "ElasticNfsv3Access",
- "ElasticNfsv4Access",
- "ElasticPoolEncryptionKeySource",
- "ElasticProtocolType",
- "ElasticResourceAvailabilityStatus",
- "ElasticRootAccess",
- "ElasticServiceLevel",
- "ElasticSmbEncryption",
- "ElasticUnixAccessRule",
- "ElasticVolumePolicyEnforcement",
- "ElasticVolumeRestorationState",
"EnableSubvolumes",
- "EnableWriteBackState",
"EncryptionKeySource",
- "EncryptionState",
"EncryptionType",
"EndpointType",
"Exclude",
- "ExternalReplicationSetupStatus",
"FileAccessLogs",
- "GlobalFileLockingState",
"InAvailabilityReasonType",
- "KerberosState",
"KeySource",
"KeyVaultStatus",
- "LargeVolumeType",
- "LdapServerType",
- "LdapState",
"ManagedServiceIdentityType",
"MetricAggregationType",
"MirrorState",
@@ -585,9 +364,8 @@
"NetAppProvisioningState",
"NetworkFeatures",
"NetworkSiblingSetProvisioningState",
- "PolicyStatus",
- "ProtocolTypes",
"QosType",
+ "QuotaType",
"RansomwareReportSeverity",
"RansomwareReportState",
"RansomwareSuspectResolution",
@@ -598,16 +376,10 @@
"SecurityStyle",
"ServiceLevel",
"SmbAccessBasedEnumeration",
- "SmbEncryptionState",
"SmbNonBrowsable",
- "SnapshotDirectoryVisibility",
- "SnapshotUsage",
- "Type",
"VolumeBackupRelationshipStatus",
- "VolumeLanguage",
"VolumeReplicationRelationshipStatus",
"VolumeRestoreRelationshipStatus",
- "VolumeSize",
"VolumeStorageToNetworkProximity",
]
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_enums.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_enums.py
index 72b32e5492b0..db25adfa3445 100644
--- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_enums.py
+++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_enums.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -11,7 +10,9 @@
from azure.core import CaseInsensitiveEnumMeta
-class AcceptGrowCapacityPoolForShortTermCloneSplit(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+class AcceptGrowCapacityPoolForShortTermCloneSplit( # pylint: disable=name-too-long
+ str, Enum, metaclass=CaseInsensitiveEnumMeta
+):
"""While auto splitting the short term clone volume, if the parent pool does not have enough space
to accommodate the volume after split, it will be automatically resized, which will lead to
increased billing. To accept capacity pool size auto grow and create a short term clone volume,
@@ -29,175 +30,99 @@ class ActiveDirectoryStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Status of the Active Directory."""
CREATED = "Created"
- """Active Directory created but not in use"""
+ """Active Directory created but not in use."""
IN_USE = "InUse"
- """Active Directory in use by SMB Volume"""
+ """Active Directory in use by SMB Volume."""
DELETED = "Deleted"
- """Active Directory Deleted"""
+ """Active Directory Deleted."""
ERROR = "Error"
- """Error with the Active Directory"""
+ """Error with the Active Directory."""
UPDATING = "Updating"
- """Active Directory Updating"""
+ """Active Directory Updating."""
class ActualRansomwareProtectionState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The actual state of the Advanced Ransomware Protection feature."""
DISABLED = "Disabled"
- """Advanced Ransomware Protection is disabled"""
+ """Advanced Ransomware Protection is disabled."""
ENABLED = "Enabled"
- """Advanced Ransomware Protection is enabled"""
+ """Advanced Ransomware Protection is enabled."""
LEARNING = "Learning"
- """Advanced Ransomware Protection is in learning mode"""
+ """Advanced Ransomware Protection is in learning mode."""
PAUSED = "Paused"
- """Advanced Ransomware Protection is in paused state"""
+ """Advanced Ransomware Protection is in paused state."""
class ApplicationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Application Type."""
SAP_HANA = "SAP-HANA"
+ """SAP_HANA."""
ORACLE = "ORACLE"
+ """ORACLE."""
class AvsDataStore(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose."""
ENABLED = "Enabled"
- """avsDataStore is enabled"""
+ """avsDataStore is enabled."""
DISABLED = "Disabled"
- """avsDataStore is disabled"""
+ """avsDataStore is disabled."""
class BackupType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Type of backup Manual or Scheduled."""
MANUAL = "Manual"
- """Manual backup"""
+ """Manual backup."""
SCHEDULED = "Scheduled"
- """Scheduled backup"""
-
-
-class BreakthroughMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Specifies whether the volume operates in Breakthrough Mode. When set to 'Enabled', the volume
- runs on the resources configured for this mode,
- delivering improved performance and higher throughput. If set to 'Disabled' or omitted, the
- volume uses the basic configuration. This feature
- is available only in regions where it’s been configured and first-time users must finish
- onboarding prior to using Breakthrough Mode.
- """
-
- ENABLED = "Enabled"
- """The volume runs on the resources configured for Breakthrough mode which ensures consistent high
- performance and a higher throughput."""
- DISABLED = "Disabled"
- """The volume uses configuration that provides basic performance and throughput."""
-
-
-class BucketPatchPermissions(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Access permissions for the bucket. Either ReadOnly or ReadWrite."""
-
- READ_ONLY = "ReadOnly"
- """Read-only access to bucket."""
- READ_WRITE = "ReadWrite"
- """Read-write access to bucket."""
-
-
-class BucketPermissions(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no
- value is provided during bucket creation.
- """
-
- READ_ONLY = "ReadOnly"
- """Read-only access to bucket."""
- READ_WRITE = "ReadWrite"
- """Read-write access to bucket."""
-
-
-class CacheLifeCycleState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Azure NetApp Files Cache lifecycle management."""
-
- CLUSTER_PEERING_OFFER_SENT = "ClusterPeeringOfferSent"
- """Cluster peering offer has been sent."""
- VSERVER_PEERING_OFFER_SENT = "VserverPeeringOfferSent"
- """VServer peering offer has been sent."""
- CREATING = "Creating"
- """Cache creation in progress."""
- SUCCEEDED = "Succeeded"
- """Cache creation succeeded and is available for use."""
- FAILED = "Failed"
- """Cache is in a failed state"""
-
-
-class CacheProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Azure lifecycle management."""
-
- CREATING = "Creating"
- """The resource is being created."""
- UPDATING = "Updating"
- """The resource is being updated."""
- DELETING = "Deleting"
- """The resource is being deleted."""
- FAILED = "Failed"
- """The resource is in a failed state."""
- SUCCEEDED = "Succeeded"
- """The resource is succeeded."""
- CANCELED = "Canceled"
- """Resource creation was canceled."""
-
-
-class CheckElasticResourceAvailabilityReason(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Availability reason."""
-
- INVALID = "Invalid"
- """Value indicating the name provided does not match Azure NetApp Files naming requirements"""
- ALREADY_EXISTS = "AlreadyExists"
- """Value indicating the name is already in use and is therefore unavailable"""
-
-
-class CheckElasticResourceAvailabilityStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Availability status."""
-
- TRUE = "True"
- """Value indicating the name is valid and available"""
- FALSE = "False"
- """Value indicating the the name is invalid, unavailable, or both."""
+ """Scheduled backup."""
class CheckNameResourceTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Resource type used for verification."""
MICROSOFT_NET_APP_NET_APP_ACCOUNTS = "Microsoft.NetApp/netAppAccounts"
+ """MICROSOFT_NET_APP_NET_APP_ACCOUNTS."""
MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS = "Microsoft.NetApp/netAppAccounts/capacityPools"
+ """MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS."""
MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes"
+ """MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES."""
MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS = (
"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots"
)
+ """MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS."""
MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS = "Microsoft.NetApp/netAppAccounts/backupVaults/backups"
"""ANF Backup under a volume , deprecated, use
``Microsoft.NetApp/netAppAccounts/backupVaults/backups`` instead."""
MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS = (
"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups"
)
- """ANF Backup under a Backup Vault"""
+ """ANF Backup under a Backup Vault."""
class CheckQuotaNameResourceTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Resource type used for verification."""
MICROSOFT_NET_APP_NET_APP_ACCOUNTS = "Microsoft.NetApp/netAppAccounts"
+ """MICROSOFT_NET_APP_NET_APP_ACCOUNTS."""
MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS = "Microsoft.NetApp/netAppAccounts/capacityPools"
+ """MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS."""
MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes"
+ """MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES."""
MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS = (
"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots"
)
+ """MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS."""
MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS = "Microsoft.NetApp/netAppAccounts/backupVaults/backups"
"""ANF Backup under a volume , deprecated, use
``Microsoft.NetApp/netAppAccounts/backupVaults/backups`` instead."""
MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS = (
"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups"
)
- """ANF Backup under a Backup Vault"""
+ """ANF Backup under a Backup Vault."""
class ChownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -207,32 +132,26 @@ class ChownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""
RESTRICTED = "Restricted"
+ """RESTRICTED."""
UNRESTRICTED = "Unrestricted"
-
-
-class CifsChangeNotifyState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Flag indicating whether a CIFS change notification is enabled for the cache."""
-
- DISABLED = "Disabled"
- """CIFS change notification is disabled"""
- ENABLED = "Enabled"
- """CIFS change notification is enabled"""
+ """UNRESTRICTED."""
class CoolAccessRetrievalPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard
storage based on the read pattern for cool access enabled volumes. The possible values for this
- field are:
- Default - Data will be pulled from cool tier to standard storage on random reads. This policy
- is the default.
- OnRead - All client-driven data read is pulled from cool tier to standard storage on both
- sequential and random reads.
- Never - No client-driven data is pulled from cool tier to standard storage.
+ field are: Default - Data will be pulled from cool tier to standard storage on random reads.
+ This policy is the default. OnRead - All client-driven data read is pulled from cool tier to
+ standard storage on both sequential and random reads. Never - No client-driven data is pulled
+ from cool tier to standard storage.
"""
DEFAULT = "Default"
+ """DEFAULT."""
ON_READ = "OnRead"
+ """ON_READ."""
NEVER = "Never"
+ """NEVER."""
class CoolAccessTieringPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -244,7 +163,9 @@ class CoolAccessTieringPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""
AUTO = "Auto"
+ """AUTO."""
SNAPSHOT_ONLY = "SnapshotOnly"
+ """SNAPSHOT_ONLY."""
class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -260,203 +181,22 @@ class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The entity was created by a key."""
-class CredentialsStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """The bucket credentials status. There states:
-
- "NoCredentialsSet": Access and Secret key pair have not been generated.
- "CredentialsExpired": Access and Secret key pair have expired.
- "Active": The certificate has been installed and credentials are unexpired.
- """
-
- NO_CREDENTIALS_SET = "NoCredentialsSet"
- """Access and Secret key pair have not been generated."""
- CREDENTIALS_EXPIRED = "CredentialsExpired"
- """Access and Secret key pair have expired."""
- ACTIVE = "Active"
- """The certificate has been installed on the bucket server and the bucket credentials are
- unexpired."""
-
-
-class DayOfWeek(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Day of the week."""
-
- SUNDAY = "Sunday"
- """Take a snapshot each Sunday"""
- MONDAY = "Monday"
- """Take a snapshot each Monday"""
- TUESDAY = "Tuesday"
- """Take a snapshot each Tuesday"""
- WEDNESDAY = "Wednesday"
- """Take a snapshot each Wednesday"""
- THURSDAY = "Thursday"
- """Take a snapshot each Thursday"""
- FRIDAY = "Friday"
- """Take a snapshot each Friday"""
- SATURDAY = "Saturday"
- """Take a snapshot each Saturday"""
-
-
class DesiredRansomwareProtectionState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The desired state of the Advanced Ransomware Protection feature."""
DISABLED = "Disabled"
- """Advanced Ransomware Protection is disabled"""
- ENABLED = "Enabled"
- """Advanced Ransomware Protection is enabled"""
-
-
-class ElasticBackupPolicyState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Elastic Backup Policy state."""
-
+ """Advanced Ransomware Protection is disabled."""
ENABLED = "Enabled"
- """Value indicating the policy is enabled"""
- DISABLED = "Disabled"
- """Value indicating the policy is disabled"""
-
-
-class ElasticBackupType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Type of backup."""
-
- MANUAL = "Manual"
- """Manual backup type"""
- SCHEDULED = "Scheduled"
- """Scheduled backup type"""
-
-
-class ElasticKeyVaultStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """KeyVault status."""
-
- CREATED = "Created"
- """KeyVault connection created but not in use"""
- IN_USE = "InUse"
- """KeyVault connection in use by SMB Volume"""
- DELETED = "Deleted"
- """KeyVault connection Deleted"""
- ERROR = "Error"
- """Error with the KeyVault connection"""
- UPDATING = "Updating"
- """KeyVault connection Updating"""
-
-
-class ElasticNfsv3Access(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """NFSv3 access."""
-
- ENABLED = "Enabled"
- """Clients can connect to the volume using the NFSv3 protocol."""
- DISABLED = "Disabled"
- """Clients can't connect to the volume using the NFSv3 protocol."""
-
-
-class ElasticNfsv4Access(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """NFSv4 access."""
-
- ENABLED = "Enabled"
- """Clients can connect to the volume using the NFSv4 protocol."""
- DISABLED = "Disabled"
- """Clients can't connect to the volume using the NFSv4 protocol."""
-
-
-class ElasticPoolEncryptionKeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Pool Encryption Key Source."""
-
- NET_APP = "NetApp"
- """Represents the encryption key source of Elastic pool is Microsoft.NetApp"""
- KEY_VAULT = "KeyVault"
- """Represents the encryption key source of Elastic pool is Microsoft.KeyVault"""
-
-
-class ElasticProtocolType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Protocol types for elastic volume."""
-
- NF_SV3 = "NFSv3"
- """NFSv3 protocol type"""
- NF_SV4 = "NFSv4"
- """NFSv4 protocol type"""
- SMB = "SMB"
- """SMB/CIFS protocol type"""
-
-
-class ElasticResourceAvailabilityStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Current availability status of the resource."""
-
- ONLINE = "Online"
- """The resource is currently Online and accessible"""
- OFFLINE = "Offline"
- """The resource is currently Offline and not accessible"""
-
-
-class ElasticRootAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Root access."""
-
- ENABLED = "Enabled"
- """Root user access is enabled for clients affected by this rule"""
- DISABLED = "Disabled"
- """Root user access is disabled for clients affected by this rule"""
-
-
-class ElasticServiceLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Service level for elastic capacity pool."""
-
- ZONE_REDUNDANT = "ZoneRedundant"
- """Zone redundant storage service level."""
-
-
-class ElasticSmbEncryption(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """SMB encryption."""
-
- ENABLED = "Enabled"
- """Value indicating the SMB encryption is enabled"""
- DISABLED = "Disabled"
- """Value indicating the SMB encryption is disabled"""
-
-
-class ElasticUnixAccessRule(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Unix access rule."""
-
- READ_ONLY = "ReadOnly"
- """Clients connecting with this rule will only have read access to the volume"""
- READ_WRITE = "ReadWrite"
- """Clients connecting with this rule will have full read and write access to the volume"""
- NO_ACCESS = "NoAccess"
- """Clients connecting with this rule will have no access to the volume"""
-
-
-class ElasticVolumePolicyEnforcement(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Policy enforcement."""
-
- ENFORCED = "Enforced"
- """Value indicating the policy is enforced on the volume."""
- NOT_ENFORCED = "NotEnforced"
- """Value indicating the policy is not enforced on the volume."""
-
-
-class ElasticVolumeRestorationState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """The current state of the restoration process."""
-
- RESTORING = "Restoring"
- """Value indicating that the volume is currently restoring."""
- RESTORED = "Restored"
- """Value indicating that the volume is restored."""
- FAILED = "Failed"
- """Value indicating that the volume restore has failed."""
+ """Advanced Ransomware Protection is enabled."""
class EnableSubvolumes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Flag indicating whether subvolume operations are enabled on the volume."""
ENABLED = "Enabled"
- """subvolumes are enabled"""
- DISABLED = "Disabled"
- """subvolumes are not enabled"""
-
-
-class EnableWriteBackState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Flag indicating whether writeback is enabled for the cache."""
-
+ """subvolumes are enabled."""
DISABLED = "Disabled"
- """Writeback cache is disabled"""
- ENABLED = "Enabled"
- """Writeback cache is enabled"""
+ """subvolumes are not enabled."""
class EncryptionKeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -466,18 +206,9 @@ class EncryptionKeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""
MICROSOFT_NET_APP = "Microsoft.NetApp"
- """Microsoft-managed key encryption"""
+ """Microsoft-managed key encryption."""
MICROSOFT_KEY_VAULT = "Microsoft.KeyVault"
- """Customer-managed key encryption"""
-
-
-class EncryptionState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Specifies if the cache is encryption or not."""
-
- DISABLED = "Disabled"
- """Encryption is disabled"""
- ENABLED = "Enabled"
- """Encryption is enabled"""
+ """Customer-managed key encryption."""
class EncryptionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -486,16 +217,18 @@ class EncryptionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""
SINGLE = "Single"
- """EncryptionType Single, volumes will use single encryption at rest"""
+ """EncryptionType Single, volumes will use single encryption at rest."""
DOUBLE = "Double"
- """EncryptionType Double, volumes will use double encryption at rest"""
+ """EncryptionType Double, volumes will use double encryption at rest."""
class EndpointType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Indicates whether the local volume is the source or destination for the Volume Replication."""
SRC = "src"
+ """SRC."""
DST = "dst"
+ """DST."""
class Exclude(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -504,28 +237,9 @@ class Exclude(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""
NONE = "None"
- """'None' returns all replications"""
+ """'None' returns all replications."""
DELETED = "Deleted"
- """'Deleted' excludes deleted replications"""
-
-
-class ExternalReplicationSetupStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Property that only applies to external replications. Provides a machine-readable value for the
- status of the external replication setup.
- """
-
- CLUSTER_PEER_REQUIRED = "ClusterPeerRequired"
- """Your cluster needs to be peered by using the 'peerExternalCluster' action"""
- CLUSTER_PEER_PENDING = "ClusterPeerPending"
- """The peering needs to be accepted on your cluster before the setup can proceed"""
- V_SERVER_PEER_REQUIRED = "VServerPeerRequired"
- """Need to call 'authorizeExternalReplication' and accept the returned 'vserver peer accept'
- command on your cluster to finish setting up the external replication"""
- REPLICATION_CREATE_REQUIRED = "ReplicationCreateRequired"
- """Need to call 'authorizeExternalReplication' to finish setting up the external replication"""
- NO_ACTION_REQUIRED = "NoActionRequired"
- """External Replication setup is complete, you can now monitor the 'mirrorState' in the
- replication status for the health of the replication"""
+ """'Deleted' excludes deleted replications."""
class FileAccessLogs(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -534,18 +248,9 @@ class FileAccessLogs(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""
ENABLED = "Enabled"
- """fileAccessLogs are enabled"""
+ """fileAccessLogs are enabled."""
DISABLED = "Disabled"
- """fileAccessLogs are not enabled"""
-
-
-class GlobalFileLockingState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Flag indicating whether the global file lock is enabled for the cache."""
-
- DISABLED = "Disabled"
- """Global file locking is disabled"""
- ENABLED = "Enabled"
- """Global file locking is enabled"""
+ """fileAccessLogs are not enabled."""
class InAvailabilityReasonType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -555,16 +260,9 @@ class InAvailabilityReasonType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""
INVALID = "Invalid"
+ """INVALID."""
ALREADY_EXISTS = "AlreadyExists"
-
-
-class KerberosState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Describe if a cache is Kerberos enabled."""
-
- DISABLED = "Disabled"
- """Kerberos is disabled"""
- ENABLED = "Enabled"
- """Kerberos is enabled"""
+ """ALREADY_EXISTS."""
class KeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -573,58 +271,24 @@ class KeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""
MICROSOFT_NET_APP = "Microsoft.NetApp"
- """Microsoft-managed key encryption"""
+ """Microsoft-managed key encryption."""
MICROSOFT_KEY_VAULT = "Microsoft.KeyVault"
- """Customer-managed key encryption"""
+ """Customer-managed key encryption."""
class KeyVaultStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Status of the KeyVault connection."""
CREATED = "Created"
- """KeyVault connection created but not in use"""
+ """KeyVault connection created but not in use."""
IN_USE = "InUse"
- """KeyVault connection in use by SMB Volume"""
+ """KeyVault connection in use by SMB Volume."""
DELETED = "Deleted"
- """KeyVault connection Deleted"""
+ """KeyVault connection Deleted."""
ERROR = "Error"
- """Error with the KeyVault connection"""
+ """Error with the KeyVault connection."""
UPDATING = "Updating"
- """KeyVault connection Updating"""
-
-
-class LargeVolumeType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Specifies the type of the Large Volume. When set to 'LargeVolume', the large volume is created
- with standard configuration.
- If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher
- capacity limit 7.2PiB with cool access enabled,
- delivering higher capacity limit with lower costs.
- """
-
- LARGE_VOLUME = "LargeVolume"
- """The large volume is created with standard configuration that provides standard performance and
- throughput."""
- EXTRA_LARGE_VOLUME7_DOT2_PI_B = "PremExtraLargeVolume7Dot2PiB"
- """The extra large volume is created with higher volume capacity limit 7.2PiB with cool access
- enabled, delivering higher capacity limit with lower costs"""
-
-
-class LdapServerType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """The type of the LDAP server."""
-
- ACTIVE_DIRECTORY = "ActiveDirectory"
- """The volume should use Active Directory for LDAP connections."""
- OPEN_LDAP = "OpenLDAP"
- """The volume should use OpenLDAP for LDAP connections."""
-
-
-class LdapState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Specifies whether LDAP is enabled or not."""
-
- DISABLED = "Disabled"
- """ldap is disabled."""
- ENABLED = "Enabled"
- """ldap is enabled"""
+ """KeyVault connection Updating."""
class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -646,14 +310,18 @@ class MetricAggregationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Type of MetricAggregationType."""
AVERAGE = "Average"
+ """AVERAGE."""
class MirrorState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The status of the replication."""
UNINITIALIZED = "Uninitialized"
+ """UNINITIALIZED."""
MIRRORED = "Mirrored"
+ """MIRRORED."""
BROKEN = "Broken"
+ """BROKEN."""
class MultiAdStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -662,28 +330,28 @@ class MultiAdStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
DISABLED = "Disabled"
"""Account is MultiAD disabled, Means its a SharedAD or SingleAD account."""
ENABLED = "Enabled"
- """Account is MultiAD enabled"""
+ """Account is MultiAD enabled."""
class NetAppProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Gets the status of the VolumeQuotaRule at the time the operation was called."""
ACCEPTED = "Accepted"
- """Resource has been Accepted"""
+ """Resource has been Accepted."""
CREATING = "Creating"
- """Resource is being Created"""
+ """Resource is being Created."""
PATCHING = "Patching"
- """Resource is being Patched"""
+ """Resource is being Patched."""
UPDATING = "Updating"
- """Resource is updating"""
+ """Resource is updating."""
DELETING = "Deleting"
- """Resource is being Deleted"""
+ """Resource is being Deleted."""
MOVING = "Moving"
- """Resource is being Moved"""
+ """Resource is being Moved."""
FAILED = "Failed"
- """Resource has Failed"""
+ """Resource has Failed."""
SUCCEEDED = "Succeeded"
- """Resource has Succeeded"""
+ """Resource has Succeeded."""
class NetworkFeatures(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -703,51 +371,48 @@ class NetworkSiblingSetProvisioningState(str, Enum, metaclass=CaseInsensitiveEnu
"""Gets the status of the NetworkSiblingSet at the time the operation was called."""
SUCCEEDED = "Succeeded"
+ """SUCCEEDED."""
FAILED = "Failed"
+ """FAILED."""
CANCELED = "Canceled"
+ """CANCELED."""
UPDATING = "Updating"
-
-
-class PolicyStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Policy status."""
-
- ENABLED = "Enabled"
- """Value indicating the policy is enabled"""
- DISABLED = "Disabled"
- """Value indicating the policy is disabled"""
-
-
-class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol."""
-
- NF_SV3 = "NFSv3"
- """NFSv3 protocol type"""
- NF_SV4 = "NFSv4"
- """NFSv4 protocol type"""
- SMB = "SMB"
- """SMB protocol type"""
+ """UPDATING."""
class QosType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The qos type of the pool."""
AUTO = "Auto"
- """qos type Auto"""
+ """qos type Auto."""
MANUAL = "Manual"
- """qos type Manual"""
+ """qos type Manual."""
+
+
+class QuotaType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Type of quota."""
+
+ DEFAULT_USER_QUOTA = "DefaultUserQuota"
+ """Default user quota."""
+ DEFAULT_GROUP_QUOTA = "DefaultGroupQuota"
+ """Default group quota."""
+ INDIVIDUAL_USER_QUOTA = "IndividualUserQuota"
+ """Individual user quota."""
+ INDIVIDUAL_GROUP_QUOTA = "IndividualGroupQuota"
+ """Individual group quota."""
class RansomwareReportSeverity(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Severity of the Advanced Ransomware Protection (ARP) report."""
NONE = "None"
- """No data is suspected for ransomware activity"""
+ """No data is suspected for ransomware activity."""
LOW = "Low"
- """Low attack probability"""
+ """Low attack probability."""
MODERATE = "Moderate"
- """Moderate attack probability"""
+ """Moderate attack probability."""
HIGH = "High"
- """High amount of data is suspected for ransomware activity"""
+ """High amount of data is suspected for ransomware activity."""
class RansomwareReportState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -755,9 +420,9 @@ class RansomwareReportState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
ACTIVE = "Active"
"""The ARP report has been created. Take action by running clearsuspects marking suspects as
- FalsePositive or PotentialThreats"""
+ FalsePositive or PotentialThreats."""
RESOLVED = "Resolved"
- """The ARP Report has been resolved"""
+ """The ARP Report has been resolved."""
class RansomwareSuspectResolution(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -765,9 +430,9 @@ class RansomwareSuspectResolution(str, Enum, metaclass=CaseInsensitiveEnumMeta):
POTENTIAL_THREAT = "PotentialThreat"
"""The identified file type is unexpected in your workload and should be treated as a potential
- attack"""
+ attack."""
FALSE_POSITIVE = "FalsePositive"
- """The identified file type is expected in your workload and can be ignored"""
+ """The identified file type is expected in your workload and can be ignored."""
class RegionStorageToNetworkProximity(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -795,28 +460,31 @@ class ReplicationMirrorState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The status of the replication."""
UNINITIALIZED = "Uninitialized"
- """Destination volume has not been initialized"""
+ """Destination volume has not been initialized."""
MIRRORED = "Mirrored"
- """Destination volume has been initialized and is ready"""
+ """Destination volume has been initialized and is ready."""
BROKEN = "Broken"
- """Destination volume is RW, replication relationship has been broken off"""
+ """Destination volume is RW, replication relationship has been broken off."""
class ReplicationSchedule(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Schedule."""
ENUM_10_MINUTELY = "_10minutely"
+ """10_MINUTELY."""
HOURLY = "hourly"
+ """HOURLY."""
DAILY = "daily"
+ """DAILY."""
class ReplicationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Indicates whether the replication is cross zone or cross region."""
CROSS_REGION_REPLICATION = "CrossRegionReplication"
- """Cross region replication"""
+ """Cross region replication."""
CROSS_ZONE_REPLICATION = "CrossZoneReplication"
- """Cross zone replication"""
+ """Cross zone replication."""
class SecurityStyle(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -825,22 +493,24 @@ class SecurityStyle(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""
NTFS = "ntfs"
+ """NTFS."""
UNIX = "unix"
+ """UNIX."""
class ServiceLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The service level of the file system."""
STANDARD = "Standard"
- """Standard service level"""
+ """Standard service level."""
PREMIUM = "Premium"
- """Premium service level"""
+ """Premium service level."""
ULTRA = "Ultra"
- """Ultra service level"""
+ """Ultra service level."""
STANDARD_ZRS = "StandardZRS"
"""Zone redundant storage service level. This will be deprecated soon."""
FLEXIBLE = "Flexible"
- """Flexible service level"""
+ """Flexible service level."""
class SmbAccessBasedEnumeration(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -849,237 +519,53 @@ class SmbAccessBasedEnumeration(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""
DISABLED = "Disabled"
- """smbAccessBasedEnumeration share setting is disabled"""
- ENABLED = "Enabled"
- """smbAccessBasedEnumeration share setting is enabled"""
-
-
-class SmbEncryptionState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol cache."""
-
- DISABLED = "Disabled"
- """SMB encryption is disabled"""
+ """smbAccessBasedEnumeration share setting is disabled."""
ENABLED = "Enabled"
- """SMB encryption is enabled"""
+ """smbAccessBasedEnumeration share setting is enabled."""
class SmbNonBrowsable(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume."""
DISABLED = "Disabled"
- """smbNonBrowsable share setting is disabled"""
+ """smbNonBrowsable share setting is disabled."""
ENABLED = "Enabled"
- """smbNonBrowsable share setting is enabled"""
-
-
-class SnapshotDirectoryVisibility(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Controls the visibility of the Elastic Volume's read-only snapshot directory, which provides
- access to each of the volume's snapshots.
- """
-
- HIDDEN = "Hidden"
- """Value indicating the read-only snapshot directory is not visible"""
- VISIBLE = "Visible"
- """Value indicating the read-only snapshot directory is visible"""
-
-
-class SnapshotUsage(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Snapshot usage for backup."""
-
- USE_EXISTING_SNAPSHOT = "UseExistingSnapshot"
- """Value indicating an existing snapshot is used"""
- CREATE_NEW_SNAPSHOT = "CreateNewSnapshot"
- """Value indicating a new snapshot is created"""
-
-
-class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Type of quota."""
-
- DEFAULT_USER_QUOTA = "DefaultUserQuota"
- """Default user quota"""
- DEFAULT_GROUP_QUOTA = "DefaultGroupQuota"
- """Default group quota"""
- INDIVIDUAL_USER_QUOTA = "IndividualUserQuota"
- """Individual user quota"""
- INDIVIDUAL_GROUP_QUOTA = "IndividualGroupQuota"
- """Individual group quota"""
+ """smbNonBrowsable share setting is enabled."""
class VolumeBackupRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Status of the volume backup relationship."""
IDLE = "Idle"
+ """IDLE."""
TRANSFERRING = "Transferring"
+ """TRANSFERRING."""
FAILED = "Failed"
+ """FAILED."""
UNKNOWN = "Unknown"
-
-
-class VolumeLanguage(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Language supported for volume."""
-
- C_UTF8 = "c.utf-8"
- """Posix with UTF-8"""
- UTF8_MB4 = "utf8mb4"
- """UTF-8 with 4 byte character support"""
- AR = "ar"
- """Arabic - Deprecated"""
- AR_UTF8 = "ar.utf-8"
- """Arabic with UTF-8"""
- HR = "hr"
- """Croatian - Deprecated"""
- HR_UTF8 = "hr.utf-8"
- """Croatian with UTF-8"""
- CS = "cs"
- """Czech - Deprecated"""
- CS_UTF8 = "cs.utf-8"
- """Czech with UTF-8"""
- DA = "da"
- """Danish - Deprecated"""
- DA_UTF8 = "da.utf-8"
- """Danish with UTF-8"""
- NL = "nl"
- """Dutch - Deprecated"""
- NL_UTF8 = "nl.utf-8"
- """Dutch with UTF-8"""
- EN = "en"
- """English - Deprecated"""
- EN_UTF8 = "en.utf-8"
- """English with UTF-8"""
- FI = "fi"
- """Finnish - Deprecated"""
- FI_UTF8 = "fi.utf-8"
- """Finnish with UTF-8"""
- FR = "fr"
- """French - Deprecated"""
- FR_UTF8 = "fr.utf-8"
- """French with UTF-8"""
- DE = "de"
- """German - Deprecated"""
- DE_UTF8 = "de.utf-8"
- """German with UTF-8"""
- HE = "he"
- """Hebrew - Deprecated"""
- HE_UTF8 = "he.utf-8"
- """Hebrew with UTF-8"""
- HU = "hu"
- """Hungarian - Deprecated"""
- HU_UTF8 = "hu.utf-8"
- """Hungarian with UTF-8"""
- IT = "it"
- """Italian - Deprecated"""
- IT_UTF8 = "it.utf-8"
- """Italian with UTF-8"""
- JA = "ja"
- """Japanese euc-j - Deprecated"""
- JA_UTF8 = "ja.utf-8"
- """Japanese euc-j with UTF-8"""
- JA_V1 = "ja-v1"
- """Japanese euc-j - Deprecated"""
- JA_V1_UTF8 = "ja-v1.utf-8"
- """Japanese euc-j with UTF-8"""
- JA_JP_PCK = "ja-jp.pck"
- """Japanese pck"""
- JA_JP_PCK_UTF8 = "ja-jp.pck.utf-8"
- """Japanese pck with UTF-8 - Deprecated"""
- JA_JP932 = "ja-jp.932"
- """Japanese cp932"""
- JA_JP932_UTF8 = "ja-jp.932.utf-8"
- """Japanese cp932 with UTF-8 - Deprecated"""
- JA_JP_PCK_V2 = "ja-jp.pck-v2"
- """Japanese pck - sjis"""
- JA_JP_PCK_V2_UTF8 = "ja-jp.pck-v2.utf-8"
- """Japanese pck - sjis with UTF-8 - Deprecated"""
- KO = "ko"
- """Korean - Deprecated"""
- KO_UTF8 = "ko.utf-8"
- """Korean with UTF-8"""
- NO = "no"
- """Norwegian - Deprecated"""
- NO_UTF8 = "no.utf-8"
- """Norwegian with UTF-8"""
- PL = "pl"
- """Polish - Deprecated"""
- PL_UTF8 = "pl.utf-8"
- """Polish with UTF-8"""
- PT = "pt"
- """Portuguese - Deprecated"""
- PT_UTF8 = "pt.utf-8"
- """Portuguese with UTF-8"""
- C = "c"
- """Posix - Deprecated"""
- RO = "ro"
- """Romanian - Deprecated"""
- RO_UTF8 = "ro.utf-8"
- """Romanian with UTF-8"""
- RU = "ru"
- """Russian - Deprecated"""
- RU_UTF8 = "ru.utf-8"
- """Russian with UTF-8"""
- ZH = "zh"
- """Simplified Chinese - Deprecated"""
- ZH_UTF8 = "zh.utf-8"
- """Simplified Chinese with UTF-8"""
- ZH_GBK = "zh.gbk"
- """Simplified gbk Chinese"""
- ZH_GBK_UTF8 = "zh.gbk.utf-8"
- """Simplified gbk Chinese with UTF-8 - Deprecated"""
- ZH_TW_BIG5 = "zh-tw.big5"
- """Traditional Chinese BIG 5"""
- ZH_TW_BIG5_UTF8 = "zh-tw.big5.utf-8"
- """Traditional Chinese BIG 5 with UTF-8 - Deprecated"""
- ZH_TW = "zh-tw"
- """Traditional Chinese EUC-TW"""
- ZH_TW_UTF8 = "zh-tw.utf-8"
- """Traditional Chinese EUC-TW with UTF-8 - Deprecated"""
- SK = "sk"
- """Slovak - Deprecated"""
- SK_UTF8 = "sk.utf-8"
- """Slovak with UTF-8"""
- SL = "sl"
- """Slovenian - Deprecated"""
- SL_UTF8 = "sl.utf-8"
- """Slovenian with UTF-8"""
- ES = "es"
- """Spanish - Deprecated"""
- ES_UTF8 = "es.utf-8"
- """Spanish with UTF-8"""
- SV = "sv"
- """Swedish - Deprecated"""
- SV_UTF8 = "sv.utf-8"
- """Swedish with UTF-8"""
- TR = "tr"
- """Turkish - Deprecated"""
- TR_UTF8 = "tr.utf-8"
- """Turkish with UTF-8"""
- EN_US = "en-us"
- """US English - Deprecated"""
- EN_US_UTF8 = "en-us.utf-8"
- """US English with UTF-8"""
+ """UNKNOWN."""
class VolumeReplicationRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Status of the volume replication relationship."""
IDLE = "Idle"
+ """IDLE."""
TRANSFERRING = "Transferring"
+ """TRANSFERRING."""
class VolumeRestoreRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Status of the volume restore relationship."""
IDLE = "Idle"
+ """IDLE."""
TRANSFERRING = "Transferring"
+ """TRANSFERRING."""
FAILED = "Failed"
+ """FAILED."""
UNKNOWN = "Unknown"
-
-
-class VolumeSize(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """Volume size for backup."""
-
- LARGE = "Large"
- """Value indicating backup is for a large volume"""
- REGULAR = "Regular"
- """Value indicating backup is not for a large volume"""
+ """UNKNOWN."""
class VolumeStorageToNetworkProximity(str, Enum, metaclass=CaseInsensitiveEnumMeta):
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 ed265aa0ea56..d420719b2bbb 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
@@ -84,8 +84,6 @@ class AccountProperties(_Model):
:ivar multi_ad_status: MultiAD Status for the account. Known values are: "Disabled" and
"Enabled".
:vartype multi_ad_status: str or ~azure.mgmt.netapp.models.MultiAdStatus
- :ivar ldap_configuration: LDAP Configuration for the account.
- :vartype ldap_configuration: ~azure.mgmt.netapp.models.LdapConfiguration
"""
provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
@@ -109,10 +107,6 @@ class AccountProperties(_Model):
name="multiAdStatus", visibility=["read"]
)
"""MultiAD Status for the account. Known values are: \"Disabled\" and \"Enabled\"."""
- ldap_configuration: Optional["_models.LdapConfiguration"] = rest_field(
- name="ldapConfiguration", visibility=["read", "create", "update", "delete", "query"]
- )
- """LDAP Configuration for the account."""
@overload
def __init__(
@@ -121,7 +115,6 @@ def __init__(
active_directories: Optional[list["_models.ActiveDirectory"]] = None,
encryption: Optional["_models.AccountEncryption"] = None,
nfs_v4_id_domain: Optional[str] = None,
- ldap_configuration: Optional["_models.LdapConfiguration"] = None,
) -> None: ...
@overload
@@ -323,6 +316,36 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
+class AuthorizeRequest(_Model):
+ """Authorize request.
+
+ :ivar remote_volume_resource_id: Resource id of the remote volume.
+ :vartype remote_volume_resource_id: str
+ """
+
+ remote_volume_resource_id: Optional[str] = rest_field(
+ name="remoteVolumeResourceId", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Resource id of the remote volume."""
+
+ @overload
+ def __init__(
+ self,
+ *,
+ remote_volume_resource_id: Optional[str] = None,
+ ) -> None: ...
+
+ @overload
+ def __init__(self, mapping: Mapping[str, Any]) -> None:
+ """
+ :param mapping: raw JSON to initialize the model.
+ :type mapping: Mapping[str, Any]
+ """
+
+ def __init__(self, *args: Any, **kwargs: Any) -> None:
+ super().__init__(*args, **kwargs)
+
+
class Resource(_Model):
"""Resource.
@@ -351,8 +374,8 @@ class Resource(_Model):
"""Azure Resource Manager metadata containing createdBy and modifiedBy information."""
-class TrackedResource(Resource):
- """Tracked Resource.
+class ProxyResource(Resource):
+ """Proxy Resource.
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
@@ -365,23 +388,52 @@ class TrackedResource(Resource):
:ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
information.
:vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar location: The geo-location where the resource lives. Required.
- :vartype location: str
"""
- tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Resource tags."""
- location: str = rest_field(visibility=["read", "create"])
- """The geo-location where the resource lives. Required."""
+
+class Backup(ProxyResource):
+ """Backup under a Backup Vault.
+
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.netapp.models.SystemData
+ :ivar properties: Backup Properties. Required.
+ :vartype properties: ~azure.mgmt.netapp.models.BackupProperties
+ """
+
+ properties: "_models.BackupProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """Backup Properties. Required."""
+
+ __flattened_items = [
+ "backup_id",
+ "creation_date",
+ "snapshot_creation_date",
+ "completion_date",
+ "provisioning_state",
+ "size",
+ "label",
+ "backup_type",
+ "failure_reason",
+ "volume_resource_id",
+ "use_existing_snapshot",
+ "snapshot_name",
+ "backup_policy_resource_id",
+ "is_large_volume",
+ ]
@overload
def __init__(
self,
*,
- location: str,
- tags: Optional[dict[str, str]] = None,
+ properties: "_models.BackupProperties",
) -> None: ...
@overload
@@ -392,60 +444,46 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
+ _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
super().__init__(*args, **kwargs)
+ for k, v in _flattened_input.items():
+ setattr(self, k, v)
+
+ def __getattr__(self, name: str) -> Any:
+ if name in self.__flattened_items:
+ if self.properties is None:
+ return None
+ return getattr(self.properties, name)
+ raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
+
+ def __setattr__(self, key: str, value: Any) -> None:
+ if key in self.__flattened_items:
+ if self.properties is None:
+ self.properties = self._attr_to_rest_field["properties"]._class_type()
+ setattr(self.properties, key, value)
+ else:
+ super().__setattr__(key, value)
-class ActiveDirectoryConfig(TrackedResource):
- """Active Directory Configuration resource.
+class BackupPatch(_Model):
+ """Backup patch.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar location: The geo-location where the resource lives. Required.
- :vartype location: str
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ActiveDirectoryConfigProperties
- :ivar etag: "If etag is provided in the response body, it may also be provided as a header per
- the normal etag convention. Entity tags are used for comparing two or more entities from the
- same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match
- (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.").
- :vartype etag: str
- :ivar identity: The managed service identities assigned to this resource.
- :vartype identity: ~azure.mgmt.netapp.models.ManagedServiceIdentity
+ :ivar properties: Backup Patch Properties.
+ :vartype properties: ~azure.mgmt.netapp.models.BackupPatchProperties
"""
- properties: Optional["_models.ActiveDirectoryConfigProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
- etag: Optional[str] = rest_field(visibility=["read"])
- """\"If etag is provided in the response body, it may also be provided as a header per the normal
- etag convention. Entity tags are used for comparing two or more entities from the same
- requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section
- 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\")."""
- identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
+ properties: Optional["_models.BackupPatchProperties"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
- """The managed service identities assigned to this resource."""
+ """Backup Patch Properties."""
+
+ __flattened_items = ["label"]
@overload
def __init__(
self,
*,
- location: str,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.ActiveDirectoryConfigProperties"] = None,
- identity: Optional["_models.ManagedServiceIdentity"] = None,
+ properties: Optional["_models.BackupPatchProperties"] = None,
) -> None: ...
@overload
@@ -456,105 +494,42 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
+ _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
super().__init__(*args, **kwargs)
+ for k, v in _flattened_input.items():
+ setattr(self, k, v)
+
+ def __getattr__(self, name: str) -> Any:
+ if name in self.__flattened_items:
+ if self.properties is None:
+ return None
+ return getattr(self.properties, name)
+ raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
+
+ def __setattr__(self, key: str, value: Any) -> None:
+ if key in self.__flattened_items:
+ if self.properties is None:
+ self.properties = self._attr_to_rest_field["properties"]._class_type()
+ setattr(self.properties, key, value)
+ else:
+ super().__setattr__(key, value)
-class ActiveDirectoryConfigProperties(_Model):
- """Active Directory Configuration properties.
+class BackupPatchProperties(_Model):
+ """Backup patch properties.
- :ivar user_name: A domain user account with permission to create machine accounts.
- :vartype user_name: str
- :ivar dns: An array of DNS server IP addresses(IPv4 only) for the Active Directory.
- :vartype dns: list[str]
- :ivar smb_server_name: NetBIOS name of the SMB server. This name will be registered as a
- computer account in the AD and used to mount volumes.
- :vartype smb_server_name: str
- :ivar organizational_unit: The Organizational Unit (OU) within the Windows Active Directory.
- :vartype organizational_unit: str
- :ivar site: The Active Directory site the service will limit Domain Controller discovery to.
- :vartype site: str
- :ivar backup_operators: Users to be added to the Built-in Backup Operator active directory
- group. A list of unique usernames without domain specifier.
- :vartype backup_operators: list[str]
- :ivar administrators: Users to be added to the Built-in Administrators active directory group.
- A list of unique usernames without domain specifier.
- :vartype administrators: list[str]
- :ivar security_operators: Domain Users in the Active directory to be given SecurityPrivilege
- privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames
- without domain specifier.
- :vartype security_operators: list[str]
- :ivar active_directory_status: Status of the Active Directory. Known values are: "Created",
- "InUse", "Deleted", "Error", and "Updating".
- :vartype active_directory_status: str or ~azure.mgmt.netapp.models.ActiveDirectoryStatus
- :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating",
- "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded".
- :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState
- :ivar domain: Name of the Active Directory domain. Required.
- :vartype domain: str
- :ivar secret_password: Access password from Azure KeyVault Secrets to connect Active Directory.
- Required.
- :vartype secret_password: ~azure.mgmt.netapp.models.SecretPassword
+ :ivar label: Label for backup.
+ :vartype label: str
"""
- user_name: Optional[str] = rest_field(name="userName", visibility=["read", "create", "update", "delete", "query"])
- """A domain user account with permission to create machine accounts."""
- dns: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """An array of DNS server IP addresses(IPv4 only) for the Active Directory."""
- smb_server_name: Optional[str] = rest_field(
- name="smbServerName", visibility=["read", "create", "update", "delete", "query"]
- )
- """NetBIOS name of the SMB server. This name will be registered as a computer account in the AD
- and used to mount volumes."""
- organizational_unit: Optional[str] = rest_field(
- name="organizationalUnit", visibility=["read", "create", "update", "delete", "query"]
- )
- """The Organizational Unit (OU) within the Windows Active Directory."""
- site: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """The Active Directory site the service will limit Domain Controller discovery to."""
- backup_operators: Optional[list[str]] = rest_field(
- name="backupOperators", visibility=["read", "create", "update", "delete", "query"]
- )
- """Users to be added to the Built-in Backup Operator active directory group. A list of unique
- usernames without domain specifier."""
- administrators: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Users to be added to the Built-in Administrators active directory group. A list of unique
- usernames without domain specifier."""
- security_operators: Optional[list[str]] = rest_field(
- name="securityOperators", visibility=["read", "create", "update", "delete", "query"]
- )
- """Domain Users in the Active directory to be given SecurityPrivilege privilege (Needed for SMB
- Continuously available shares for SQL). A list of unique usernames without domain specifier."""
- active_directory_status: Optional[Union[str, "_models.ActiveDirectoryStatus"]] = rest_field(
- name="activeDirectoryStatus", visibility=["read"]
- )
- """Status of the Active Directory. Known values are: \"Created\", \"InUse\", \"Deleted\",
- \"Error\", and \"Updating\"."""
- provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field(
- name="provisioningState", visibility=["read"]
- )
- """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\",
- \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\"."""
- domain: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Name of the Active Directory domain. Required."""
- secret_password: "_models.SecretPassword" = rest_field(
- name="secretPassword", visibility=["read", "create", "update", "delete", "query"]
- )
- """Access password from Azure KeyVault Secrets to connect Active Directory. Required."""
+ label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """Label for backup."""
@overload
def __init__(
self,
*,
- domain: str,
- secret_password: "_models.SecretPassword",
- user_name: Optional[str] = None,
- dns: Optional[list[str]] = None,
- smb_server_name: Optional[str] = None,
- organizational_unit: Optional[str] = None,
- site: Optional[str] = None,
- backup_operators: Optional[list[str]] = None,
- administrators: Optional[list[str]] = None,
- security_operators: Optional[list[str]] = None,
+ label: Optional[str] = None,
) -> None: ...
@overload
@@ -568,35 +543,37 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class ActiveDirectoryConfigUpdate(_Model):
- """The type used for update operations of the ActiveDirectoryConfig.
+class TrackedResource(Resource):
+ """Tracked Resource.
- :ivar identity: The managed service identities assigned to this resource.
- :vartype identity: ~azure.mgmt.netapp.models.ManagedServiceIdentity
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.netapp.models.SystemData
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ActiveDirectoryConfigUpdateProperties
+ :ivar location: The geo-location where the resource lives. Required.
+ :vartype location: str
"""
- identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The managed service identities assigned to this resource."""
tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Resource tags."""
- properties: Optional["_models.ActiveDirectoryConfigUpdateProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
+ location: str = rest_field(visibility=["read", "create"])
+ """The geo-location where the resource lives. Required."""
@overload
def __init__(
self,
*,
- identity: Optional["_models.ManagedServiceIdentity"] = None,
+ location: str,
tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.ActiveDirectoryConfigUpdateProperties"] = None,
) -> None: ...
@overload
@@ -610,147 +587,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class ActiveDirectoryConfigUpdateProperties(_Model):
- """The updatable properties of the ActiveDirectoryConfig.
-
- :ivar user_name: A domain user account with permission to create machine accounts.
- :vartype user_name: str
- :ivar dns: An array of DNS server IP addresses(IPv4 only) for the Active Directory.
- :vartype dns: list[str]
- :ivar smb_server_name: NetBIOS name of the SMB server. This name will be registered as a
- computer account in the AD and used to mount volumes.
- :vartype smb_server_name: str
- :ivar organizational_unit: The Organizational Unit (OU) within the Windows Active Directory.
- :vartype organizational_unit: str
- :ivar site: The Active Directory site the service will limit Domain Controller discovery to.
- :vartype site: str
- :ivar backup_operators: Users to be added to the Built-in Backup Operator active directory
- group. A list of unique usernames without domain specifier.
- :vartype backup_operators: list[str]
- :ivar administrators: Users to be added to the Built-in Administrators active directory group.
- A list of unique usernames without domain specifier.
- :vartype administrators: list[str]
- :ivar security_operators: Domain Users in the Active directory to be given SecurityPrivilege
- privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames
- without domain specifier.
- :vartype security_operators: list[str]
- :ivar domain: Name of the Active Directory domain.
- :vartype domain: str
- :ivar secret_password: Access password from Azure KeyVault Secrets to connect Active Directory.
- :vartype secret_password: ~azure.mgmt.netapp.models.SecretPassword
- """
-
- user_name: Optional[str] = rest_field(name="userName", visibility=["read", "create", "update", "delete", "query"])
- """A domain user account with permission to create machine accounts."""
- dns: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """An array of DNS server IP addresses(IPv4 only) for the Active Directory."""
- smb_server_name: Optional[str] = rest_field(
- name="smbServerName", visibility=["read", "create", "update", "delete", "query"]
- )
- """NetBIOS name of the SMB server. This name will be registered as a computer account in the AD
- and used to mount volumes."""
- organizational_unit: Optional[str] = rest_field(
- name="organizationalUnit", visibility=["read", "create", "update", "delete", "query"]
- )
- """The Organizational Unit (OU) within the Windows Active Directory."""
- site: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """The Active Directory site the service will limit Domain Controller discovery to."""
- backup_operators: Optional[list[str]] = rest_field(
- name="backupOperators", visibility=["read", "create", "update", "delete", "query"]
- )
- """Users to be added to the Built-in Backup Operator active directory group. A list of unique
- usernames without domain specifier."""
- administrators: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Users to be added to the Built-in Administrators active directory group. A list of unique
- usernames without domain specifier."""
- security_operators: Optional[list[str]] = rest_field(
- name="securityOperators", visibility=["read", "create", "update", "delete", "query"]
- )
- """Domain Users in the Active directory to be given SecurityPrivilege privilege (Needed for SMB
- Continuously available shares for SQL). A list of unique usernames without domain specifier."""
- domain: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Name of the Active Directory domain."""
- secret_password: Optional["_models.SecretPassword"] = rest_field(
- name="secretPassword", visibility=["read", "create", "update", "delete", "query"]
- )
- """Access password from Azure KeyVault Secrets to connect Active Directory."""
-
- @overload
- def __init__(
- self,
- *,
- user_name: Optional[str] = None,
- dns: Optional[list[str]] = None,
- smb_server_name: Optional[str] = None,
- organizational_unit: Optional[str] = None,
- site: Optional[str] = None,
- backup_operators: Optional[list[str]] = None,
- administrators: Optional[list[str]] = None,
- security_operators: Optional[list[str]] = None,
- domain: Optional[str] = None,
- secret_password: Optional["_models.SecretPassword"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class AuthorizeRequest(_Model):
- """Authorize request.
-
- :ivar remote_volume_resource_id: Resource id of the remote volume.
- :vartype remote_volume_resource_id: str
- """
-
- remote_volume_resource_id: Optional[str] = rest_field(
- name="remoteVolumeResourceId", visibility=["read", "create", "update", "delete", "query"]
- )
- """Resource id of the remote volume."""
-
- @overload
- def __init__(
- self,
- *,
- remote_volume_resource_id: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ProxyResource(Resource):
- """Proxy Resource.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- """
-
-
-class Backup(ProxyResource):
- """Backup under a Backup Vault.
+class BackupPolicy(TrackedResource):
+ """Backup policy information.
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
@@ -763,35 +601,47 @@ class Backup(ProxyResource):
:ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
information.
:vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar properties: Backup Properties. Required.
- :vartype properties: ~azure.mgmt.netapp.models.BackupProperties
+ :ivar tags: Resource tags.
+ :vartype tags: dict[str, str]
+ :ivar location: The geo-location where the resource lives. Required.
+ :vartype location: str
+ :ivar properties: Backup policy Properties. Required.
+ :vartype properties: ~azure.mgmt.netapp.models.BackupPolicyProperties
+ :ivar etag: "If etag is provided in the response body, it may also be provided as a header per
+ the normal etag convention. Entity tags are used for comparing two or more entities from the
+ same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match
+ (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.").
+ :vartype etag: str
"""
- properties: "_models.BackupProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Backup Properties. Required."""
+ properties: "_models.BackupPolicyProperties" = rest_field(
+ visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Backup policy Properties. Required."""
+ etag: Optional[str] = rest_field(visibility=["read"])
+ """\"If etag is provided in the response body, it may also be provided as a header per the normal
+ etag convention. Entity tags are used for comparing two or more entities from the same
+ requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section
+ 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\")."""
__flattened_items = [
- "backup_id",
- "creation_date",
- "snapshot_creation_date",
- "completion_date",
+ "backup_policy_id",
"provisioning_state",
- "size",
- "label",
- "backup_type",
- "failure_reason",
- "volume_resource_id",
- "use_existing_snapshot",
- "snapshot_name",
- "backup_policy_resource_id",
- "is_large_volume",
+ "daily_backups_to_keep",
+ "weekly_backups_to_keep",
+ "monthly_backups_to_keep",
+ "volumes_assigned",
+ "enabled",
+ "volume_backups",
]
@overload
def __init__(
self,
*,
- properties: "_models.BackupProperties",
+ location: str,
+ properties: "_models.BackupPolicyProperties",
+ tags: Optional[dict[str, str]] = None,
) -> None: ...
@overload
@@ -823,25 +673,56 @@ def __setattr__(self, key: str, value: Any) -> None:
super().__setattr__(key, value)
-class BackupPatch(_Model):
- """Backup patch.
+class BackupPolicyPatch(_Model):
+ """Backup policy Details for create and update.
- :ivar properties: Backup Patch Properties.
- :vartype properties: ~azure.mgmt.netapp.models.BackupPatchProperties
+ :ivar location: Resource location.
+ :vartype location: str
+ :ivar id: Resource Id.
+ :vartype id: str
+ :ivar name: Resource name.
+ :vartype name: str
+ :ivar type: Resource type.
+ :vartype type: str
+ :ivar tags: Resource tags.
+ :vartype tags: dict[str, str]
+ :ivar properties: Backup policy Properties.
+ :vartype properties: ~azure.mgmt.netapp.models.BackupPolicyProperties
"""
- properties: Optional["_models.BackupPatchProperties"] = rest_field(
+ location: Optional[str] = rest_field(visibility=["read", "create"])
+ """Resource location."""
+ id: Optional[str] = rest_field(visibility=["read"])
+ """Resource Id."""
+ name: Optional[str] = rest_field(visibility=["read"])
+ """Resource name."""
+ type: Optional[str] = rest_field(visibility=["read"])
+ """Resource type."""
+ tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """Resource tags."""
+ properties: Optional["_models.BackupPolicyProperties"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
- """Backup Patch Properties."""
+ """Backup policy Properties."""
- __flattened_items = ["label"]
+ __flattened_items = [
+ "backup_policy_id",
+ "provisioning_state",
+ "daily_backups_to_keep",
+ "weekly_backups_to_keep",
+ "monthly_backups_to_keep",
+ "volumes_assigned",
+ "enabled",
+ "volume_backups",
+ ]
@overload
def __init__(
self,
*,
- properties: Optional["_models.BackupPatchProperties"] = None,
+ location: Optional[str] = None,
+ tags: Optional[dict[str, str]] = None,
+ properties: Optional["_models.BackupPolicyProperties"] = None,
) -> None: ...
@overload
@@ -873,220 +754,25 @@ def __setattr__(self, key: str, value: Any) -> None:
super().__setattr__(key, value)
-class BackupPatchProperties(_Model):
- """Backup patch properties.
+class BackupPolicyProperties(_Model):
+ """Backup policy properties.
- :ivar label: Label for backup.
- :vartype label: str
- """
-
- label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Label for backup."""
-
- @overload
- def __init__(
- self,
- *,
- label: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class BackupPolicy(TrackedResource):
- """Backup policy information.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar location: The geo-location where the resource lives. Required.
- :vartype location: str
- :ivar properties: Backup policy Properties. Required.
- :vartype properties: ~azure.mgmt.netapp.models.BackupPolicyProperties
- :ivar etag: "If etag is provided in the response body, it may also be provided as a header per
- the normal etag convention. Entity tags are used for comparing two or more entities from the
- same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match
- (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.").
- :vartype etag: str
- """
-
- properties: "_models.BackupPolicyProperties" = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Backup policy Properties. Required."""
- etag: Optional[str] = rest_field(visibility=["read"])
- """\"If etag is provided in the response body, it may also be provided as a header per the normal
- etag convention. Entity tags are used for comparing two or more entities from the same
- requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section
- 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\")."""
-
- __flattened_items = [
- "backup_policy_id",
- "provisioning_state",
- "daily_backups_to_keep",
- "weekly_backups_to_keep",
- "monthly_backups_to_keep",
- "volumes_assigned",
- "enabled",
- "volume_backups",
- ]
-
- @overload
- def __init__(
- self,
- *,
- location: str,
- properties: "_models.BackupPolicyProperties",
- tags: Optional[dict[str, str]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
- super().__init__(*args, **kwargs)
- for k, v in _flattened_input.items():
- setattr(self, k, v)
-
- def __getattr__(self, name: str) -> Any:
- if name in self.__flattened_items:
- if self.properties is None:
- return None
- return getattr(self.properties, name)
- raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
-
- def __setattr__(self, key: str, value: Any) -> None:
- if key in self.__flattened_items:
- if self.properties is None:
- self.properties = self._attr_to_rest_field["properties"]._class_type()
- setattr(self.properties, key, value)
- else:
- super().__setattr__(key, value)
-
-
-class BackupPolicyPatch(_Model):
- """Backup policy Details for create and update.
-
- :ivar location: Resource location.
- :vartype location: str
- :ivar id: Resource Id.
- :vartype id: str
- :ivar name: Resource name.
- :vartype name: str
- :ivar type: Resource type.
- :vartype type: str
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar properties: Backup policy Properties.
- :vartype properties: ~azure.mgmt.netapp.models.BackupPolicyProperties
- """
-
- location: Optional[str] = rest_field(visibility=["read", "create"])
- """Resource location."""
- id: Optional[str] = rest_field(visibility=["read"])
- """Resource Id."""
- name: Optional[str] = rest_field(visibility=["read"])
- """Resource name."""
- type: Optional[str] = rest_field(visibility=["read"])
- """Resource type."""
- tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Resource tags."""
- properties: Optional["_models.BackupPolicyProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Backup policy Properties."""
-
- __flattened_items = [
- "backup_policy_id",
- "provisioning_state",
- "daily_backups_to_keep",
- "weekly_backups_to_keep",
- "monthly_backups_to_keep",
- "volumes_assigned",
- "enabled",
- "volume_backups",
- ]
-
- @overload
- def __init__(
- self,
- *,
- location: Optional[str] = None,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.BackupPolicyProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
- super().__init__(*args, **kwargs)
- for k, v in _flattened_input.items():
- setattr(self, k, v)
-
- def __getattr__(self, name: str) -> Any:
- if name in self.__flattened_items:
- if self.properties is None:
- return None
- return getattr(self.properties, name)
- raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
-
- def __setattr__(self, key: str, value: Any) -> None:
- if key in self.__flattened_items:
- if self.properties is None:
- self.properties = self._attr_to_rest_field["properties"]._class_type()
- setattr(self.properties, key, value)
- else:
- super().__setattr__(key, value)
-
-
-class BackupPolicyProperties(_Model):
- """Backup policy properties.
-
- :ivar backup_policy_id: Backup Policy GUID ID.
- :vartype backup_policy_id: str
- :ivar provisioning_state: Azure lifecycle management.
- :vartype provisioning_state: str
- :ivar daily_backups_to_keep: Daily backups count to keep.
- :vartype daily_backups_to_keep: int
- :ivar weekly_backups_to_keep: Weekly backups count to keep.
- :vartype weekly_backups_to_keep: int
- :ivar monthly_backups_to_keep: Monthly backups count to keep.
- :vartype monthly_backups_to_keep: int
- :ivar volumes_assigned: Volumes using current backup policy.
- :vartype volumes_assigned: int
- :ivar enabled: The property to decide policy is enabled or not.
- :vartype enabled: bool
- :ivar volume_backups: A list of volumes assigned to this policy.
- :vartype volume_backups: list[~azure.mgmt.netapp.models.VolumeBackups]
+ :ivar backup_policy_id: Backup Policy GUID ID.
+ :vartype backup_policy_id: str
+ :ivar provisioning_state: Azure lifecycle management.
+ :vartype provisioning_state: str
+ :ivar daily_backups_to_keep: Daily backups count to keep.
+ :vartype daily_backups_to_keep: int
+ :ivar weekly_backups_to_keep: Weekly backups count to keep.
+ :vartype weekly_backups_to_keep: int
+ :ivar monthly_backups_to_keep: Monthly backups count to keep.
+ :vartype monthly_backups_to_keep: int
+ :ivar volumes_assigned: Volumes using current backup policy.
+ :vartype volumes_assigned: int
+ :ivar enabled: The property to decide policy is enabled or not.
+ :vartype enabled: bool
+ :ivar volume_backups: A list of volumes assigned to this policy.
+ :vartype volume_backups: list[~azure.mgmt.netapp.models.VolumeBackups]
"""
backup_policy_id: Optional[str] = rest_field(name="backupPolicyId", visibility=["read"])
@@ -1342,3121 +1028,47 @@ class BackupStatus(_Model):
last_transfer_type: Optional[str] = rest_field(name="lastTransferType", visibility=["read"])
"""Displays the last transfer type."""
total_transfer_bytes: Optional[int] = rest_field(name="totalTransferBytes", visibility=["read"])
- """Displays the total bytes transferred."""
- transfer_progress_bytes: Optional[int] = rest_field(name="transferProgressBytes", visibility=["read"])
- """Displays the total number of bytes transferred for the ongoing operation."""
-
-
-class BackupVault(TrackedResource):
- """Backup Vault information.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar location: The geo-location where the resource lives. Required.
- :vartype location: str
- :ivar properties: Backup Vault Properties.
- :vartype properties: ~azure.mgmt.netapp.models.BackupVaultProperties
- """
-
- properties: Optional["_models.BackupVaultProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Backup Vault Properties."""
-
- __flattened_items = ["provisioning_state"]
-
- @overload
- def __init__(
- self,
- *,
- location: str,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.BackupVaultProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
- super().__init__(*args, **kwargs)
- for k, v in _flattened_input.items():
- setattr(self, k, v)
-
- def __getattr__(self, name: str) -> Any:
- if name in self.__flattened_items:
- if self.properties is None:
- return None
- return getattr(self.properties, name)
- raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
-
- def __setattr__(self, key: str, value: Any) -> None:
- if key in self.__flattened_items:
- if self.properties is None:
- self.properties = self._attr_to_rest_field["properties"]._class_type()
- setattr(self.properties, key, value)
- else:
- super().__setattr__(key, value)
-
-
-class BackupVaultPatch(_Model):
- """Backup Vault information.
-
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- """
-
- tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Resource tags."""
-
- @overload
- def __init__(
- self,
- *,
- tags: Optional[dict[str, str]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class BackupVaultProperties(_Model):
- """Backup Vault properties.
-
- :ivar provisioning_state: Azure lifecycle management.
- :vartype provisioning_state: str
- """
-
- provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
- """Azure lifecycle management."""
-
-
-class BreakFileLocksRequest(_Model):
- """Break file locks request.
-
- :ivar client_ip: To clear file locks on a volume for a particular client.
- :vartype client_ip: str
- :ivar confirm_running_disruptive_operation: Break File locks could be a disruptive operation
- for application as locks on the volume will be broken, if want to process, set to true.
- :vartype confirm_running_disruptive_operation: bool
- """
-
- client_ip: Optional[str] = rest_field(name="clientIp", visibility=["read", "create", "update", "delete", "query"])
- """To clear file locks on a volume for a particular client."""
- confirm_running_disruptive_operation: Optional[bool] = rest_field(
- name="confirmRunningDisruptiveOperation", visibility=["read", "create", "update", "delete", "query"]
- )
- """Break File locks could be a disruptive operation for application as locks on the volume will be
- broken, if want to process, set to true."""
-
- @overload
- def __init__(
- self,
- *,
- client_ip: Optional[str] = None,
- confirm_running_disruptive_operation: Optional[bool] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class BreakReplicationRequest(_Model):
- """Break replication request.
-
- :ivar force_break_replication: If replication is in status transferring and you want to force
- break the replication, set to true.
- :vartype force_break_replication: bool
- """
-
- force_break_replication: Optional[bool] = rest_field(
- name="forceBreakReplication", visibility=["read", "create", "update", "delete", "query"]
- )
- """If replication is in status transferring and you want to force break the replication, set to
- true."""
-
- @overload
- def __init__(
- self,
- *,
- force_break_replication: Optional[bool] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class Bucket(ProxyResource):
- """Bucket resource.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar properties: Bucket properties.
- :vartype properties: ~azure.mgmt.netapp.models.BucketProperties
- """
-
- properties: Optional["_models.BucketProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Bucket properties."""
-
- __flattened_items = ["path", "file_system_user", "provisioning_state", "status", "server", "permissions"]
-
- @overload
- def __init__(
- self,
- *,
- properties: Optional["_models.BucketProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
- super().__init__(*args, **kwargs)
- for k, v in _flattened_input.items():
- setattr(self, k, v)
-
- def __getattr__(self, name: str) -> Any:
- if name in self.__flattened_items:
- if self.properties is None:
- return None
- return getattr(self.properties, name)
- raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
-
- def __setattr__(self, key: str, value: Any) -> None:
- if key in self.__flattened_items:
- if self.properties is None:
- self.properties = self._attr_to_rest_field["properties"]._class_type()
- setattr(self.properties, key, value)
- else:
- super().__setattr__(key, value)
-
-
-class BucketCredentialsExpiry(_Model):
- """The bucket's Access and Secret key pair Expiry Time expressed as the number of days from now.
-
- :ivar key_pair_expiry_days: The number of days from now until the newly generated Access and
- Secret key pair will expire.
- :vartype key_pair_expiry_days: int
- """
-
- key_pair_expiry_days: Optional[int] = rest_field(
- name="keyPairExpiryDays", visibility=["read", "create", "update", "delete", "query"]
- )
- """The number of days from now until the newly generated Access and Secret key pair will expire."""
-
- @overload
- def __init__(
- self,
- *,
- key_pair_expiry_days: Optional[int] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class BucketGenerateCredentials(_Model):
- """Bucket Access Key, Secret Key, and Expiry date and time of the key pair.
-
- :ivar access_key: The Access Key that is required along with the Secret Key to access the
- bucket.
- :vartype access_key: str
- :ivar secret_key: The Secret Key that is required along with the Access Key to access the
- bucket.
- :vartype secret_key: str
- :ivar key_pair_expiry: The bucket's Access and Secret key pair expiry date and time (in UTC).
- :vartype key_pair_expiry: ~datetime.datetime
- """
-
- access_key: Optional[str] = rest_field(name="accessKey", visibility=["read"])
- """The Access Key that is required along with the Secret Key to access the bucket."""
- secret_key: Optional[str] = rest_field(name="secretKey", visibility=["read"])
- """The Secret Key that is required along with the Access Key to access the bucket."""
- key_pair_expiry: Optional[datetime.datetime] = rest_field(
- name="keyPairExpiry", visibility=["read"], format="rfc3339"
- )
- """The bucket's Access and Secret key pair expiry date and time (in UTC)."""
-
-
-class BucketPatch(ProxyResource):
- """Bucket resource.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar properties: Bucket properties.
- :vartype properties: ~azure.mgmt.netapp.models.BucketPatchProperties
- """
-
- properties: Optional["_models.BucketPatchProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Bucket properties."""
-
- __flattened_items = ["path", "file_system_user", "provisioning_state", "server", "permissions"]
-
- @overload
- def __init__(
- self,
- *,
- properties: Optional["_models.BucketPatchProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
- super().__init__(*args, **kwargs)
- for k, v in _flattened_input.items():
- setattr(self, k, v)
-
- def __getattr__(self, name: str) -> Any:
- if name in self.__flattened_items:
- if self.properties is None:
- return None
- return getattr(self.properties, name)
- raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
-
- def __setattr__(self, key: str, value: Any) -> None:
- if key in self.__flattened_items:
- if self.properties is None:
- self.properties = self._attr_to_rest_field["properties"]._class_type()
- setattr(self.properties, key, value)
- else:
- super().__setattr__(key, value)
-
-
-class BucketPatchProperties(_Model):
- """Bucket resource properties for a Patch operation.
-
- :ivar path: The volume path mounted inside the bucket.
- :vartype path: str
- :ivar file_system_user: File System user having access to volume data. For Unix, this is the
- user's uid and gid. For Windows, this is the user's username. Note that the Unix and Windows
- user details are mutually exclusive, meaning one or other must be supplied, but not both.
- :vartype file_system_user: ~azure.mgmt.netapp.models.FileSystemUser
- :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted",
- "Creating", "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded".
- :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState
- :ivar server: Properties of the server managing the lifecycle of volume buckets.
- :vartype server: ~azure.mgmt.netapp.models.BucketServerPatchProperties
- :ivar permissions: Access permissions for the bucket. Either ReadOnly or ReadWrite. Known
- values are: "ReadOnly" and "ReadWrite".
- :vartype permissions: str or ~azure.mgmt.netapp.models.BucketPatchPermissions
- """
-
- path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """The volume path mounted inside the bucket."""
- file_system_user: Optional["_models.FileSystemUser"] = rest_field(
- name="fileSystemUser", visibility=["read", "create", "update", "delete", "query"]
- )
- """File System user having access to volume data. For Unix, this is the user's uid and gid. For
- Windows, this is the user's username. Note that the Unix and Windows user details are mutually
- exclusive, meaning one or other must be supplied, but not both."""
- provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field(
- name="provisioningState", visibility=["read"]
- )
- """Provisioning state of the resource. Known values are: \"Accepted\", \"Creating\", \"Patching\",
- \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\"."""
- server: Optional["_models.BucketServerPatchProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Properties of the server managing the lifecycle of volume buckets."""
- permissions: Optional[Union[str, "_models.BucketPatchPermissions"]] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Access permissions for the bucket. Either ReadOnly or ReadWrite. Known values are: \"ReadOnly\"
- and \"ReadWrite\"."""
-
- @overload
- def __init__(
- self,
- *,
- path: Optional[str] = None,
- file_system_user: Optional["_models.FileSystemUser"] = None,
- server: Optional["_models.BucketServerPatchProperties"] = None,
- permissions: Optional[Union[str, "_models.BucketPatchPermissions"]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class BucketProperties(_Model):
- """Bucket resource properties.
-
- :ivar path: The volume path mounted inside the bucket. The default is the root path '/' if no
- value is provided when the bucket is created.
- :vartype path: str
- :ivar file_system_user: File System user having access to volume data. For Unix, this is the
- user's uid and gid. For Windows, this is the user's username. Note that the Unix and Windows
- user details are mutually exclusive, meaning one or other must be supplied, but not both.
- :vartype file_system_user: ~azure.mgmt.netapp.models.FileSystemUser
- :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted",
- "Creating", "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded".
- :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState
- :ivar status: The bucket credentials status. There states:
-
- "NoCredentialsSet": Access and Secret key pair have not been generated.
- "CredentialsExpired": Access and Secret key pair have expired.
- "Active": The certificate has been installed and credentials are unexpired. Known values are:
- "NoCredentialsSet", "CredentialsExpired", and "Active".
- :vartype status: str or ~azure.mgmt.netapp.models.CredentialsStatus
- :ivar server: Properties of the server managing the lifecycle of volume buckets.
- :vartype server: ~azure.mgmt.netapp.models.BucketServerProperties
- :ivar permissions: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default
- is ReadOnly if no value is provided during bucket creation. Known values are: "ReadOnly" and
- "ReadWrite".
- :vartype permissions: str or ~azure.mgmt.netapp.models.BucketPermissions
- """
-
- path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """The volume path mounted inside the bucket. The default is the root path '/' if no value is
- provided when the bucket is created."""
- file_system_user: Optional["_models.FileSystemUser"] = rest_field(
- name="fileSystemUser", visibility=["read", "create", "update", "delete", "query"]
- )
- """File System user having access to volume data. For Unix, this is the user's uid and gid. For
- Windows, this is the user's username. Note that the Unix and Windows user details are mutually
- exclusive, meaning one or other must be supplied, but not both."""
- provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field(
- name="provisioningState", visibility=["read"]
- )
- """Provisioning state of the resource. Known values are: \"Accepted\", \"Creating\", \"Patching\",
- \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\"."""
- status: Optional[Union[str, "_models.CredentialsStatus"]] = rest_field(visibility=["read"])
- """The bucket credentials status. There states:
-
- \"NoCredentialsSet\": Access and Secret key pair have not been generated.
- \"CredentialsExpired\": Access and Secret key pair have expired.
- \"Active\": The certificate has been installed and credentials are unexpired. Known values are:
- \"NoCredentialsSet\", \"CredentialsExpired\", and \"Active\"."""
- server: Optional["_models.BucketServerProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Properties of the server managing the lifecycle of volume buckets."""
- permissions: Optional[Union[str, "_models.BucketPermissions"]] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no
- value is provided during bucket creation. Known values are: \"ReadOnly\" and \"ReadWrite\"."""
-
- @overload
- def __init__(
- self,
- *,
- path: Optional[str] = None,
- file_system_user: Optional["_models.FileSystemUser"] = None,
- server: Optional["_models.BucketServerProperties"] = None,
- permissions: Optional[Union[str, "_models.BucketPermissions"]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class BucketServerPatchProperties(_Model):
- """Properties of the server managing the lifecycle of volume buckets.
-
- :ivar fqdn: The host part of the bucket URL, resolving to the bucket IP address and allowed by
- the server certificate.
- :vartype fqdn: str
- :ivar certificate_object: A base64-encoded PEM file, which includes both the bucket server's
- certificate and private key. It is used to authenticate the user and allows access to volume
- data in a read-only manner.
- :vartype certificate_object: str
- """
-
- fqdn: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """The host part of the bucket URL, resolving to the bucket IP address and allowed by the server
- certificate."""
- certificate_object: Optional[str] = rest_field(name="certificateObject", visibility=["create", "update"])
- """A base64-encoded PEM file, which includes both the bucket server's certificate and private key.
- It is used to authenticate the user and allows access to volume data in a read-only manner."""
-
- @overload
- def __init__(
- self,
- *,
- fqdn: Optional[str] = None,
- certificate_object: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class BucketServerProperties(_Model):
- """Properties of the server managing the lifecycle of volume buckets.
-
- :ivar fqdn: The host part of the bucket URL, resolving to the bucket IP address and allowed by
- the server certificate.
- :vartype fqdn: str
- :ivar certificate_common_name: Certificate Common Name taken from the certificate installed on
- the bucket server.
- :vartype certificate_common_name: str
- :ivar certificate_expiry_date: The bucket server's certificate expiry date.
- :vartype certificate_expiry_date: ~datetime.datetime
- :ivar ip_address: The bucket server's IPv4 address.
- :vartype ip_address: str
- :ivar certificate_object: A base64-encoded PEM file, which includes both the bucket server's
- certificate and private key. It is used to authenticate the user and allows access to volume
- data in a read-only manner.
- :vartype certificate_object: str
- """
-
- fqdn: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """The host part of the bucket URL, resolving to the bucket IP address and allowed by the server
- certificate."""
- certificate_common_name: Optional[str] = rest_field(name="certificateCommonName", visibility=["read"])
- """Certificate Common Name taken from the certificate installed on the bucket server."""
- certificate_expiry_date: Optional[datetime.datetime] = rest_field(
- name="certificateExpiryDate", visibility=["read"], format="rfc3339"
- )
- """The bucket server's certificate expiry date."""
- ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read"])
- """The bucket server's IPv4 address."""
- certificate_object: Optional[str] = rest_field(name="certificateObject", visibility=["create", "update"])
- """A base64-encoded PEM file, which includes both the bucket server's certificate and private key.
- It is used to authenticate the user and allows access to volume data in a read-only manner."""
-
- @overload
- def __init__(
- self,
- *,
- fqdn: Optional[str] = None,
- certificate_object: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class Cache(TrackedResource):
- """Cache resource.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar location: The geo-location where the resource lives. Required.
- :vartype location: str
- :ivar properties: Cache properties. Required.
- :vartype properties: ~azure.mgmt.netapp.models.CacheProperties
- :ivar etag: "If etag is provided in the response body, it may also be provided as a header per
- the normal etag convention. Entity tags are used for comparing two or more entities from the
- same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match
- (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.").
- :vartype etag: str
- :ivar zones: The availability zones.
- :vartype zones: list[str]
- """
-
- properties: "_models.CacheProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Cache properties. Required."""
- etag: Optional[str] = rest_field(visibility=["read"])
- """\"If etag is provided in the response body, it may also be provided as a header per the normal
- etag convention. Entity tags are used for comparing two or more entities from the same
- requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section
- 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\")."""
- zones: Optional[list[str]] = rest_field(visibility=["read", "create"])
- """The availability zones."""
-
- @overload
- def __init__(
- self,
- *,
- location: str,
- properties: "_models.CacheProperties",
- tags: Optional[dict[str, str]] = None,
- zones: Optional[list[str]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class CacheMountTargetProperties(_Model):
- """Contains all the information needed to mount a cache.
-
- :ivar mount_target_id: UUID v4 used to identify the MountTarget.
- :vartype mount_target_id: str
- :ivar ip_address: The mount target's IPv4 address, used to mount the cache.
- :vartype ip_address: str
- :ivar smb_server_fqdn: The SMB server's Fully Qualified Domain Name, FQDN.
- :vartype smb_server_fqdn: str
- """
-
- mount_target_id: Optional[str] = rest_field(name="mountTargetId", visibility=["read"])
- """UUID v4 used to identify the MountTarget."""
- ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read"])
- """The mount target's IPv4 address, used to mount the cache."""
- smb_server_fqdn: Optional[str] = rest_field(name="smbServerFqdn", visibility=["read"])
- """The SMB server's Fully Qualified Domain Name, FQDN."""
-
-
-class CacheProperties(_Model):
- """Cache resource properties.
-
- :ivar filepath: The file path of the Cache. Required.
- :vartype filepath: str
- :ivar size: Maximum storage quota allowed for a file system in bytes. Valid values are in the
- range 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. Required.
- :vartype size: int
- :ivar export_policy: Set of export policy rules.
- :vartype export_policy: ~azure.mgmt.netapp.models.CachePropertiesExportPolicy
- :ivar protocol_types: Set of supported protocol types, which include NFSv3, NFSv4 and SMB
- protocol.
- :vartype protocol_types: list[str or ~azure.mgmt.netapp.models.ProtocolTypes]
- :ivar provisioning_state: Azure lifecycle management. Known values are: "Creating", "Updating",
- "Deleting", "Failed", "Succeeded", and "Canceled".
- :vartype provisioning_state: str or ~azure.mgmt.netapp.models.CacheProvisioningState
- :ivar cache_state: Azure NetApp Files Cache lifecycle management. Known values are:
- "ClusterPeeringOfferSent", "VserverPeeringOfferSent", "Creating", "Succeeded", and "Failed".
- :vartype cache_state: str or ~azure.mgmt.netapp.models.CacheLifeCycleState
- :ivar cache_subnet_resource_id: The Azure Resource URI for a delegated cache subnet that will
- be used to allocate data IPs. Required.
- :vartype cache_subnet_resource_id: str
- :ivar peering_subnet_resource_id: The Azure Resource URI for a delegated subnet that will be
- used for ANF Intercluster Interface IP addresses. Required.
- :vartype peering_subnet_resource_id: str
- :ivar mount_targets: List of mount targets that can be used to mount this cache.
- :vartype mount_targets: list[~azure.mgmt.netapp.models.CacheMountTargetProperties]
- :ivar kerberos: Describe if a cache is Kerberos enabled. Known values are: "Disabled" and
- "Enabled".
- :vartype kerberos: str or ~azure.mgmt.netapp.models.KerberosState
- :ivar smb_settings: SMB information for the cache.
- :vartype smb_settings: ~azure.mgmt.netapp.models.SmbSettings
- :ivar throughput_mibps: Maximum throughput in MiB/s that can be achieved by this cache volume
- and this will be accepted as input only for manual qosType cache.
- :vartype throughput_mibps: float
- :ivar actual_throughput_mibps: Actual throughput in MiB/s for auto qosType volumes calculated
- based on size and serviceLevel.
- :vartype actual_throughput_mibps: float
- :ivar encryption_key_source: Source of key used to encrypt data in the cache. Applicable if
- NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values
- (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. Required. Known values are:
- "Microsoft.NetApp" and "Microsoft.KeyVault".
- :vartype encryption_key_source: str or ~azure.mgmt.netapp.models.EncryptionKeySource
- :ivar key_vault_private_endpoint_resource_id: The resource ID of private endpoint for KeyVault.
- It must reside in the same VNET as the volume. Only applicable if encryptionKeySource =
- 'Microsoft.KeyVault'.
- :vartype key_vault_private_endpoint_resource_id: str
- :ivar maximum_number_of_files: Maximum number of files allowed.
- :vartype maximum_number_of_files: int
- :ivar encryption: Specifies if the cache is encryption or not. Known values are: "Disabled" and
- "Enabled".
- :vartype encryption: str or ~azure.mgmt.netapp.models.EncryptionState
- :ivar language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar",
- "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en",
- "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu",
- "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck",
- "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko",
- "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru",
- "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8",
- "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8",
- "tr", "tr.utf-8", "en-us", and "en-us.utf-8".
- :vartype language: str or ~azure.mgmt.netapp.models.VolumeLanguage
- :ivar ldap: Specifies whether LDAP is enabled or not for flexcache volume. Known values are:
- "Disabled" and "Enabled".
- :vartype ldap: str or ~azure.mgmt.netapp.models.LdapState
- :ivar ldap_server_type: Specifies the type of LDAP server for flexcache volume. Known values
- are: "ActiveDirectory" and "OpenLDAP".
- :vartype ldap_server_type: str or ~azure.mgmt.netapp.models.LdapServerType
- :ivar origin_cluster_information: Origin cluster information. Required.
- :vartype origin_cluster_information: ~azure.mgmt.netapp.models.OriginClusterInformation
- :ivar cifs_change_notifications: Flag indicating whether a CIFS change notification is enabled
- for the cache. Known values are: "Disabled" and "Enabled".
- :vartype cifs_change_notifications: str or ~azure.mgmt.netapp.models.CifsChangeNotifyState
- :ivar global_file_locking: Flag indicating whether the global file lock is enabled for the
- cache. Known values are: "Disabled" and "Enabled".
- :vartype global_file_locking: str or ~azure.mgmt.netapp.models.GlobalFileLockingState
- :ivar write_back: Flag indicating whether writeback is enabled for the cache. Known values are:
- "Disabled" and "Enabled".
- :vartype write_back: str or ~azure.mgmt.netapp.models.EnableWriteBackState
- """
-
- filepath: str = rest_field(visibility=["read", "create"])
- """The file path of the Cache. Required."""
- size: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Maximum storage quota allowed for a file system in bytes. Valid values are in the range 50GiB
- to 1PiB. Values expressed in bytes as multiples of 1GiB. Required."""
- export_policy: Optional["_models.CachePropertiesExportPolicy"] = rest_field(
- name="exportPolicy", visibility=["read", "create", "update", "delete", "query"]
- )
- """Set of export policy rules."""
- protocol_types: Optional[list[Union[str, "_models.ProtocolTypes"]]] = rest_field(
- name="protocolTypes", visibility=["read", "create", "update", "delete", "query"]
- )
- """Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol."""
- provisioning_state: Optional[Union[str, "_models.CacheProvisioningState"]] = rest_field(
- name="provisioningState", visibility=["read"]
- )
- """Azure lifecycle management. Known values are: \"Creating\", \"Updating\", \"Deleting\",
- \"Failed\", \"Succeeded\", and \"Canceled\"."""
- cache_state: Optional[Union[str, "_models.CacheLifeCycleState"]] = rest_field(
- name="cacheState", visibility=["read"]
- )
- """Azure NetApp Files Cache lifecycle management. Known values are: \"ClusterPeeringOfferSent\",
- \"VserverPeeringOfferSent\", \"Creating\", \"Succeeded\", and \"Failed\"."""
- cache_subnet_resource_id: str = rest_field(name="cacheSubnetResourceId", visibility=["read", "create"])
- """The Azure Resource URI for a delegated cache subnet that will be used to allocate data IPs.
- Required."""
- peering_subnet_resource_id: str = rest_field(name="peeringSubnetResourceId", visibility=["read", "create"])
- """The Azure Resource URI for a delegated subnet that will be used for ANF Intercluster Interface
- IP addresses. Required."""
- mount_targets: Optional[list["_models.CacheMountTargetProperties"]] = rest_field(
- name="mountTargets", visibility=["read"]
- )
- """List of mount targets that can be used to mount this cache."""
- kerberos: Optional[Union[str, "_models.KerberosState"]] = rest_field(visibility=["read", "create"])
- """Describe if a cache is Kerberos enabled. Known values are: \"Disabled\" and \"Enabled\"."""
- smb_settings: Optional["_models.SmbSettings"] = rest_field(
- name="smbSettings", visibility=["read", "create", "update", "delete", "query"]
- )
- """SMB information for the cache."""
- throughput_mibps: Optional[float] = rest_field(
- name="throughputMibps", visibility=["read", "create", "update", "delete", "query"]
- )
- """Maximum throughput in MiB/s that can be achieved by this cache volume and this will be accepted
- as input only for manual qosType cache."""
- actual_throughput_mibps: Optional[float] = rest_field(name="actualThroughputMibps", visibility=["read"])
- """Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel."""
- encryption_key_source: Union[str, "_models.EncryptionKeySource"] = rest_field(
- name="encryptionKeySource", visibility=["read", "create"]
- )
- """Source of key used to encrypt data in the cache. Applicable if NetApp account has
- encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are:
- 'Microsoft.NetApp, Microsoft.KeyVault'. Required. Known values are: \"Microsoft.NetApp\" and
- \"Microsoft.KeyVault\"."""
- key_vault_private_endpoint_resource_id: Optional[str] = rest_field(
- name="keyVaultPrivateEndpointResourceId", visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the
- volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'."""
- maximum_number_of_files: Optional[int] = rest_field(name="maximumNumberOfFiles", visibility=["read"])
- """Maximum number of files allowed."""
- encryption: Optional[Union[str, "_models.EncryptionState"]] = rest_field(visibility=["read"])
- """Specifies if the cache is encryption or not. Known values are: \"Disabled\" and \"Enabled\"."""
- language: Optional[Union[str, "_models.VolumeLanguage"]] = rest_field(visibility=["read"])
- """Language supported for volume. Known values are: \"c.utf-8\", \"utf8mb4\", \"ar\",
- \"ar.utf-8\", \"hr\", \"hr.utf-8\", \"cs\", \"cs.utf-8\", \"da\", \"da.utf-8\", \"nl\",
- \"nl.utf-8\", \"en\", \"en.utf-8\", \"fi\", \"fi.utf-8\", \"fr\", \"fr.utf-8\", \"de\",
- \"de.utf-8\", \"he\", \"he.utf-8\", \"hu\", \"hu.utf-8\", \"it\", \"it.utf-8\", \"ja\",
- \"ja.utf-8\", \"ja-v1\", \"ja-v1.utf-8\", \"ja-jp.pck\", \"ja-jp.pck.utf-8\", \"ja-jp.932\",
- \"ja-jp.932.utf-8\", \"ja-jp.pck-v2\", \"ja-jp.pck-v2.utf-8\", \"ko\", \"ko.utf-8\", \"no\",
- \"no.utf-8\", \"pl\", \"pl.utf-8\", \"pt\", \"pt.utf-8\", \"c\", \"ro\", \"ro.utf-8\", \"ru\",
- \"ru.utf-8\", \"zh\", \"zh.utf-8\", \"zh.gbk\", \"zh.gbk.utf-8\", \"zh-tw.big5\",
- \"zh-tw.big5.utf-8\", \"zh-tw\", \"zh-tw.utf-8\", \"sk\", \"sk.utf-8\", \"sl\", \"sl.utf-8\",
- \"es\", \"es.utf-8\", \"sv\", \"sv.utf-8\", \"tr\", \"tr.utf-8\", \"en-us\", and
- \"en-us.utf-8\"."""
- ldap: Optional[Union[str, "_models.LdapState"]] = rest_field(visibility=["read", "create"])
- """Specifies whether LDAP is enabled or not for flexcache volume. Known values are: \"Disabled\"
- and \"Enabled\"."""
- ldap_server_type: Optional[Union[str, "_models.LdapServerType"]] = rest_field(
- name="ldapServerType", visibility=["read", "create"]
- )
- """Specifies the type of LDAP server for flexcache volume. Known values are: \"ActiveDirectory\"
- and \"OpenLDAP\"."""
- origin_cluster_information: "_models.OriginClusterInformation" = rest_field(
- name="originClusterInformation", visibility=["read", "create"]
- )
- """Origin cluster information. Required."""
- cifs_change_notifications: Optional[Union[str, "_models.CifsChangeNotifyState"]] = rest_field(
- name="cifsChangeNotifications", visibility=["read", "create", "update", "delete", "query"]
- )
- """Flag indicating whether a CIFS change notification is enabled for the cache. Known values are:
- \"Disabled\" and \"Enabled\"."""
- global_file_locking: Optional[Union[str, "_models.GlobalFileLockingState"]] = rest_field(
- name="globalFileLocking", visibility=["read", "create"]
- )
- """Flag indicating whether the global file lock is enabled for the cache. Known values are:
- \"Disabled\" and \"Enabled\"."""
- write_back: Optional[Union[str, "_models.EnableWriteBackState"]] = rest_field(
- name="writeBack", visibility=["read", "create", "update", "delete", "query"]
- )
- """Flag indicating whether writeback is enabled for the cache. Known values are: \"Disabled\" and
- \"Enabled\"."""
-
- @overload
- def __init__( # pylint: disable=too-many-locals
- self,
- *,
- filepath: str,
- size: int,
- cache_subnet_resource_id: str,
- peering_subnet_resource_id: str,
- encryption_key_source: Union[str, "_models.EncryptionKeySource"],
- origin_cluster_information: "_models.OriginClusterInformation",
- export_policy: Optional["_models.CachePropertiesExportPolicy"] = None,
- protocol_types: Optional[list[Union[str, "_models.ProtocolTypes"]]] = None,
- kerberos: Optional[Union[str, "_models.KerberosState"]] = None,
- smb_settings: Optional["_models.SmbSettings"] = None,
- throughput_mibps: Optional[float] = None,
- key_vault_private_endpoint_resource_id: Optional[str] = None,
- ldap: Optional[Union[str, "_models.LdapState"]] = None,
- ldap_server_type: Optional[Union[str, "_models.LdapServerType"]] = None,
- cifs_change_notifications: Optional[Union[str, "_models.CifsChangeNotifyState"]] = None,
- global_file_locking: Optional[Union[str, "_models.GlobalFileLockingState"]] = None,
- write_back: Optional[Union[str, "_models.EnableWriteBackState"]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class CachePropertiesExportPolicy(_Model):
- """Set of export policy rules.
-
- :ivar rules: Export policy rule.
- :vartype rules: list[~azure.mgmt.netapp.models.ExportPolicyRule]
- """
-
- rules: Optional[list["_models.ExportPolicyRule"]] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Export policy rule."""
-
- @overload
- def __init__(
- self,
- *,
- rules: Optional[list["_models.ExportPolicyRule"]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class CacheUpdate(_Model):
- """The type used for update operations of the Cache.
-
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.CacheUpdateProperties
- """
-
- tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Resource tags."""
- properties: Optional["_models.CacheUpdateProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
-
- @overload
- def __init__(
- self,
- *,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.CacheUpdateProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class CacheUpdateProperties(_Model):
- """The updatable properties of the Cache.
-
- :ivar size: Maximum storage quota allowed for a file system in bytes. Valid values are in the
- range 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB.
- :vartype size: int
- :ivar export_policy: Set of export policy rules.
- :vartype export_policy: ~azure.mgmt.netapp.models.CachePropertiesExportPolicy
- :ivar protocol_types: Set of supported protocol types, which include NFSv3, NFSv4 and SMB
- protocol.
- :vartype protocol_types: list[str or ~azure.mgmt.netapp.models.ProtocolTypes]
- :ivar smb_settings: SMB information for the cache.
- :vartype smb_settings: ~azure.mgmt.netapp.models.SmbSettings
- :ivar throughput_mibps: Maximum throughput in MiB/s that can be achieved by this cache volume
- and this will be accepted as input only for manual qosType cache.
- :vartype throughput_mibps: float
- :ivar key_vault_private_endpoint_resource_id: The resource ID of private endpoint for KeyVault.
- It must reside in the same VNET as the volume. Only applicable if encryptionKeySource =
- 'Microsoft.KeyVault'.
- :vartype key_vault_private_endpoint_resource_id: str
- :ivar cifs_change_notifications: Flag indicating whether a CIFS change notification is enabled
- for the cache. Known values are: "Disabled" and "Enabled".
- :vartype cifs_change_notifications: str or ~azure.mgmt.netapp.models.CifsChangeNotifyState
- :ivar write_back: Flag indicating whether writeback is enabled for the cache. Known values are:
- "Disabled" and "Enabled".
- :vartype write_back: str or ~azure.mgmt.netapp.models.EnableWriteBackState
- """
-
- size: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Maximum storage quota allowed for a file system in bytes. Valid values are in the range 50GiB
- to 1PiB. Values expressed in bytes as multiples of 1GiB."""
- export_policy: Optional["_models.CachePropertiesExportPolicy"] = rest_field(
- name="exportPolicy", visibility=["read", "create", "update", "delete", "query"]
- )
- """Set of export policy rules."""
- protocol_types: Optional[list[Union[str, "_models.ProtocolTypes"]]] = rest_field(
- name="protocolTypes", visibility=["read", "create", "update", "delete", "query"]
- )
- """Set of supported protocol types, which include NFSv3, NFSv4 and SMB protocol."""
- smb_settings: Optional["_models.SmbSettings"] = rest_field(
- name="smbSettings", visibility=["read", "create", "update", "delete", "query"]
- )
- """SMB information for the cache."""
- throughput_mibps: Optional[float] = rest_field(
- name="throughputMibps", visibility=["read", "create", "update", "delete", "query"]
- )
- """Maximum throughput in MiB/s that can be achieved by this cache volume and this will be accepted
- as input only for manual qosType cache."""
- key_vault_private_endpoint_resource_id: Optional[str] = rest_field(
- name="keyVaultPrivateEndpointResourceId", visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the
- volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'."""
- cifs_change_notifications: Optional[Union[str, "_models.CifsChangeNotifyState"]] = rest_field(
- name="cifsChangeNotifications", visibility=["read", "create", "update", "delete", "query"]
- )
- """Flag indicating whether a CIFS change notification is enabled for the cache. Known values are:
- \"Disabled\" and \"Enabled\"."""
- write_back: Optional[Union[str, "_models.EnableWriteBackState"]] = rest_field(
- name="writeBack", visibility=["read", "create", "update", "delete", "query"]
- )
- """Flag indicating whether writeback is enabled for the cache. Known values are: \"Disabled\" and
- \"Enabled\"."""
-
- @overload
- def __init__(
- self,
- *,
- size: Optional[int] = None,
- export_policy: Optional["_models.CachePropertiesExportPolicy"] = None,
- protocol_types: Optional[list[Union[str, "_models.ProtocolTypes"]]] = None,
- smb_settings: Optional["_models.SmbSettings"] = None,
- throughput_mibps: Optional[float] = None,
- key_vault_private_endpoint_resource_id: Optional[str] = None,
- cifs_change_notifications: Optional[Union[str, "_models.CifsChangeNotifyState"]] = None,
- write_back: Optional[Union[str, "_models.EnableWriteBackState"]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class CapacityPool(TrackedResource):
- """Capacity pool resource.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar location: The geo-location where the resource lives. Required.
- :vartype location: str
- :ivar properties: Capacity pool properties. Required.
- :vartype properties: ~azure.mgmt.netapp.models.PoolProperties
- :ivar etag: "If etag is provided in the response body, it may also be provided as a header per
- the normal etag convention. Entity tags are used for comparing two or more entities from the
- same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match
- (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.").
- :vartype etag: str
- """
-
- properties: "_models.PoolProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Capacity pool properties. Required."""
- etag: Optional[str] = rest_field(visibility=["read"])
- """\"If etag is provided in the response body, it may also be provided as a header per the normal
- etag convention. Entity tags are used for comparing two or more entities from the same
- requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section
- 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\")."""
-
- __flattened_items = [
- "pool_id",
- "size",
- "service_level",
- "provisioning_state",
- "total_throughput_mibps",
- "utilized_throughput_mibps",
- "custom_throughput_mibps",
- "qos_type",
- "cool_access",
- "encryption_type",
- ]
-
- @overload
- def __init__(
- self,
- *,
- location: str,
- properties: "_models.PoolProperties",
- tags: Optional[dict[str, str]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
- super().__init__(*args, **kwargs)
- for k, v in _flattened_input.items():
- setattr(self, k, v)
-
- def __getattr__(self, name: str) -> Any:
- if name in self.__flattened_items:
- if self.properties is None:
- return None
- return getattr(self.properties, name)
- raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
-
- def __setattr__(self, key: str, value: Any) -> None:
- if key in self.__flattened_items:
- if self.properties is None:
- self.properties = self._attr_to_rest_field["properties"]._class_type()
- setattr(self.properties, key, value)
- else:
- super().__setattr__(key, value)
-
-
-class CapacityPoolPatch(_Model):
- """Capacity pool patch resource.
-
- :ivar location: Resource location.
- :vartype location: str
- :ivar id: Resource Id.
- :vartype id: str
- :ivar name: Resource name.
- :vartype name: str
- :ivar type: Resource type.
- :vartype type: str
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar properties: Capacity pool properties.
- :vartype properties: ~azure.mgmt.netapp.models.PoolPatchProperties
- """
-
- location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Resource location."""
- id: Optional[str] = rest_field(visibility=["read"])
- """Resource Id."""
- name: Optional[str] = rest_field(visibility=["read"])
- """Resource name."""
- type: Optional[str] = rest_field(visibility=["read"])
- """Resource type."""
- tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Resource tags."""
- properties: Optional["_models.PoolPatchProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Capacity pool properties."""
-
- __flattened_items = ["size", "qos_type", "cool_access", "custom_throughput_mibps"]
-
- @overload
- def __init__(
- self,
- *,
- location: Optional[str] = None,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.PoolPatchProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
- super().__init__(*args, **kwargs)
- for k, v in _flattened_input.items():
- setattr(self, k, v)
-
- def __getattr__(self, name: str) -> Any:
- if name in self.__flattened_items:
- if self.properties is None:
- return None
- return getattr(self.properties, name)
- raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
-
- def __setattr__(self, key: str, value: Any) -> None:
- if key in self.__flattened_items:
- if self.properties is None:
- self.properties = self._attr_to_rest_field["properties"]._class_type()
- setattr(self.properties, key, value)
- else:
- super().__setattr__(key, value)
-
-
-class ChangeKeyVault(_Model):
- """Change key vault request.
-
- :ivar key_vault_uri: The URI of the key vault/managed HSM that should be used for encryption.
- Required.
- :vartype key_vault_uri: str
- :ivar key_name: The name of the key that should be used for encryption. Required.
- :vartype key_name: str
- :ivar key_vault_resource_id: Azure resource ID of the key vault/managed HSM that should be used
- for encryption.
- :vartype key_vault_resource_id: str
- :ivar key_vault_private_endpoints: Pairs of virtual network ID and private endpoint ID. Every
- virtual network that has volumes encrypted with customer-managed keys needs its own key vault
- private endpoint. Required.
- :vartype key_vault_private_endpoints: list[~azure.mgmt.netapp.models.KeyVaultPrivateEndpoint]
- """
-
- key_vault_uri: str = rest_field(name="keyVaultUri", visibility=["read", "create", "update", "delete", "query"])
- """The URI of the key vault/managed HSM that should be used for encryption. Required."""
- key_name: str = rest_field(name="keyName", visibility=["read", "create", "update", "delete", "query"])
- """The name of the key that should be used for encryption. Required."""
- key_vault_resource_id: Optional[str] = rest_field(
- name="keyVaultResourceId", visibility=["read", "create", "update", "delete", "query"]
- )
- """Azure resource ID of the key vault/managed HSM that should be used for encryption."""
- key_vault_private_endpoints: list["_models.KeyVaultPrivateEndpoint"] = rest_field(
- name="keyVaultPrivateEndpoints", visibility=["read", "create", "update", "delete", "query"]
- )
- """Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes
- encrypted with customer-managed keys needs its own key vault private endpoint. Required."""
-
- @overload
- def __init__(
- self,
- *,
- key_vault_uri: str,
- key_name: str,
- key_vault_private_endpoints: list["_models.KeyVaultPrivateEndpoint"],
- key_vault_resource_id: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ChangeZoneRequest(_Model):
- """Changes the zone for the Zone Redundant elastic capacity pool.
-
- :ivar new_zone: Availability zone to move Zone Redundant elastic capacity pool to. Required.
- :vartype new_zone: str
- """
-
- new_zone: str = rest_field(name="newZone", visibility=["read", "create", "update", "delete", "query"])
- """Availability zone to move Zone Redundant elastic capacity pool to. Required."""
-
- @overload
- def __init__(
- self,
- *,
- new_zone: str,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class CheckAvailabilityResponse(_Model):
- """Information regarding availability of a resource.
-
- :ivar is_available: true indicates name is valid and available. false
- indicates the name is invalid, unavailable, or both.
- :vartype is_available: bool
- :ivar reason: Invalid indicates the name provided does not match Azure App Service
- naming requirements. AlreadyExists indicates that the name is already in use and
- is therefore unavailable. Known values are: "Invalid" and "AlreadyExists".
- :vartype reason: str or ~azure.mgmt.netapp.models.InAvailabilityReasonType
- :ivar message: If reason == invalid, provide the user with the reason why the given name is
- invalid, and provide the resource naming requirements so that the user can select a valid name.
- If reason == AlreadyExists, explain that resource name is already in use, and direct them to
- select a different name.
- :vartype message: str
- """
-
- is_available: Optional[bool] = rest_field(
- name="isAvailable", visibility=["read", "create", "update", "delete", "query"]
- )
- """true indicates name is valid and available. false indicates the name
- is invalid, unavailable, or both."""
- reason: Optional[Union[str, "_models.InAvailabilityReasonType"]] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Invalid indicates the name provided does not match Azure App Service naming
- requirements. AlreadyExists indicates that the name is already in use and is
- therefore unavailable. Known values are: \"Invalid\" and \"AlreadyExists\"."""
- message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """If reason == invalid, provide the user with the reason why the given name is invalid, and
- provide the resource naming requirements so that the user can select a valid name. If reason ==
- AlreadyExists, explain that resource name is already in use, and direct them to select a
- different name."""
-
- @overload
- def __init__(
- self,
- *,
- is_available: Optional[bool] = None,
- reason: Optional[Union[str, "_models.InAvailabilityReasonType"]] = None,
- message: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class CheckElasticResourceAvailabilityResponse(_Model):
- """Information regarding availability of a resource.
-
- :ivar is_available: True indicates name is valid and available. False indicates the name is
- invalid, unavailable, or both. Known values are: "True" and "False".
- :vartype is_available: str or ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityStatus
- :ivar reason: Invalid indicates the name provided does not match Azure NetApp Files naming
- requirements. AlreadyExists indicates that the name is already in use and is therefore
- unavailable. Known values are: "Invalid" and "AlreadyExists".
- :vartype reason: str or ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityReason
- :ivar message: If reason == invalid, provide the user with the reason why the given name is
- invalid, and provide the resource naming requirements so that the user can select a valid name.
- If reason == AlreadyExists, explain that resource name is already in use, and direct them to
- select a different name.
- :vartype message: str
- """
-
- is_available: Optional[Union[str, "_models.CheckElasticResourceAvailabilityStatus"]] = rest_field(
- name="isAvailable", visibility=["read", "create", "update", "delete", "query"]
- )
- """True indicates name is valid and available. False indicates the name is invalid, unavailable,
- or both. Known values are: \"True\" and \"False\"."""
- reason: Optional[Union[str, "_models.CheckElasticResourceAvailabilityReason"]] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Invalid indicates the name provided does not match Azure NetApp Files naming requirements.
- AlreadyExists indicates that the name is already in use and is therefore unavailable. Known
- values are: \"Invalid\" and \"AlreadyExists\"."""
- message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """If reason == invalid, provide the user with the reason why the given name is invalid, and
- provide the resource naming requirements so that the user can select a valid name. If reason ==
- AlreadyExists, explain that resource name is already in use, and direct them to select a
- different name."""
-
- @overload
- def __init__(
- self,
- *,
- is_available: Optional[Union[str, "_models.CheckElasticResourceAvailabilityStatus"]] = None,
- reason: Optional[Union[str, "_models.CheckElasticResourceAvailabilityReason"]] = None,
- message: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class CheckElasticVolumeFilePathAvailabilityRequest(_Model): # pylint: disable=name-too-long
- """File path availability request content - availability is based on the elastic volume filePath
- within the given elastic capacityPool.
-
- :ivar file_path: A unique file path for the volume. Used when creating mount targets. This
- needs to be unique within the elastic capacity pool. Required.
- :vartype file_path: str
- """
-
- file_path: str = rest_field(name="filePath", visibility=["read", "create", "update", "delete", "query"])
- """A unique file path for the volume. Used when creating mount targets. This needs to be unique
- within the elastic capacity pool. Required."""
-
- @overload
- def __init__(
- self,
- *,
- file_path: str,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class CifsUser(_Model):
- """The effective CIFS username when accessing the volume data.
-
- :ivar username: The CIFS user's username.
- :vartype username: str
- """
-
- username: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """The CIFS user's username."""
-
- @overload
- def __init__(
- self,
- *,
- username: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ClusterPeerCommandResponse(_Model):
- """Information about cluster peering process.
-
- :ivar peer_accept_command: A command that needs to be run on the external ONTAP to accept
- cluster peering. Will only be present if clusterPeeringStatus is
- pending.
- :vartype peer_accept_command: str
- """
-
- peer_accept_command: Optional[str] = rest_field(
- name="peerAcceptCommand", visibility=["read", "create", "update", "delete", "query"]
- )
- """A command that needs to be run on the external ONTAP to accept cluster peering. Will only be
- present if clusterPeeringStatus is pending."""
-
- @overload
- def __init__(
- self,
- *,
- peer_accept_command: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class DailySchedule(_Model):
- """Daily Schedule properties.
-
- :ivar snapshots_to_keep: Daily snapshot count to keep.
- :vartype snapshots_to_keep: int
- :ivar hour: Indicates which hour in UTC timezone a snapshot should be taken.
- :vartype hour: int
- :ivar minute: Indicates which minute snapshot should be taken.
- :vartype minute: int
- :ivar used_bytes: Resource size in bytes, current storage usage for the volume in bytes.
- :vartype used_bytes: int
- """
-
- snapshots_to_keep: Optional[int] = rest_field(
- name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"]
- )
- """Daily snapshot count to keep."""
- hour: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Indicates which hour in UTC timezone a snapshot should be taken."""
- minute: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Indicates which minute snapshot should be taken."""
- used_bytes: Optional[int] = rest_field(name="usedBytes", visibility=["read", "create", "update", "delete", "query"])
- """Resource size in bytes, current storage usage for the volume in bytes."""
-
- @overload
- def __init__(
- self,
- *,
- snapshots_to_keep: Optional[int] = None,
- hour: Optional[int] = None,
- minute: Optional[int] = None,
- used_bytes: Optional[int] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class DestinationReplication(_Model):
- """Destination replication properties.
-
- :ivar resource_id: The resource ID of the remote volume.
- :vartype resource_id: str
- :ivar replication_type: Indicates whether the replication is cross zone or cross region. Known
- values are: "CrossRegionReplication" and "CrossZoneReplication".
- :vartype replication_type: str or ~azure.mgmt.netapp.models.ReplicationType
- :ivar region: The remote region for the destination volume.
- :vartype region: str
- :ivar zone: The remote zone for the destination volume.
- :vartype zone: str
- """
-
- resource_id: Optional[str] = rest_field(
- name="resourceId", visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource ID of the remote volume."""
- replication_type: Optional[Union[str, "_models.ReplicationType"]] = rest_field(
- name="replicationType", visibility=["read", "create", "update", "delete", "query"]
- )
- """Indicates whether the replication is cross zone or cross region. Known values are:
- \"CrossRegionReplication\" and \"CrossZoneReplication\"."""
- region: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """The remote region for the destination volume."""
- zone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """The remote zone for the destination volume."""
-
- @overload
- def __init__(
- self,
- *,
- resource_id: Optional[str] = None,
- replication_type: Optional[Union[str, "_models.ReplicationType"]] = None,
- region: Optional[str] = None,
- zone: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class Dimension(_Model):
- """Dimension of blobs, possibly be blob type or access tier.
-
- :ivar name: Display name of dimension.
- :vartype name: str
- :ivar display_name: Display name of dimension.
- :vartype display_name: str
- """
-
- name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Display name of dimension."""
- display_name: Optional[str] = rest_field(
- name="displayName", visibility=["read", "create", "update", "delete", "query"]
- )
- """Display name of dimension."""
-
- @overload
- def __init__(
- self,
- *,
- name: Optional[str] = None,
- display_name: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticAccount(TrackedResource):
- """NetApp elastic account resource.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar location: The geo-location where the resource lives. Required.
- :vartype location: str
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ElasticAccountProperties
- :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per
- the normal etag convention. Entity tags are used for comparing two or more entities from the
- same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match
- (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
- :vartype e_tag: str
- :ivar identity: The managed service identities assigned to this resource.
- :vartype identity: ~azure.mgmt.netapp.models.ManagedServiceIdentity
- """
-
- properties: Optional["_models.ElasticAccountProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
- e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"])
- """If eTag is provided in the response body, it may also be provided as a header per the normal
- etag convention. Entity tags are used for comparing two or more entities from the same
- requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section
- 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."""
- identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The managed service identities assigned to this resource."""
-
- @overload
- def __init__(
- self,
- *,
- location: str,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.ElasticAccountProperties"] = None,
- identity: Optional["_models.ManagedServiceIdentity"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticAccountProperties(_Model):
- """NetApp elastic account properties.
-
- :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating",
- "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded".
- :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState
- :ivar encryption: Encryption settings.
- :vartype encryption: ~azure.mgmt.netapp.models.ElasticEncryption
- """
-
- provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field(
- name="provisioningState", visibility=["read"]
- )
- """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\",
- \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\"."""
- encryption: Optional["_models.ElasticEncryption"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Encryption settings."""
-
- @overload
- def __init__(
- self,
- *,
- encryption: Optional["_models.ElasticEncryption"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticAccountUpdate(_Model):
- """The type used for update operations of the ElasticAccount.
-
- :ivar identity: The managed service identities assigned to this resource.
- :vartype identity: ~azure.mgmt.netapp.models.ManagedServiceIdentity
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ElasticAccountUpdateProperties
- """
-
- identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The managed service identities assigned to this resource."""
- tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Resource tags."""
- properties: Optional["_models.ElasticAccountUpdateProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
-
- @overload
- def __init__(
- self,
- *,
- identity: Optional["_models.ManagedServiceIdentity"] = None,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.ElasticAccountUpdateProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticAccountUpdateProperties(_Model):
- """The updatable properties of the ElasticAccount.
-
- :ivar encryption: Encryption settings.
- :vartype encryption: ~azure.mgmt.netapp.models.ElasticEncryption
- """
-
- encryption: Optional["_models.ElasticEncryption"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Encryption settings."""
-
- @overload
- def __init__(
- self,
- *,
- encryption: Optional["_models.ElasticEncryption"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticBackup(ProxyResource):
- """NetApp Elastic Backup under an elastic Backup Vault.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ElasticBackupProperties
- """
-
- properties: Optional["_models.ElasticBackupProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
-
- @overload
- def __init__(
- self,
- *,
- properties: Optional["_models.ElasticBackupProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticBackupPolicy(TrackedResource):
- """NetApp Elastic Backup Policy resource.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar location: The geo-location where the resource lives. Required.
- :vartype location: str
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ElasticBackupPolicyProperties
- :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per
- the normal etag convention. Entity tags are used for comparing two or more entities from the
- same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match
- (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
- :vartype e_tag: str
- """
-
- properties: Optional["_models.ElasticBackupPolicyProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
- e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"])
- """If eTag is provided in the response body, it may also be provided as a header per the normal
- etag convention. Entity tags are used for comparing two or more entities from the same
- requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section
- 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."""
-
- @overload
- def __init__(
- self,
- *,
- location: str,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.ElasticBackupPolicyProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticBackupPolicyProperties(_Model):
- """Elastic Backup Policy properties.
-
- :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating",
- "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded".
- :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState
- :ivar daily_backups_to_keep: Daily backups count to keep.
- :vartype daily_backups_to_keep: int
- :ivar weekly_backups_to_keep: Weekly backups count to keep.
- :vartype weekly_backups_to_keep: int
- :ivar monthly_backups_to_keep: Monthly backups count to keep.
- :vartype monthly_backups_to_keep: int
- :ivar assigned_volumes_count: The number of volumes currently using this Backup Policy.
- :vartype assigned_volumes_count: int
- :ivar policy_state: The property to identify whether Backup Policy is enabled or not. Known
- values are: "Enabled" and "Disabled".
- :vartype policy_state: str or ~azure.mgmt.netapp.models.ElasticBackupPolicyState
- """
-
- provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field(
- name="provisioningState", visibility=["read"]
- )
- """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\",
- \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\"."""
- daily_backups_to_keep: Optional[int] = rest_field(
- name="dailyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"]
- )
- """Daily backups count to keep."""
- weekly_backups_to_keep: Optional[int] = rest_field(
- name="weeklyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"]
- )
- """Weekly backups count to keep."""
- monthly_backups_to_keep: Optional[int] = rest_field(
- name="monthlyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"]
- )
- """Monthly backups count to keep."""
- assigned_volumes_count: Optional[int] = rest_field(name="assignedVolumesCount", visibility=["read"])
- """The number of volumes currently using this Backup Policy."""
- policy_state: Optional[Union[str, "_models.ElasticBackupPolicyState"]] = rest_field(
- name="policyState", visibility=["read", "create", "update", "delete", "query"]
- )
- """The property to identify whether Backup Policy is enabled or not. Known values are: \"Enabled\"
- and \"Disabled\"."""
-
- @overload
- def __init__(
- self,
- *,
- daily_backups_to_keep: Optional[int] = None,
- weekly_backups_to_keep: Optional[int] = None,
- monthly_backups_to_keep: Optional[int] = None,
- policy_state: Optional[Union[str, "_models.ElasticBackupPolicyState"]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticBackupPolicyUpdate(_Model):
- """The type used for update operations of the ElasticBackupPolicy.
-
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ElasticBackupPolicyUpdateProperties
- """
-
- tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Resource tags."""
- properties: Optional["_models.ElasticBackupPolicyUpdateProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
-
- @overload
- def __init__(
- self,
- *,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.ElasticBackupPolicyUpdateProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticBackupPolicyUpdateProperties(_Model):
- """The updatable properties of the ElasticBackupPolicy.
-
- :ivar daily_backups_to_keep: Daily backups count to keep.
- :vartype daily_backups_to_keep: int
- :ivar weekly_backups_to_keep: Weekly backups count to keep.
- :vartype weekly_backups_to_keep: int
- :ivar monthly_backups_to_keep: Monthly backups count to keep.
- :vartype monthly_backups_to_keep: int
- :ivar policy_state: The property to identify whether Backup Policy is enabled or not. Known
- values are: "Enabled" and "Disabled".
- :vartype policy_state: str or ~azure.mgmt.netapp.models.ElasticBackupPolicyState
- """
-
- daily_backups_to_keep: Optional[int] = rest_field(
- name="dailyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"]
- )
- """Daily backups count to keep."""
- weekly_backups_to_keep: Optional[int] = rest_field(
- name="weeklyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"]
- )
- """Weekly backups count to keep."""
- monthly_backups_to_keep: Optional[int] = rest_field(
- name="monthlyBackupsToKeep", visibility=["read", "create", "update", "delete", "query"]
- )
- """Monthly backups count to keep."""
- policy_state: Optional[Union[str, "_models.ElasticBackupPolicyState"]] = rest_field(
- name="policyState", visibility=["read", "create", "update", "delete", "query"]
- )
- """The property to identify whether Backup Policy is enabled or not. Known values are: \"Enabled\"
- and \"Disabled\"."""
-
- @overload
- def __init__(
- self,
- *,
- daily_backups_to_keep: Optional[int] = None,
- weekly_backups_to_keep: Optional[int] = None,
- monthly_backups_to_keep: Optional[int] = None,
- policy_state: Optional[Union[str, "_models.ElasticBackupPolicyState"]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticBackupProperties(_Model):
- """Elastic Backup properties.
-
- :ivar creation_date: The creation date of the backup.
- :vartype creation_date: ~datetime.datetime
- :ivar snapshot_creation_date: The snapshot creation date of the backup.
- :vartype snapshot_creation_date: ~datetime.datetime
- :ivar completion_date: The completion date of the backup.
- :vartype completion_date: ~datetime.datetime
- :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating",
- "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded".
- :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState
- :ivar size: Size of backup in bytes.
- :vartype size: int
- :ivar label: Label for backup.
- :vartype label: str
- :ivar backup_type: Type of backup Manual or Scheduled. Known values are: "Manual" and
- "Scheduled".
- :vartype backup_type: str or ~azure.mgmt.netapp.models.ElasticBackupType
- :ivar failure_reason: Failure reason.
- :vartype failure_reason: str
- :ivar elastic_volume_resource_id: ResourceId used to identify the Elastic Volume. Required.
- :vartype elastic_volume_resource_id: str
- :ivar snapshot_usage: Manual backup using an already existing snapshot. This will always be
- CreateNewSnapshot for scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual
- backups. Known values are: "UseExistingSnapshot" and "CreateNewSnapshot".
- :vartype snapshot_usage: str or ~azure.mgmt.netapp.models.SnapshotUsage
- :ivar elastic_snapshot_resource_id: ResourceId used to identify the elastic snapshot resource.
- This is required when an existing snapshot needs to be used for creating a manual backup.
- :vartype elastic_snapshot_resource_id: str
- :ivar elastic_backup_policy_resource_id: ResourceId used to identify the elastic backup policy.
- :vartype elastic_backup_policy_resource_id: str
- :ivar volume_size: Specifies if the backup is for a large volume. Known values are: "Large" and
- "Regular".
- :vartype volume_size: str or ~azure.mgmt.netapp.models.VolumeSize
- """
-
- creation_date: Optional[datetime.datetime] = rest_field(name="creationDate", visibility=["read"], format="rfc3339")
- """The creation date of the backup."""
- snapshot_creation_date: Optional[datetime.datetime] = rest_field(
- name="snapshotCreationDate", visibility=["read"], format="rfc3339"
- )
- """The snapshot creation date of the backup."""
- completion_date: Optional[datetime.datetime] = rest_field(
- name="completionDate", visibility=["read"], format="rfc3339"
- )
- """The completion date of the backup."""
- provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field(
- name="provisioningState", visibility=["read"]
- )
- """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\",
- \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\"."""
- size: Optional[int] = rest_field(visibility=["read"])
- """Size of backup in bytes."""
- label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Label for backup."""
- backup_type: Optional[Union[str, "_models.ElasticBackupType"]] = rest_field(name="backupType", visibility=["read"])
- """Type of backup Manual or Scheduled. Known values are: \"Manual\" and \"Scheduled\"."""
- failure_reason: Optional[str] = rest_field(name="failureReason", visibility=["read"])
- """Failure reason."""
- elastic_volume_resource_id: str = rest_field(name="elasticVolumeResourceId", visibility=["read", "create"])
- """ResourceId used to identify the Elastic Volume. Required."""
- snapshot_usage: Optional[Union[str, "_models.SnapshotUsage"]] = rest_field(
- name="snapshotUsage", visibility=["read", "create"]
- )
- """Manual backup using an already existing snapshot. This will always be CreateNewSnapshot for
- scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual backups. Known values
- are: \"UseExistingSnapshot\" and \"CreateNewSnapshot\"."""
- elastic_snapshot_resource_id: Optional[str] = rest_field(
- name="elasticSnapshotResourceId", visibility=["read", "create"]
- )
- """ResourceId used to identify the elastic snapshot resource. This is required when an existing
- snapshot needs to be used for creating a manual backup."""
- elastic_backup_policy_resource_id: Optional[str] = rest_field(
- name="elasticBackupPolicyResourceId", visibility=["read"]
- )
- """ResourceId used to identify the elastic backup policy."""
- volume_size: Optional[Union[str, "_models.VolumeSize"]] = rest_field(name="volumeSize", visibility=["read"])
- """Specifies if the backup is for a large volume. Known values are: \"Large\" and \"Regular\"."""
-
- @overload
- def __init__(
- self,
- *,
- elastic_volume_resource_id: str,
- label: Optional[str] = None,
- snapshot_usage: Optional[Union[str, "_models.SnapshotUsage"]] = None,
- elastic_snapshot_resource_id: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticBackupVault(TrackedResource):
- """NetApp elastic backup vault resource.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar location: The geo-location where the resource lives. Required.
- :vartype location: str
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ElasticBackupVaultProperties
- :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per
- the normal etag convention. Entity tags are used for comparing two or more entities from the
- same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match
- (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
- :vartype e_tag: str
- """
-
- properties: Optional["_models.ElasticBackupVaultProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
- e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"])
- """If eTag is provided in the response body, it may also be provided as a header per the normal
- etag convention. Entity tags are used for comparing two or more entities from the same
- requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section
- 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."""
-
- @overload
- def __init__(
- self,
- *,
- location: str,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.ElasticBackupVaultProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticBackupVaultProperties(_Model):
- """Elastic Backup Vault properties.
-
- :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating",
- "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded".
- :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState
- """
-
- provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field(
- name="provisioningState", visibility=["read"]
- )
- """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\",
- \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\"."""
-
-
-class ElasticBackupVaultUpdate(_Model):
- """The type used for update operations of the ElasticBackupVault.
-
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- """
-
- tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Resource tags."""
-
- @overload
- def __init__(
- self,
- *,
- tags: Optional[dict[str, str]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticCapacityPool(TrackedResource):
- """NetApp Elastic Capacity Pool resource.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar location: The geo-location where the resource lives. Required.
- :vartype location: str
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ElasticCapacityPoolProperties
- :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per
- the normal etag convention. Entity tags are used for comparing two or more entities from the
- same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match
- (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
- :vartype e_tag: str
- :ivar zones: The availability zones.
- :vartype zones: list[str]
- """
-
- properties: Optional["_models.ElasticCapacityPoolProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
- e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"])
- """If eTag is provided in the response body, it may also be provided as a header per the normal
- etag convention. Entity tags are used for comparing two or more entities from the same
- requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section
- 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."""
- zones: Optional[list[str]] = rest_field(visibility=["read", "create"])
- """The availability zones."""
-
- @overload
- def __init__(
- self,
- *,
- location: str,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.ElasticCapacityPoolProperties"] = None,
- zones: Optional[list[str]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticCapacityPoolProperties(_Model):
- """Elastic capacity pool properties.
-
- :ivar size: Provisioned size of the pool (in bytes). For zoneRedundant service level pool,
- value must be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values
- expressed in bytes as multiples of 1TiB till 16TiB and in multiples of 8TiB from 24TiB to
- 128TiB. Pool size can't be shrunk once it is created. Required.
- :vartype size: int
- :ivar service_level: The service level of the elastic capacity pool. Required. "ZoneRedundant"
- :vartype service_level: str or ~azure.mgmt.netapp.models.ElasticServiceLevel
- :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating",
- "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded".
- :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState
- :ivar encryption: Encryption settings.
- :vartype encryption: ~azure.mgmt.netapp.models.ElasticEncryptionConfiguration
- :ivar total_throughput_mibps: Total throughput of the pool in MiB/s.
- :vartype total_throughput_mibps: float
- :ivar subnet_resource_id: The Azure Resource URI for a delegated subnet. Must have the
- delegation Microsoft.NetApp/elasticVolumes, this is used by all the volumes within the pool.
- Required.
- :vartype subnet_resource_id: str
- :ivar current_zone: Indicates the current zone of the pool. This can be changed for
- zoneRedundant service level pool with the changeZone action.
- :vartype current_zone: str
- :ivar availability_status: Current availability status of the resource. Known values are:
- "Online" and "Offline".
- :vartype availability_status: str or
- ~azure.mgmt.netapp.models.ElasticResourceAvailabilityStatus
- :ivar active_directory_config_resource_id: The Azure Resource URI for an Active Directory
- configuration. This is used by all the SMB volumes within the pool.
- :vartype active_directory_config_resource_id: str
- """
-
- size: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must be in
- the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as
- multiples of 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be
- shrunk once it is created. Required."""
- service_level: Union[str, "_models.ElasticServiceLevel"] = rest_field(
- name="serviceLevel", visibility=["read", "create"]
- )
- """The service level of the elastic capacity pool. Required. \"ZoneRedundant\""""
- provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field(
- name="provisioningState", visibility=["read"]
- )
- """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\",
- \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\"."""
- encryption: Optional["_models.ElasticEncryptionConfiguration"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Encryption settings."""
- total_throughput_mibps: Optional[float] = rest_field(name="totalThroughputMibps", visibility=["read"])
- """Total throughput of the pool in MiB/s."""
- subnet_resource_id: str = rest_field(name="subnetResourceId", visibility=["read", "create"])
- """The Azure Resource URI for a delegated subnet. Must have the delegation
- Microsoft.NetApp/elasticVolumes, this is used by all the volumes within the pool. Required."""
- current_zone: Optional[str] = rest_field(name="currentZone", visibility=["read"])
- """Indicates the current zone of the pool. This can be changed for zoneRedundant service level
- pool with the changeZone action."""
- availability_status: Optional[Union[str, "_models.ElasticResourceAvailabilityStatus"]] = rest_field(
- name="availabilityStatus", visibility=["read"]
- )
- """Current availability status of the resource. Known values are: \"Online\" and \"Offline\"."""
- active_directory_config_resource_id: Optional[str] = rest_field(
- name="activeDirectoryConfigResourceId", visibility=["read", "create", "update", "delete", "query"]
- )
- """The Azure Resource URI for an Active Directory configuration. This is used by all the SMB
- volumes within the pool."""
-
- @overload
- def __init__(
- self,
- *,
- size: int,
- service_level: Union[str, "_models.ElasticServiceLevel"],
- subnet_resource_id: str,
- encryption: Optional["_models.ElasticEncryptionConfiguration"] = None,
- active_directory_config_resource_id: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticCapacityPoolUpdate(_Model):
- """The type used for update operations of the ElasticCapacityPool.
-
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ElasticCapacityPoolUpdateProperties
- """
-
- tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Resource tags."""
- properties: Optional["_models.ElasticCapacityPoolUpdateProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
-
- @overload
- def __init__(
- self,
- *,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.ElasticCapacityPoolUpdateProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticCapacityPoolUpdateProperties(_Model):
- """The updatable properties of the ElasticCapacityPool.
-
- :ivar size: Provisioned size of the pool (in bytes). For zoneRedundant service level pool,
- value must be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values
- expressed in bytes as multiples of 1TiB till 16TiB and in multiples of 8TiB from 24TiB to
- 128TiB. Pool size can't be shrunk once it is created.
- :vartype size: int
- :ivar encryption: Encryption settings.
- :vartype encryption: ~azure.mgmt.netapp.models.ElasticEncryptionConfiguration
- :ivar active_directory_config_resource_id: The Azure Resource URI for an Active Directory
- configuration. This is used by all the SMB volumes within the pool.
- :vartype active_directory_config_resource_id: str
- """
-
- size: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must be in
- the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as
- multiples of 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be
- shrunk once it is created."""
- encryption: Optional["_models.ElasticEncryptionConfiguration"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Encryption settings."""
- active_directory_config_resource_id: Optional[str] = rest_field(
- name="activeDirectoryConfigResourceId", visibility=["read", "create", "update", "delete", "query"]
- )
- """The Azure Resource URI for an Active Directory configuration. This is used by all the SMB
- volumes within the pool."""
-
- @overload
- def __init__(
- self,
- *,
- size: Optional[int] = None,
- encryption: Optional["_models.ElasticEncryptionConfiguration"] = None,
- active_directory_config_resource_id: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticEncryption(_Model):
- """Encryption settings.
-
- :ivar key_source: The encryption keySource (provider). Possible values (case-insensitive):
- Microsoft.NetApp, Microsoft.KeyVault. Known values are: "Microsoft.NetApp" and
- "Microsoft.KeyVault".
- :vartype key_source: str or ~azure.mgmt.netapp.models.KeySource
- :ivar key_vault_properties: Properties provided by KeyVault. Applicable if keySource is
- 'Microsoft.KeyVault'.
- :vartype key_vault_properties: ~azure.mgmt.netapp.models.ElasticKeyVaultProperties
- :ivar identity: Identity used to authenticate to KeyVault. Applicable if keySource is
- 'Microsoft.KeyVault'.
- :vartype identity: ~azure.mgmt.netapp.models.ElasticEncryptionIdentity
- """
-
- key_source: Optional[Union[str, "_models.KeySource"]] = rest_field(
- name="keySource", visibility=["read", "create", "update", "delete", "query"]
- )
- """The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp,
- Microsoft.KeyVault. Known values are: \"Microsoft.NetApp\" and \"Microsoft.KeyVault\"."""
- key_vault_properties: Optional["_models.ElasticKeyVaultProperties"] = rest_field(
- name="keyVaultProperties", visibility=["read", "create", "update", "delete", "query"]
- )
- """Properties provided by KeyVault. Applicable if keySource is 'Microsoft.KeyVault'."""
- identity: Optional["_models.ElasticEncryptionIdentity"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'."""
-
- @overload
- def __init__(
- self,
- *,
- key_source: Optional[Union[str, "_models.KeySource"]] = None,
- key_vault_properties: Optional["_models.ElasticKeyVaultProperties"] = None,
- identity: Optional["_models.ElasticEncryptionIdentity"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticEncryptionConfiguration(_Model):
- """CMK Encryption Configuration.
-
- :ivar elastic_pool_encryption_key_source: Pool Encryption Key Source. Required. Known values
- are: "NetApp" and "KeyVault".
- :vartype elastic_pool_encryption_key_source: str or
- ~azure.mgmt.netapp.models.ElasticPoolEncryptionKeySource
- :ivar key_vault_private_endpoint_resource_id: The resource ID of private endpoint for KeyVault.
- It must reside in the same VNET as the volume. Only applicable if encryptionKeySource =
- 'Microsoft.KeyVault'. Required.
- :vartype key_vault_private_endpoint_resource_id: str
- """
-
- elastic_pool_encryption_key_source: Union[str, "_models.ElasticPoolEncryptionKeySource"] = rest_field(
- name="elasticPoolEncryptionKeySource", visibility=["read", "create", "update", "delete", "query"]
- )
- """Pool Encryption Key Source. Required. Known values are: \"NetApp\" and \"KeyVault\"."""
- key_vault_private_endpoint_resource_id: str = rest_field(
- name="keyVaultPrivateEndpointResourceId", visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the
- volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. Required."""
-
- @overload
- def __init__(
- self,
- *,
- elastic_pool_encryption_key_source: Union[str, "_models.ElasticPoolEncryptionKeySource"],
- key_vault_private_endpoint_resource_id: str,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticEncryptionIdentity(_Model):
- """Identity used to authenticate with key vault.
-
- :ivar principal_id: The principal ID (object ID) of the identity used to authenticate with key
- vault. Read-only.
- :vartype principal_id: str
- :ivar user_assigned_identity: The ARM resource identifier of the user assigned identity used to
- authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match
- key of identity.userAssignedIdentities.
- :vartype user_assigned_identity: str
- """
-
- principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
- """The principal ID (object ID) of the identity used to authenticate with key vault. Read-only."""
- user_assigned_identity: Optional[str] = rest_field(
- name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"]
- )
- """The ARM resource identifier of the user assigned identity used to authenticate with key vault.
- Applicable if identity.type has 'UserAssigned'. It should match key of
- identity.userAssignedIdentities."""
-
- @overload
- def __init__(
- self,
- *,
- user_assigned_identity: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticExportPolicy(_Model):
- """Set of export policy rules.
-
- :ivar rules: Export policy rule.
- :vartype rules: list[~azure.mgmt.netapp.models.ElasticExportPolicyRule]
- """
-
- rules: Optional[list["_models.ElasticExportPolicyRule"]] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Export policy rule."""
-
- @overload
- def __init__(
- self,
- *,
- rules: Optional[list["_models.ElasticExportPolicyRule"]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticExportPolicyRule(_Model):
- """Elastic Volume Export Policy Rule.
-
- :ivar rule_index: Controls the priority of the export policy rule. When connecting to the
- volume the rule with the lowest index that applies to the connecting client is used.
- :vartype rule_index: int
- :ivar unix_access_rule: Specifies the Unix file access level for the volume. It encompasses
- both read-only and read-write permissions. Additionally, NoAccess can be set to block all
- access to the volume. Known values are: "ReadOnly", "ReadWrite", and "NoAccess".
- :vartype unix_access_rule: str or ~azure.mgmt.netapp.models.ElasticUnixAccessRule
- :ivar nfsv3: Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3
- type volumes. Known values are: "Enabled" and "Disabled".
- :vartype nfsv3: str or ~azure.mgmt.netapp.models.ElasticNfsv3Access
- :ivar nfsv4: Allows clients to access the volume with at least NFSv4.1 protocol. Known values
- are: "Enabled" and "Disabled".
- :vartype nfsv4: str or ~azure.mgmt.netapp.models.ElasticNfsv4Access
- :ivar allowed_clients: Client ingress specification for the export policy as list of IPv4
- CIDRs, IPv4 host addresses and host names.
- :vartype allowed_clients: list[str]
- :ivar root_access: Indicates whether root access to the volume is granted to clients affected
- by this rule. Known values are: "Enabled" and "Disabled".
- :vartype root_access: str or ~azure.mgmt.netapp.models.ElasticRootAccess
- """
-
- rule_index: Optional[int] = rest_field(name="ruleIndex", visibility=["read", "create", "update", "delete", "query"])
- """Controls the priority of the export policy rule. When connecting to the volume the rule with
- the lowest index that applies to the connecting client is used."""
- unix_access_rule: Optional[Union[str, "_models.ElasticUnixAccessRule"]] = rest_field(
- name="unixAccessRule", visibility=["read", "create", "update", "delete", "query"]
- )
- """Specifies the Unix file access level for the volume. It encompasses both read-only and
- read-write permissions. Additionally, NoAccess can be set to block all access to the volume.
- Known values are: \"ReadOnly\", \"ReadWrite\", and \"NoAccess\"."""
- nfsv3: Optional[Union[str, "_models.ElasticNfsv3Access"]] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type
- volumes. Known values are: \"Enabled\" and \"Disabled\"."""
- nfsv4: Optional[Union[str, "_models.ElasticNfsv4Access"]] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Allows clients to access the volume with at least NFSv4.1 protocol. Known values are:
- \"Enabled\" and \"Disabled\"."""
- allowed_clients: Optional[list[str]] = rest_field(
- name="allowedClients", visibility=["read", "create", "update", "delete", "query"]
- )
- """Client ingress specification for the export policy as list of IPv4 CIDRs, IPv4 host addresses
- and host names."""
- root_access: Optional[Union[str, "_models.ElasticRootAccess"]] = rest_field(
- name="rootAccess", visibility=["read", "create", "update", "delete", "query"]
- )
- """Indicates whether root access to the volume is granted to clients affected by this rule. Known
- values are: \"Enabled\" and \"Disabled\"."""
-
- @overload
- def __init__(
- self,
- *,
- rule_index: Optional[int] = None,
- unix_access_rule: Optional[Union[str, "_models.ElasticUnixAccessRule"]] = None,
- nfsv3: Optional[Union[str, "_models.ElasticNfsv3Access"]] = None,
- nfsv4: Optional[Union[str, "_models.ElasticNfsv4Access"]] = None,
- allowed_clients: Optional[list[str]] = None,
- root_access: Optional[Union[str, "_models.ElasticRootAccess"]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticKeyVaultProperties(_Model):
- """Properties of key vault.
-
- :ivar key_vault_uri: The Uri of KeyVault.
- :vartype key_vault_uri: str
- :ivar key_name: The name of KeyVault key.
- :vartype key_name: str
- :ivar key_vault_resource_id: The resource ID of KeyVault.
- :vartype key_vault_resource_id: str
- :ivar status: Status of the KeyVault connection. Known values are: "Created", "InUse",
- "Deleted", "Error", and "Updating".
- :vartype status: str or ~azure.mgmt.netapp.models.ElasticKeyVaultStatus
- """
-
- key_vault_uri: Optional[str] = rest_field(
- name="keyVaultUri", visibility=["read", "create", "update", "delete", "query"]
- )
- """The Uri of KeyVault."""
- key_name: Optional[str] = rest_field(name="keyName", visibility=["read", "create", "update", "delete", "query"])
- """The name of KeyVault key."""
- key_vault_resource_id: Optional[str] = rest_field(
- name="keyVaultResourceId", visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource ID of KeyVault."""
- status: Optional[Union[str, "_models.ElasticKeyVaultStatus"]] = rest_field(visibility=["read"])
- """Status of the KeyVault connection. Known values are: \"Created\", \"InUse\", \"Deleted\",
- \"Error\", and \"Updating\"."""
-
- @overload
- def __init__(
- self,
- *,
- key_vault_uri: Optional[str] = None,
- key_name: Optional[str] = None,
- key_vault_resource_id: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticMountTargetProperties(_Model):
- """Contains all the information needed to mount an elastic volume.
-
- :ivar ip_address: The mount target's IPv4 address, used to mount the volume.
- :vartype ip_address: str
- :ivar smb_server_fqdn: The SMB server's Fully Qualified Domain Name, FQDN.
- :vartype smb_server_fqdn: str
- """
-
- ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read"])
- """The mount target's IPv4 address, used to mount the volume."""
- smb_server_fqdn: Optional[str] = rest_field(name="smbServerFqdn", visibility=["read"])
- """The SMB server's Fully Qualified Domain Name, FQDN."""
-
-
-class ElasticSmbPatchProperties(_Model):
- """SMB Patch Properties.
-
- :ivar smb_encryption: Used to enable or disable encryption for in-flight SMB data volume. This
- flag can be modified during Elastic volume update operation as well. Only applicable for SMB
- protocol Elastic volumes. Known values are: "Enabled" and "Disabled".
- :vartype smb_encryption: str or ~azure.mgmt.netapp.models.ElasticSmbEncryption
- """
-
- smb_encryption: Optional[Union[str, "_models.ElasticSmbEncryption"]] = rest_field(
- name="smbEncryption", visibility=["read", "create", "update", "delete", "query"]
- )
- """Used to enable or disable encryption for in-flight SMB data volume. This flag can be modified
- during Elastic volume update operation as well. Only applicable for SMB protocol Elastic
- volumes. Known values are: \"Enabled\" and \"Disabled\"."""
-
- @overload
- def __init__(
- self,
- *,
- smb_encryption: Optional[Union[str, "_models.ElasticSmbEncryption"]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticSmbProperties(_Model):
- """SMB Properties.
-
- :ivar smb_encryption: Used to enable or disable encryption for in-flight SMB data volume. This
- flag can be modified during Elastic volume update operation as well. Only applicable for SMB
- protocol Elastic volumes. Known values are: "Enabled" and "Disabled".
- :vartype smb_encryption: str or ~azure.mgmt.netapp.models.ElasticSmbEncryption
- """
-
- smb_encryption: Optional[Union[str, "_models.ElasticSmbEncryption"]] = rest_field(
- name="smbEncryption", visibility=["read", "create", "update", "delete", "query"]
- )
- """Used to enable or disable encryption for in-flight SMB data volume. This flag can be modified
- during Elastic volume update operation as well. Only applicable for SMB protocol Elastic
- volumes. Known values are: \"Enabled\" and \"Disabled\"."""
-
- @overload
- def __init__(
- self,
- *,
- smb_encryption: Optional[Union[str, "_models.ElasticSmbEncryption"]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticSnapshot(ProxyResource):
- """NetApp Elastic Snapshot under an Elastic Volume.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ElasticSnapshotProperties
- """
-
- properties: Optional["_models.ElasticSnapshotProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
-
- @overload
- def __init__(
- self,
- *,
- properties: Optional["_models.ElasticSnapshotProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticSnapshotPolicy(TrackedResource):
- """NetApp Elastic Snapshot Policy under an Elastic Account.
-
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar location: The geo-location where the resource lives. Required.
- :vartype location: str
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyProperties
- :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per
- the normal etag convention. Entity tags are used for comparing two or more entities from the
- same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match
- (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
- :vartype e_tag: str
- """
-
- properties: Optional["_models.ElasticSnapshotPolicyProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
- e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"])
- """If eTag is provided in the response body, it may also be provided as a header per the normal
- etag convention. Entity tags are used for comparing two or more entities from the same
- requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section
- 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."""
-
- @overload
- def __init__(
- self,
- *,
- location: str,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.ElasticSnapshotPolicyProperties"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticSnapshotPolicyDailySchedule(_Model):
- """Daily Schedule properties used to create NetApp snapshot policy.
-
- :ivar snapshots_to_keep: Daily snapshot count to keep.
- :vartype snapshots_to_keep: int
- :ivar hour: Indicates which hour in UTC timezone a snapshot should be taken.
- :vartype hour: int
- :ivar minute: Indicates which minute snapshot should be taken.
- :vartype minute: int
- """
-
- snapshots_to_keep: Optional[int] = rest_field(
- name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"]
- )
- """Daily snapshot count to keep."""
- hour: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Indicates which hour in UTC timezone a snapshot should be taken."""
- minute: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Indicates which minute snapshot should be taken."""
-
- @overload
- def __init__(
- self,
- *,
- snapshots_to_keep: Optional[int] = None,
- hour: Optional[int] = None,
- minute: Optional[int] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticSnapshotPolicyHourlySchedule(_Model):
- """Hourly Schedule properties used to create NetApp snapshot policy.
-
- :ivar snapshots_to_keep: Hourly snapshot count to keep.
- :vartype snapshots_to_keep: int
- :ivar minute: Indicates which minute snapshot should be taken.
- :vartype minute: int
- """
-
- snapshots_to_keep: Optional[int] = rest_field(
- name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"]
- )
- """Hourly snapshot count to keep."""
- minute: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Indicates which minute snapshot should be taken."""
-
- @overload
- def __init__(
- self,
- *,
- snapshots_to_keep: Optional[int] = None,
- minute: Optional[int] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class ElasticSnapshotPolicyMonthlySchedule(_Model):
- """Monthly Schedule properties used to create NetApp snapshot policy.
-
- :ivar snapshots_to_keep: Monthly snapshot count to keep.
- :vartype snapshots_to_keep: int
- :ivar days_of_month: Indicates which days of the month snapshot (1-31) should be taken, accepts
- a list of integers.
- :vartype days_of_month: list[int]
- :ivar hour: Indicates which hour in UTC timezone a snapshot should be taken.
- :vartype hour: int
- :ivar minute: Indicates which minute snapshot should be taken.
- :vartype minute: int
- """
-
- snapshots_to_keep: Optional[int] = rest_field(
- name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"]
- )
- """Monthly snapshot count to keep."""
- days_of_month: Optional[list[int]] = rest_field(
- name="daysOfMonth", visibility=["read", "create", "update", "delete", "query"]
- )
- """Indicates which days of the month snapshot (1-31) should be taken, accepts a list of integers."""
- hour: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Indicates which hour in UTC timezone a snapshot should be taken."""
- minute: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Indicates which minute snapshot should be taken."""
-
- @overload
- def __init__(
- self,
- *,
- snapshots_to_keep: Optional[int] = None,
- days_of_month: Optional[list[int]] = None,
- hour: Optional[int] = None,
- minute: Optional[int] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
+ """Displays the total bytes transferred."""
+ transfer_progress_bytes: Optional[int] = rest_field(name="transferProgressBytes", visibility=["read"])
+ """Displays the total number of bytes transferred for the ongoing operation."""
-class ElasticSnapshotPolicyProperties(_Model):
- """Elastic Snapshot policy properties.
+class BackupVault(TrackedResource):
+ """Backup Vault information.
- :ivar hourly_schedule: Schedule for hourly snapshots.
- :vartype hourly_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyHourlySchedule
- :ivar daily_schedule: Schedule for daily snapshots.
- :vartype daily_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyDailySchedule
- :ivar weekly_schedule: Schedule for weekly snapshots.
- :vartype weekly_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyWeeklySchedule
- :ivar monthly_schedule: Schedule for monthly snapshots.
- :vartype monthly_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyMonthlySchedule
- :ivar policy_status: Configures if the snapshot policy is enabled on the volumes connected to
- the policy. Known values are: "Enabled" and "Disabled".
- :vartype policy_status: str or ~azure.mgmt.netapp.models.PolicyStatus
- :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating",
- "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded".
- :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.netapp.models.SystemData
+ :ivar tags: Resource tags.
+ :vartype tags: dict[str, str]
+ :ivar location: The geo-location where the resource lives. Required.
+ :vartype location: str
+ :ivar properties: Backup Vault Properties.
+ :vartype properties: ~azure.mgmt.netapp.models.BackupVaultProperties
"""
- hourly_schedule: Optional["_models.ElasticSnapshotPolicyHourlySchedule"] = rest_field(
- name="hourlySchedule", visibility=["read", "create", "update", "delete", "query"]
- )
- """Schedule for hourly snapshots."""
- daily_schedule: Optional["_models.ElasticSnapshotPolicyDailySchedule"] = rest_field(
- name="dailySchedule", visibility=["read", "create", "update", "delete", "query"]
- )
- """Schedule for daily snapshots."""
- weekly_schedule: Optional["_models.ElasticSnapshotPolicyWeeklySchedule"] = rest_field(
- name="weeklySchedule", visibility=["read", "create", "update", "delete", "query"]
- )
- """Schedule for weekly snapshots."""
- monthly_schedule: Optional["_models.ElasticSnapshotPolicyMonthlySchedule"] = rest_field(
- name="monthlySchedule", visibility=["read", "create", "update", "delete", "query"]
- )
- """Schedule for monthly snapshots."""
- policy_status: Optional[Union[str, "_models.PolicyStatus"]] = rest_field(
- name="policyStatus", visibility=["read", "create", "update", "delete", "query"]
- )
- """Configures if the snapshot policy is enabled on the volumes connected to the policy. Known
- values are: \"Enabled\" and \"Disabled\"."""
- provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field(
- name="provisioningState", visibility=["read"]
+ properties: Optional["_models.BackupVaultProperties"] = rest_field(
+ visibility=["read", "create", "update", "delete", "query"]
)
- """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\",
- \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\"."""
+ """Backup Vault Properties."""
+
+ __flattened_items = ["provisioning_state"]
@overload
def __init__(
self,
*,
- hourly_schedule: Optional["_models.ElasticSnapshotPolicyHourlySchedule"] = None,
- daily_schedule: Optional["_models.ElasticSnapshotPolicyDailySchedule"] = None,
- weekly_schedule: Optional["_models.ElasticSnapshotPolicyWeeklySchedule"] = None,
- monthly_schedule: Optional["_models.ElasticSnapshotPolicyMonthlySchedule"] = None,
- policy_status: Optional[Union[str, "_models.PolicyStatus"]] = None,
+ location: str,
+ tags: Optional[dict[str, str]] = None,
+ properties: Optional["_models.BackupVaultProperties"] = None,
) -> None: ...
@overload
@@ -4467,31 +1079,42 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
+ _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
super().__init__(*args, **kwargs)
+ for k, v in _flattened_input.items():
+ setattr(self, k, v)
+
+ def __getattr__(self, name: str) -> Any:
+ if name in self.__flattened_items:
+ if self.properties is None:
+ return None
+ return getattr(self.properties, name)
+ raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
+
+ def __setattr__(self, key: str, value: Any) -> None:
+ if key in self.__flattened_items:
+ if self.properties is None:
+ self.properties = self._attr_to_rest_field["properties"]._class_type()
+ setattr(self.properties, key, value)
+ else:
+ super().__setattr__(key, value)
-class ElasticSnapshotPolicyUpdate(_Model):
- """The type used for update operations of the ElasticSnapshotPolicy.
+class BackupVaultPatch(_Model):
+ """Backup Vault information.
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdateProperties
"""
tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Resource tags."""
- properties: Optional["_models.ElasticSnapshotPolicyUpdateProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
@overload
def __init__(
self,
*,
tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.ElasticSnapshotPolicyUpdateProperties"] = None,
) -> None: ...
@overload
@@ -4505,53 +1128,41 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class ElasticSnapshotPolicyUpdateProperties(_Model):
- """The updatable properties of the ElasticSnapshotPolicy.
+class BackupVaultProperties(_Model):
+ """Backup Vault properties.
- :ivar hourly_schedule: Schedule for hourly snapshots.
- :vartype hourly_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyHourlySchedule
- :ivar daily_schedule: Schedule for daily snapshots.
- :vartype daily_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyDailySchedule
- :ivar weekly_schedule: Schedule for weekly snapshots.
- :vartype weekly_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyWeeklySchedule
- :ivar monthly_schedule: Schedule for monthly snapshots.
- :vartype monthly_schedule: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyMonthlySchedule
- :ivar policy_status: Configures if the snapshot policy is enabled on the volumes connected to
- the policy. Known values are: "Enabled" and "Disabled".
- :vartype policy_status: str or ~azure.mgmt.netapp.models.PolicyStatus
+ :ivar provisioning_state: Azure lifecycle management.
+ :vartype provisioning_state: str
"""
- hourly_schedule: Optional["_models.ElasticSnapshotPolicyHourlySchedule"] = rest_field(
- name="hourlySchedule", visibility=["read", "create", "update", "delete", "query"]
- )
- """Schedule for hourly snapshots."""
- daily_schedule: Optional["_models.ElasticSnapshotPolicyDailySchedule"] = rest_field(
- name="dailySchedule", visibility=["read", "create", "update", "delete", "query"]
- )
- """Schedule for daily snapshots."""
- weekly_schedule: Optional["_models.ElasticSnapshotPolicyWeeklySchedule"] = rest_field(
- name="weeklySchedule", visibility=["read", "create", "update", "delete", "query"]
- )
- """Schedule for weekly snapshots."""
- monthly_schedule: Optional["_models.ElasticSnapshotPolicyMonthlySchedule"] = rest_field(
- name="monthlySchedule", visibility=["read", "create", "update", "delete", "query"]
- )
- """Schedule for monthly snapshots."""
- policy_status: Optional[Union[str, "_models.PolicyStatus"]] = rest_field(
- name="policyStatus", visibility=["read", "create", "update", "delete", "query"]
+ provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
+ """Azure lifecycle management."""
+
+
+class BreakFileLocksRequest(_Model):
+ """Break file locks request.
+
+ :ivar client_ip: To clear file locks on a volume for a particular client.
+ :vartype client_ip: str
+ :ivar confirm_running_disruptive_operation: Break File locks could be a disruptive operation
+ for application as locks on the volume will be broken, if want to process, set to true.
+ :vartype confirm_running_disruptive_operation: bool
+ """
+
+ client_ip: Optional[str] = rest_field(name="clientIp", visibility=["read", "create", "update", "delete", "query"])
+ """To clear file locks on a volume for a particular client."""
+ confirm_running_disruptive_operation: Optional[bool] = rest_field(
+ name="confirmRunningDisruptiveOperation", visibility=["read", "create", "update", "delete", "query"]
)
- """Configures if the snapshot policy is enabled on the volumes connected to the policy. Known
- values are: \"Enabled\" and \"Disabled\"."""
+ """Break File locks could be a disruptive operation for application as locks on the volume will be
+ broken, if want to process, set to true."""
@overload
def __init__(
self,
*,
- hourly_schedule: Optional["_models.ElasticSnapshotPolicyHourlySchedule"] = None,
- daily_schedule: Optional["_models.ElasticSnapshotPolicyDailySchedule"] = None,
- weekly_schedule: Optional["_models.ElasticSnapshotPolicyWeeklySchedule"] = None,
- monthly_schedule: Optional["_models.ElasticSnapshotPolicyMonthlySchedule"] = None,
- policy_status: Optional[Union[str, "_models.PolicyStatus"]] = None,
+ client_ip: Optional[str] = None,
+ confirm_running_disruptive_operation: Optional[bool] = None,
) -> None: ...
@overload
@@ -4565,42 +1176,25 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class ElasticSnapshotPolicyWeeklySchedule(_Model):
- """Weekly Schedule properties used to create NetApp snapshot policy.
+class BreakReplicationRequest(_Model):
+ """Break replication request.
- :ivar snapshots_to_keep: Weekly snapshot count to keep.
- :vartype snapshots_to_keep: int
- :ivar days: Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day
- names in english.
- :vartype days: list[str or ~azure.mgmt.netapp.models.DayOfWeek]
- :ivar hour: Indicates which hour in UTC timezone a snapshot should be taken.
- :vartype hour: int
- :ivar minute: Indicates which minute snapshot should be taken.
- :vartype minute: int
+ :ivar force_break_replication: If replication is in status transferring and you want to force
+ break the replication, set to true.
+ :vartype force_break_replication: bool
"""
- snapshots_to_keep: Optional[int] = rest_field(
- name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"]
- )
- """Weekly snapshot count to keep."""
- days: Optional[list[Union[str, "_models.DayOfWeek"]]] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
+ force_break_replication: Optional[bool] = rest_field(
+ name="forceBreakReplication", visibility=["read", "create", "update", "delete", "query"]
)
- """Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day names in
- english."""
- hour: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Indicates which hour in UTC timezone a snapshot should be taken."""
- minute: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Indicates which minute snapshot should be taken."""
+ """If replication is in status transferring and you want to force break the replication, set to
+ true."""
@overload
def __init__(
self,
*,
- snapshots_to_keep: Optional[int] = None,
- days: Optional[list[Union[str, "_models.DayOfWeek"]]] = None,
- hour: Optional[int] = None,
- minute: Optional[int] = None,
+ force_break_replication: Optional[bool] = None,
) -> None: ...
@overload
@@ -4614,23 +1208,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class ElasticSnapshotProperties(_Model):
- """Elastic Snapshot properties.
-
- :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating",
- "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded".
- :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState
- """
-
- provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field(
- name="provisioningState", visibility=["read"]
- )
- """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\",
- \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\"."""
-
-
-class ElasticVolume(TrackedResource):
- """NetApp Elastic Volume resource.
+class CapacityPool(TrackedResource):
+ """Capacity pool resource.
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
@@ -4647,37 +1226,43 @@ class ElasticVolume(TrackedResource):
:vartype tags: dict[str, str]
:ivar location: The geo-location where the resource lives. Required.
:vartype location: str
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ElasticVolumeProperties
- :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per
+ :ivar properties: Capacity pool properties. Required.
+ :vartype properties: ~azure.mgmt.netapp.models.PoolProperties
+ :ivar etag: "If etag is provided in the response body, it may also be provided as a header per
the normal etag convention. Entity tags are used for comparing two or more entities from the
same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match
- (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
- :vartype e_tag: str
- :ivar zones: The availability zones.
- :vartype zones: list[str]
+ (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.").
+ :vartype etag: str
"""
- properties: Optional["_models.ElasticVolumeProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource-specific properties for this resource."""
- e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"])
- """If eTag is provided in the response body, it may also be provided as a header per the normal
+ properties: "_models.PoolProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """Capacity pool properties. Required."""
+ etag: Optional[str] = rest_field(visibility=["read"])
+ """\"If etag is provided in the response body, it may also be provided as a header per the normal
etag convention. Entity tags are used for comparing two or more entities from the same
requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section
- 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."""
- zones: Optional[list[str]] = rest_field(visibility=["read", "create"])
- """The availability zones."""
+ 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\")."""
+
+ __flattened_items = [
+ "pool_id",
+ "size",
+ "service_level",
+ "provisioning_state",
+ "total_throughput_mibps",
+ "utilized_throughput_mibps",
+ "custom_throughput_mibps",
+ "qos_type",
+ "cool_access",
+ "encryption_type",
+ ]
@overload
def __init__(
self,
*,
location: str,
+ properties: "_models.PoolProperties",
tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.ElasticVolumeProperties"] = None,
- zones: Optional[list[str]] = None,
) -> None: ...
@overload
@@ -4688,80 +1273,68 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
+ _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
super().__init__(*args, **kwargs)
+ for k, v in _flattened_input.items():
+ setattr(self, k, v)
+ def __getattr__(self, name: str) -> Any:
+ if name in self.__flattened_items:
+ if self.properties is None:
+ return None
+ return getattr(self.properties, name)
+ raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
-class ElasticVolumeBackupProperties(_Model):
- """Elastic Volume Backup Properties.
-
- :ivar elastic_backup_policy_resource_id: ResourceId used to identify Elastic Backup Policy.
- :vartype elastic_backup_policy_resource_id: str
- :ivar policy_enforcement: The property to decide policy is enforced or not on the volume. Known
- values are: "Enforced" and "NotEnforced".
- :vartype policy_enforcement: str or ~azure.mgmt.netapp.models.ElasticVolumePolicyEnforcement
- :ivar elastic_backup_vault_resource_id: ResourceId used to identify Elastic Backup Vault.
- :vartype elastic_backup_vault_resource_id: str
- """
-
- elastic_backup_policy_resource_id: Optional[str] = rest_field(
- name="elasticBackupPolicyResourceId", visibility=["read", "create", "update", "delete", "query"]
- )
- """ResourceId used to identify Elastic Backup Policy."""
- policy_enforcement: Optional[Union[str, "_models.ElasticVolumePolicyEnforcement"]] = rest_field(
- name="policyEnforcement", visibility=["read", "create", "update", "delete", "query"]
- )
- """The property to decide policy is enforced or not on the volume. Known values are: \"Enforced\"
- and \"NotEnforced\"."""
- elastic_backup_vault_resource_id: Optional[str] = rest_field(
- name="elasticBackupVaultResourceId", visibility=["read", "create", "update", "delete", "query"]
- )
- """ResourceId used to identify Elastic Backup Vault."""
-
- @overload
- def __init__(
- self,
- *,
- elastic_backup_policy_resource_id: Optional[str] = None,
- policy_enforcement: Optional[Union[str, "_models.ElasticVolumePolicyEnforcement"]] = None,
- elastic_backup_vault_resource_id: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
+ def __setattr__(self, key: str, value: Any) -> None:
+ if key in self.__flattened_items:
+ if self.properties is None:
+ self.properties = self._attr_to_rest_field["properties"]._class_type()
+ setattr(self.properties, key, value)
+ else:
+ super().__setattr__(key, value)
-class ElasticVolumeDataProtectionPatchProperties(_Model): # pylint: disable=name-too-long
- """Data protection configuration option for updating the volume, including snapshot policies and
- backup.
+class CapacityPoolPatch(_Model):
+ """Capacity pool patch resource.
- :ivar snapshot: Used to apply a snapshot policy to a volume.
- :vartype snapshot: ~azure.mgmt.netapp.models.ElasticVolumeSnapshotProperties
- :ivar backup: Used to configure backups on an elastic volume.
- :vartype backup: ~azure.mgmt.netapp.models.ElasticVolumeBackupProperties
+ :ivar location: Resource location.
+ :vartype location: str
+ :ivar id: Resource Id.
+ :vartype id: str
+ :ivar name: Resource name.
+ :vartype name: str
+ :ivar type: Resource type.
+ :vartype type: str
+ :ivar tags: Resource tags.
+ :vartype tags: dict[str, str]
+ :ivar properties: Capacity pool properties.
+ :vartype properties: ~azure.mgmt.netapp.models.PoolPatchProperties
"""
- snapshot: Optional["_models.ElasticVolumeSnapshotProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Used to apply a snapshot policy to a volume."""
- backup: Optional["_models.ElasticVolumeBackupProperties"] = rest_field(
+ location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """Resource location."""
+ id: Optional[str] = rest_field(visibility=["read"])
+ """Resource Id."""
+ name: Optional[str] = rest_field(visibility=["read"])
+ """Resource name."""
+ type: Optional[str] = rest_field(visibility=["read"])
+ """Resource type."""
+ tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """Resource tags."""
+ properties: Optional["_models.PoolPatchProperties"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
- """Used to configure backups on an elastic volume."""
+ """Capacity pool properties."""
+
+ __flattened_items = ["size", "qos_type", "cool_access", "custom_throughput_mibps"]
@overload
def __init__(
self,
*,
- snapshot: Optional["_models.ElasticVolumeSnapshotProperties"] = None,
- backup: Optional["_models.ElasticVolumeBackupProperties"] = None,
+ location: Optional[str] = None,
+ tags: Optional[dict[str, str]] = None,
+ properties: Optional["_models.PoolPatchProperties"] = None,
) -> None: ...
@overload
@@ -4772,33 +1345,66 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
+ _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items}
super().__init__(*args, **kwargs)
+ for k, v in _flattened_input.items():
+ setattr(self, k, v)
+
+ def __getattr__(self, name: str) -> Any:
+ if name in self.__flattened_items:
+ if self.properties is None:
+ return None
+ return getattr(self.properties, name)
+ raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
+
+ def __setattr__(self, key: str, value: Any) -> None:
+ if key in self.__flattened_items:
+ if self.properties is None:
+ self.properties = self._attr_to_rest_field["properties"]._class_type()
+ setattr(self.properties, key, value)
+ else:
+ super().__setattr__(key, value)
-class ElasticVolumeDataProtectionProperties(_Model):
- """Data protection configuration option for the volume, including snapshot policies and backup.
+class ChangeKeyVault(_Model):
+ """Change key vault request.
- :ivar snapshot: Used to apply a snapshot policy to a volume.
- :vartype snapshot: ~azure.mgmt.netapp.models.ElasticVolumeSnapshotProperties
- :ivar backup: Used to configure backups on an elastic volume.
- :vartype backup: ~azure.mgmt.netapp.models.ElasticVolumeBackupProperties
+ :ivar key_vault_uri: The URI of the key vault/managed HSM that should be used for encryption.
+ Required.
+ :vartype key_vault_uri: str
+ :ivar key_name: The name of the key that should be used for encryption. Required.
+ :vartype key_name: str
+ :ivar key_vault_resource_id: Azure resource ID of the key vault/managed HSM that should be used
+ for encryption.
+ :vartype key_vault_resource_id: str
+ :ivar key_vault_private_endpoints: Pairs of virtual network ID and private endpoint ID. Every
+ virtual network that has volumes encrypted with customer-managed keys needs its own key vault
+ private endpoint. Required.
+ :vartype key_vault_private_endpoints: list[~azure.mgmt.netapp.models.KeyVaultPrivateEndpoint]
"""
- snapshot: Optional["_models.ElasticVolumeSnapshotProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
+ key_vault_uri: str = rest_field(name="keyVaultUri", visibility=["read", "create", "update", "delete", "query"])
+ """The URI of the key vault/managed HSM that should be used for encryption. Required."""
+ key_name: str = rest_field(name="keyName", visibility=["read", "create", "update", "delete", "query"])
+ """The name of the key that should be used for encryption. Required."""
+ key_vault_resource_id: Optional[str] = rest_field(
+ name="keyVaultResourceId", visibility=["read", "create", "update", "delete", "query"]
)
- """Used to apply a snapshot policy to a volume."""
- backup: Optional["_models.ElasticVolumeBackupProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
+ """Azure resource ID of the key vault/managed HSM that should be used for encryption."""
+ key_vault_private_endpoints: list["_models.KeyVaultPrivateEndpoint"] = rest_field(
+ name="keyVaultPrivateEndpoints", visibility=["read", "create", "update", "delete", "query"]
)
- """Used to configure backups on an elastic volume."""
+ """Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes
+ encrypted with customer-managed keys needs its own key vault private endpoint. Required."""
@overload
def __init__(
self,
*,
- snapshot: Optional["_models.ElasticVolumeSnapshotProperties"] = None,
- backup: Optional["_models.ElasticVolumeBackupProperties"] = None,
+ key_vault_uri: str,
+ key_name: str,
+ key_vault_private_endpoints: list["_models.KeyVaultPrivateEndpoint"],
+ key_vault_resource_id: Optional[str] = None,
) -> None: ...
@overload
@@ -4812,110 +1418,47 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class ElasticVolumeProperties(_Model):
- """Elastic Volume properties.
+class CheckAvailabilityResponse(_Model):
+ """Information regarding availability of a resource.
- :ivar file_path: A unique file path for the volume. Used when creating mount targets. This
- needs to be unique within the elastic capacity pool. Required.
- :vartype file_path: str
- :ivar size: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to
- 16TiB. Values expressed in bytes as multiples of 1 GiB. Required.
- :vartype size: int
- :ivar export_policy: Set of export policy rules.
- :vartype export_policy: ~azure.mgmt.netapp.models.ElasticExportPolicy
- :ivar protocol_types: Set of support protocol types for the elastic volume. Required.
- :vartype protocol_types: list[str or ~azure.mgmt.netapp.models.ElasticProtocolType]
- :ivar provisioning_state: Azure lifecycle management. Known values are: "Accepted", "Creating",
- "Patching", "Updating", "Deleting", "Moving", "Failed", and "Succeeded".
- :vartype provisioning_state: str or ~azure.mgmt.netapp.models.NetAppProvisioningState
- :ivar availability_status: Current availability status of the resource. Known values are:
- "Online" and "Offline".
- :vartype availability_status: str or
- ~azure.mgmt.netapp.models.ElasticResourceAvailabilityStatus
- :ivar snapshot_resource_id: Resource identifier used to identify the Elastic Snapshot.
- :vartype snapshot_resource_id: str
- :ivar mount_targets: List of mount targets that can be used to mount this volume.
- :vartype mount_targets: list[~azure.mgmt.netapp.models.ElasticMountTargetProperties]
- :ivar data_protection: Data protection configuration option for the volume, including snapshot
- policies and backup.
- :vartype data_protection: ~azure.mgmt.netapp.models.ElasticVolumeDataProtectionProperties
- :ivar snapshot_directory_visibility: Controls the visibility of the volume's read-only snapshot
- directory, which provides access to each of the volume's snapshots. Known values are: "Hidden"
- and "Visible".
- :vartype snapshot_directory_visibility: str or
- ~azure.mgmt.netapp.models.SnapshotDirectoryVisibility
- :ivar smb_properties: SMB Properties.
- :vartype smb_properties: ~azure.mgmt.netapp.models.ElasticSmbProperties
- :ivar backup_resource_id: Resource identifier used to identify the Elastic Backup.
- :vartype backup_resource_id: str
- :ivar restoration_state: The current state of the restoration process. Known values are:
- "Restoring", "Restored", and "Failed".
- :vartype restoration_state: str or ~azure.mgmt.netapp.models.ElasticVolumeRestorationState
- """
-
- file_path: str = rest_field(name="filePath", visibility=["read", "create"])
- """A unique file path for the volume. Used when creating mount targets. This needs to be unique
- within the elastic capacity pool. Required."""
- size: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. Values
- expressed in bytes as multiples of 1 GiB. Required."""
- export_policy: Optional["_models.ElasticExportPolicy"] = rest_field(
- name="exportPolicy", visibility=["read", "create", "update", "delete", "query"]
- )
- """Set of export policy rules."""
- protocol_types: list[Union[str, "_models.ElasticProtocolType"]] = rest_field(
- name="protocolTypes", visibility=["read", "create", "update", "delete", "query"]
- )
- """Set of support protocol types for the elastic volume. Required."""
- provisioning_state: Optional[Union[str, "_models.NetAppProvisioningState"]] = rest_field(
- name="provisioningState", visibility=["read"]
- )
- """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\",
- \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\"."""
- availability_status: Optional[Union[str, "_models.ElasticResourceAvailabilityStatus"]] = rest_field(
- name="availabilityStatus", visibility=["read"]
- )
- """Current availability status of the resource. Known values are: \"Online\" and \"Offline\"."""
- snapshot_resource_id: Optional[str] = rest_field(name="snapshotResourceId", visibility=["read", "create"])
- """Resource identifier used to identify the Elastic Snapshot."""
- mount_targets: Optional[list["_models.ElasticMountTargetProperties"]] = rest_field(
- name="mountTargets", visibility=["read"]
- )
- """List of mount targets that can be used to mount this volume."""
- data_protection: Optional["_models.ElasticVolumeDataProtectionProperties"] = rest_field(
- name="dataProtection", visibility=["read", "create", "update", "delete", "query"]
- )
- """Data protection configuration option for the volume, including snapshot policies and backup."""
- snapshot_directory_visibility: Optional[Union[str, "_models.SnapshotDirectoryVisibility"]] = rest_field(
- name="snapshotDirectoryVisibility", visibility=["read", "create", "update", "delete", "query"]
- )
- """Controls the visibility of the volume's read-only snapshot directory, which provides access to
- each of the volume's snapshots. Known values are: \"Hidden\" and \"Visible\"."""
- smb_properties: Optional["_models.ElasticSmbProperties"] = rest_field(
- name="smbProperties", visibility=["read", "create", "update", "delete", "query"]
+ :ivar is_available: true indicates name is valid and available. false
+ indicates the name is invalid, unavailable, or both.
+ :vartype is_available: bool
+ :ivar reason: Invalid indicates the name provided does not match Azure App Service
+ naming requirements. AlreadyExists indicates that the name is already in use and
+ is therefore unavailable. Known values are: "Invalid" and "AlreadyExists".
+ :vartype reason: str or ~azure.mgmt.netapp.models.InAvailabilityReasonType
+ :ivar message: If reason == invalid, provide the user with the reason why the given name is
+ invalid, and provide the resource naming requirements so that the user can select a valid name.
+ If reason == AlreadyExists, explain that resource name is already in use, and direct them to
+ select a different name.
+ :vartype message: str
+ """
+
+ is_available: Optional[bool] = rest_field(
+ name="isAvailable", visibility=["read", "create", "update", "delete", "query"]
)
- """SMB Properties."""
- backup_resource_id: Optional[str] = rest_field(name="backupResourceId", visibility=["read", "create"])
- """Resource identifier used to identify the Elastic Backup."""
- restoration_state: Optional[Union[str, "_models.ElasticVolumeRestorationState"]] = rest_field(
- name="restorationState", visibility=["read"]
+ """true indicates name is valid and available. false indicates the name
+ is invalid, unavailable, or both."""
+ reason: Optional[Union[str, "_models.InAvailabilityReasonType"]] = rest_field(
+ visibility=["read", "create", "update", "delete", "query"]
)
- """The current state of the restoration process. Known values are: \"Restoring\", \"Restored\",
- and \"Failed\"."""
+ """Invalid indicates the name provided does not match Azure App Service naming
+ requirements. AlreadyExists indicates that the name is already in use and is
+ therefore unavailable. Known values are: \"Invalid\" and \"AlreadyExists\"."""
+ message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """If reason == invalid, provide the user with the reason why the given name is invalid, and
+ provide the resource naming requirements so that the user can select a valid name. If reason ==
+ AlreadyExists, explain that resource name is already in use, and direct them to select a
+ different name."""
@overload
def __init__(
self,
*,
- file_path: str,
- size: int,
- protocol_types: list[Union[str, "_models.ElasticProtocolType"]],
- export_policy: Optional["_models.ElasticExportPolicy"] = None,
- snapshot_resource_id: Optional[str] = None,
- data_protection: Optional["_models.ElasticVolumeDataProtectionProperties"] = None,
- snapshot_directory_visibility: Optional[Union[str, "_models.SnapshotDirectoryVisibility"]] = None,
- smb_properties: Optional["_models.ElasticSmbProperties"] = None,
- backup_resource_id: Optional[str] = None,
+ is_available: Optional[bool] = None,
+ reason: Optional[Union[str, "_models.InAvailabilityReasonType"]] = None,
+ message: Optional[str] = None,
) -> None: ...
@overload
@@ -4929,21 +1472,26 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class ElasticVolumeRevert(_Model):
- """Reverts the elastic volume to the specified snapshot.
+class ClusterPeerCommandResponse(_Model):
+ """Information about cluster peering process.
- :ivar snapshot_resource_id: Resource identifier used to identify the Elastic Snapshot.
- :vartype snapshot_resource_id: str
+ :ivar peer_accept_command: A command that needs to be run on the external ONTAP to accept
+ cluster peering. Will only be present if clusterPeeringStatus is
+ pending.
+ :vartype peer_accept_command: str
"""
- snapshot_resource_id: Optional[str] = rest_field(name="snapshotResourceId", visibility=["read", "create"])
- """Resource identifier used to identify the Elastic Snapshot."""
+ peer_accept_command: Optional[str] = rest_field(
+ name="peerAcceptCommand", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """A command that needs to be run on the external ONTAP to accept cluster peering. Will only be
+ present if clusterPeeringStatus is pending."""
@overload
def __init__(
self,
*,
- snapshot_resource_id: Optional[str] = None,
+ peer_accept_command: Optional[str] = None,
) -> None: ...
@overload
@@ -4957,23 +1505,38 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class ElasticVolumeSnapshotProperties(_Model):
- """Elastic Volume Snapshot Properties.
+class DailySchedule(_Model):
+ """Daily Schedule properties.
- :ivar snapshot_policy_resource_id: Snapshot Policy ResourceId.
- :vartype snapshot_policy_resource_id: str
+ :ivar snapshots_to_keep: Daily snapshot count to keep.
+ :vartype snapshots_to_keep: int
+ :ivar hour: Indicates which hour in UTC timezone a snapshot should be taken.
+ :vartype hour: int
+ :ivar minute: Indicates which minute snapshot should be taken.
+ :vartype minute: int
+ :ivar used_bytes: Resource size in bytes, current storage usage for the volume in bytes.
+ :vartype used_bytes: int
"""
- snapshot_policy_resource_id: Optional[str] = rest_field(
- name="snapshotPolicyResourceId", visibility=["read", "create", "update", "delete", "query"]
+ snapshots_to_keep: Optional[int] = rest_field(
+ name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"]
)
- """Snapshot Policy ResourceId."""
+ """Daily snapshot count to keep."""
+ hour: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """Indicates which hour in UTC timezone a snapshot should be taken."""
+ minute: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """Indicates which minute snapshot should be taken."""
+ used_bytes: Optional[int] = rest_field(name="usedBytes", visibility=["read", "create", "update", "delete", "query"])
+ """Resource size in bytes, current storage usage for the volume in bytes."""
@overload
def __init__(
self,
*,
- snapshot_policy_resource_id: Optional[str] = None,
+ snapshots_to_keep: Optional[int] = None,
+ hour: Optional[int] = None,
+ minute: Optional[int] = None,
+ used_bytes: Optional[int] = None,
) -> None: ...
@overload
@@ -4987,28 +1550,42 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class ElasticVolumeUpdate(_Model):
- """The type used for update operations of the ElasticVolume.
+class DestinationReplication(_Model):
+ """Destination replication properties.
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
- :ivar properties: The resource-specific properties for this resource.
- :vartype properties: ~azure.mgmt.netapp.models.ElasticVolumeUpdateProperties
+ :ivar resource_id: The resource ID of the remote volume.
+ :vartype resource_id: str
+ :ivar replication_type: Indicates whether the replication is cross zone or cross region. Known
+ values are: "CrossRegionReplication" and "CrossZoneReplication".
+ :vartype replication_type: str or ~azure.mgmt.netapp.models.ReplicationType
+ :ivar region: The remote region for the destination volume.
+ :vartype region: str
+ :ivar zone: The remote zone for the destination volume.
+ :vartype zone: str
"""
- tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Resource tags."""
- properties: Optional["_models.ElasticVolumeUpdateProperties"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
+ resource_id: Optional[str] = rest_field(
+ name="resourceId", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """The resource ID of the remote volume."""
+ replication_type: Optional[Union[str, "_models.ReplicationType"]] = rest_field(
+ name="replicationType", visibility=["read", "create", "update", "delete", "query"]
)
- """The resource-specific properties for this resource."""
+ """Indicates whether the replication is cross zone or cross region. Known values are:
+ \"CrossRegionReplication\" and \"CrossZoneReplication\"."""
+ region: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """The remote region for the destination volume."""
+ zone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """The remote zone for the destination volume."""
@overload
def __init__(
self,
*,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.ElasticVolumeUpdateProperties"] = None,
+ resource_id: Optional[str] = None,
+ replication_type: Optional[Union[str, "_models.ReplicationType"]] = None,
+ region: Optional[str] = None,
+ zone: Optional[str] = None,
) -> None: ...
@overload
@@ -5022,56 +1599,28 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class ElasticVolumeUpdateProperties(_Model):
- """The updatable properties of the ElasticVolume.
+class Dimension(_Model):
+ """Dimension of blobs, possibly be blob type or access tier.
- :ivar size: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to
- 16TiB. Values expressed in bytes as multiples of 1 GiB.
- :vartype size: int
- :ivar export_policy: Set of export policy rules.
- :vartype export_policy: ~azure.mgmt.netapp.models.ElasticExportPolicy
- :ivar data_protection: Data protection configuration option for the volume, including snapshot
- policies and backup.
- :vartype data_protection: ~azure.mgmt.netapp.models.ElasticVolumeDataProtectionPatchProperties
- :ivar snapshot_directory_visibility: Controls the visibility of the volume's read-only snapshot
- directory, which provides access to each of the volume's snapshots. Known values are: "Hidden"
- and "Visible".
- :vartype snapshot_directory_visibility: str or
- ~azure.mgmt.netapp.models.SnapshotDirectoryVisibility
- :ivar smb_properties: SMB Properties.
- :vartype smb_properties: ~azure.mgmt.netapp.models.ElasticSmbPatchProperties
+ :ivar name: Display name of dimension.
+ :vartype name: str
+ :ivar display_name: Display name of dimension.
+ :vartype display_name: str
"""
- size: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. Values
- expressed in bytes as multiples of 1 GiB."""
- export_policy: Optional["_models.ElasticExportPolicy"] = rest_field(
- name="exportPolicy", visibility=["read", "create", "update", "delete", "query"]
- )
- """Set of export policy rules."""
- data_protection: Optional["_models.ElasticVolumeDataProtectionPatchProperties"] = rest_field(
- name="dataProtection", visibility=["read", "create", "update", "delete", "query"]
- )
- """Data protection configuration option for the volume, including snapshot policies and backup."""
- snapshot_directory_visibility: Optional[Union[str, "_models.SnapshotDirectoryVisibility"]] = rest_field(
- name="snapshotDirectoryVisibility", visibility=["read", "create", "update", "delete", "query"]
- )
- """Controls the visibility of the volume's read-only snapshot directory, which provides access to
- each of the volume's snapshots. Known values are: \"Hidden\" and \"Visible\"."""
- smb_properties: Optional["_models.ElasticSmbPatchProperties"] = rest_field(
- name="smbProperties", visibility=["read", "create", "update", "delete", "query"]
+ name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """Display name of dimension."""
+ display_name: Optional[str] = rest_field(
+ name="displayName", visibility=["read", "create", "update", "delete", "query"]
)
- """SMB Properties."""
+ """Display name of dimension."""
@overload
def __init__(
self,
*,
- size: Optional[int] = None,
- export_policy: Optional["_models.ElasticExportPolicy"] = None,
- data_protection: Optional["_models.ElasticVolumeDataProtectionPatchProperties"] = None,
- snapshot_directory_visibility: Optional[Union[str, "_models.SnapshotDirectoryVisibility"]] = None,
- smb_properties: Optional["_models.ElasticSmbPatchProperties"] = None,
+ name: Optional[str] = None,
+ display_name: Optional[str] = None,
) -> None: ...
@overload
@@ -5095,7 +1644,7 @@ class EncryptionIdentity(_Model):
authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match
key of identity.userAssignedIdentities.
:vartype user_assigned_identity: str
- :ivar federated_client_id: ClientId of the multi-tenant AAD Application. Used to access
+ :ivar federated_client_id: ClientId of the multi-tenant Entra ID Application. Used to access
cross-tenant keyvaults.
:vartype federated_client_id: str
"""
@@ -5111,7 +1660,7 @@ class EncryptionIdentity(_Model):
federated_client_id: Optional[str] = rest_field(
name="federatedClientId", visibility=["read", "create", "update", "delete", "query"]
)
- """ClientId of the multi-tenant AAD Application. Used to access cross-tenant keyvaults."""
+ """ClientId of the multi-tenant Entra ID Application. Used to access cross-tenant keyvaults."""
@overload
def __init__(
@@ -5419,45 +1968,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class FileSystemUser(_Model):
- """File System user having access to volume data. For Unix, this is the user's uid and gid. For
- Windows, this is the user's username. Note that the Unix and Windows user details are mutually
- exclusive, meaning one or other must be supplied, but not both.
-
- :ivar nfs_user: The effective NFS User ID and Group ID when accessing the volume data.
- :vartype nfs_user: ~azure.mgmt.netapp.models.NfsUser
- :ivar cifs_user: The effective CIFS username when accessing the volume data.
- :vartype cifs_user: ~azure.mgmt.netapp.models.CifsUser
- """
-
- nfs_user: Optional["_models.NfsUser"] = rest_field(
- name="nfsUser", visibility=["read", "create", "update", "delete", "query"]
- )
- """The effective NFS User ID and Group ID when accessing the volume data."""
- cifs_user: Optional["_models.CifsUser"] = rest_field(
- name="cifsUser", visibility=["read", "create", "update", "delete", "query"]
- )
- """The effective CIFS username when accessing the volume data."""
-
- @overload
- def __init__(
- self,
- *,
- nfs_user: Optional["_models.NfsUser"] = None,
- cifs_user: Optional["_models.CifsUser"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
class GetGroupIdListForLDAPUserRequest(_Model):
"""Get group Id list for LDAP User request.
@@ -5720,81 +2230,21 @@ class KeyVaultProperties(_Model):
"""The Uri of KeyVault. Required."""
key_name: str = rest_field(name="keyName", visibility=["read", "create", "update", "delete", "query"])
"""The name of KeyVault key. Required."""
- key_vault_resource_id: Optional[str] = rest_field(
- name="keyVaultResourceId", visibility=["read", "create", "update", "delete", "query"]
- )
- """The resource ID of KeyVault."""
- status: Optional[Union[str, "_models.KeyVaultStatus"]] = rest_field(visibility=["read"])
- """Status of the KeyVault connection. Known values are: \"Created\", \"InUse\", \"Deleted\",
- \"Error\", and \"Updating\"."""
-
- @overload
- def __init__(
- self,
- *,
- key_vault_uri: str,
- key_name: str,
- key_vault_resource_id: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class LdapConfiguration(_Model):
- """LDAP configuration.
-
- :ivar domain: Name of the LDAP configuration domain.
- :vartype domain: str
- :ivar ldap_servers: List of LDAP server IP addresses (IPv4 only) for the LDAP domain.
- :vartype ldap_servers: list[str]
- :ivar ldap_over_tls: Specifies whether or not the LDAP traffic needs to be secured via TLS.
- :vartype ldap_over_tls: bool
- :ivar server_ca_certificate: When LDAP over SSL/TLS is enabled, the LDAP client is required to
- have base64 encoded ldap servers CA certificate.
- :vartype server_ca_certificate: str
- :ivar certificate_cn_host: The CN host name used while generating the certificate, LDAP Over
- TLS requires the CN host name to create DNS host entry.
- :vartype certificate_cn_host: str
- """
-
- domain: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Name of the LDAP configuration domain."""
- ldap_servers: Optional[list[str]] = rest_field(
- name="ldapServers", visibility=["read", "create", "update", "delete", "query"]
- )
- """List of LDAP server IP addresses (IPv4 only) for the LDAP domain."""
- ldap_over_tls: Optional[bool] = rest_field(
- name="ldapOverTLS", visibility=["read", "create", "update", "delete", "query"]
- )
- """Specifies whether or not the LDAP traffic needs to be secured via TLS."""
- server_ca_certificate: Optional[str] = rest_field(
- name="serverCACertificate", visibility=["read", "create", "update", "delete", "query"]
- )
- """When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded ldap
- servers CA certificate."""
- certificate_cn_host: Optional[str] = rest_field(
- name="certificateCNHost", visibility=["read", "create", "update", "delete", "query"]
+ key_vault_resource_id: Optional[str] = rest_field(
+ name="keyVaultResourceId", visibility=["read", "create", "update", "delete", "query"]
)
- """The CN host name used while generating the certificate, LDAP Over TLS requires the CN host name
- to create DNS host entry."""
+ """The resource ID of KeyVault."""
+ status: Optional[Union[str, "_models.KeyVaultStatus"]] = rest_field(visibility=["read"])
+ """Status of the KeyVault connection. Known values are: \"Created\", \"InUse\", \"Deleted\",
+ \"Error\", and \"Updating\"."""
@overload
def __init__(
self,
*,
- domain: Optional[str] = None,
- ldap_servers: Optional[list[str]] = None,
- ldap_over_tls: Optional[bool] = None,
- server_ca_certificate: Optional[str] = None,
- certificate_cn_host: Optional[str] = None,
+ key_vault_uri: str,
+ key_name: str,
+ key_vault_resource_id: Optional[str] = None,
) -> None: ...
@overload
@@ -6275,7 +2725,6 @@ class NetAppAccount(TrackedResource):
"disable_showmount",
"nfs_v4_id_domain",
"multi_ad_status",
- "ldap_configuration",
]
@overload
@@ -6362,7 +2811,6 @@ class NetAppAccountPatch(_Model):
"disable_showmount",
"nfs_v4_id_domain",
"multi_ad_status",
- "ldap_configuration",
]
@overload
@@ -6477,39 +2925,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class NfsUser(_Model):
- """The effective NFS User ID and Group ID when accessing the volume data.
-
- :ivar user_id: The NFS user's UID.
- :vartype user_id: int
- :ivar group_id: The NFS user's GID.
- :vartype group_id: int
- """
-
- user_id: Optional[int] = rest_field(name="userId", visibility=["read", "create", "update", "delete", "query"])
- """The NFS user's UID."""
- group_id: Optional[int] = rest_field(name="groupId", visibility=["read", "create", "update", "delete", "query"])
- """The NFS user's GID."""
-
- @overload
- def __init__(
- self,
- *,
- user_id: Optional[int] = None,
- group_id: Optional[int] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
class NicInfo(_Model):
"""NIC information and list of volumes for which the NIC has the primary mount IP Address.
@@ -6684,60 +3099,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class OriginClusterInformation(_Model):
- """Stores the origin cluster information associated to a cache.
-
- :ivar peer_cluster_name: ONTAP cluster name of external cluster hosting the origin volume.
- Required.
- :vartype peer_cluster_name: str
- :ivar peer_addresses: ONTAP Intercluster LIF IP addresses. One IP address per cluster node is
- required. Required.
- :vartype peer_addresses: list[str]
- :ivar peer_vserver_name: External Vserver (SVM) name name of the SVM hosting the origin
- volume. Required.
- :vartype peer_vserver_name: str
- :ivar peer_volume_name: External origin volume name associated to this cache. Required.
- :vartype peer_volume_name: str
- """
-
- peer_cluster_name: str = rest_field(
- name="peerClusterName", visibility=["read", "create", "update", "delete", "query"]
- )
- """ONTAP cluster name of external cluster hosting the origin volume. Required."""
- peer_addresses: list[str] = rest_field(
- name="peerAddresses", visibility=["read", "create", "update", "delete", "query"]
- )
- """ONTAP Intercluster LIF IP addresses. One IP address per cluster node is required. Required."""
- peer_vserver_name: str = rest_field(
- name="peerVserverName", visibility=["read", "create", "update", "delete", "query"]
- )
- """External Vserver (SVM) name name of the SVM hosting the origin volume. Required."""
- peer_volume_name: str = rest_field(
- name="peerVolumeName", visibility=["read", "create", "update", "delete", "query"]
- )
- """External origin volume name associated to this cache. Required."""
-
- @overload
- def __init__(
- self,
- *,
- peer_cluster_name: str,
- peer_addresses: list[str],
- peer_vserver_name: str,
- peer_volume_name: str,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
class PeerClusterForVolumeMigrationRequest(_Model):
"""Source Cluster properties for a cluster peer request.
@@ -6769,50 +3130,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class PeeringPassphrases(_Model):
- """The response containing peering passphrases and commands for cluster and vserver peering.
-
- :ivar cluster_peering_command: The cluster peering command. Required.
- :vartype cluster_peering_command: str
- :ivar cluster_peering_passphrase: The cluster peering passphrase. Required.
- :vartype cluster_peering_passphrase: str
- :ivar vserver_peering_command: The vserver peering command. Required.
- :vartype vserver_peering_command: str
- """
-
- cluster_peering_command: str = rest_field(
- name="clusterPeeringCommand", visibility=["read", "create", "update", "delete", "query"]
- )
- """The cluster peering command. Required."""
- cluster_peering_passphrase: str = rest_field(
- name="clusterPeeringPassphrase", visibility=["read", "create", "update", "delete", "query"]
- )
- """The cluster peering passphrase. Required."""
- vserver_peering_command: str = rest_field(
- name="vserverPeeringCommand", visibility=["read", "create", "update", "delete", "query"]
- )
- """The vserver peering command. Required."""
-
- @overload
- def __init__(
- self,
- *,
- cluster_peering_command: str,
- cluster_peering_passphrase: str,
- vserver_peering_command: str,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
class PlacementKeyValuePairs(_Model):
"""Application specific parameters for the placement of volumes in the volume group.
@@ -7200,7 +3517,7 @@ class QuotaReport(_Model):
:ivar quota_type: Type of quota. Known values are: "DefaultUserQuota", "DefaultGroupQuota",
"IndividualUserQuota", and "IndividualGroupQuota".
- :vartype quota_type: str or ~azure.mgmt.netapp.models.Type
+ :vartype quota_type: str or ~azure.mgmt.netapp.models.QuotaType
:ivar quota_target: UserID/GroupID/SID based on the quota target type. UserID and groupID can
be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by
running .
@@ -7217,7 +3534,7 @@ class QuotaReport(_Model):
:vartype is_derived_quota: bool
"""
- quota_type: Optional[Union[str, "_models.Type"]] = rest_field(
+ quota_type: Optional[Union[str, "_models.QuotaType"]] = rest_field(
name="quotaType", visibility=["read", "create", "update", "delete", "query"]
)
"""Type of quota. Known values are: \"DefaultUserQuota\", \"DefaultGroupQuota\",
@@ -7249,7 +3566,7 @@ class QuotaReport(_Model):
def __init__(
self,
*,
- quota_type: Optional[Union[str, "_models.Type"]] = None,
+ quota_type: Optional[Union[str, "_models.QuotaType"]] = None,
quota_target: Optional[str] = None,
quota_limit_used_in_ki_bs: Optional[int] = None,
quota_limit_total_in_ki_bs: Optional[int] = None,
@@ -7268,6 +3585,75 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
+class QuotaReportFilterRequest(_Model):
+ """Quota report filters. When filtering by quotaType or quotaTarget, both properties must be
+ supplied together. This constraint is enforced by the service/API at runtime, and requests
+ violating this rule will return a validation error. The usageThresholdPercentage filter is
+ independent and can be used alone or in combination with quotaType and quotaTarget to further
+ refine results.
+
+ :ivar quota_type: Type of quota. If provided, quotaTarget must also be specified. The quotaType
+ and quotaTarget properties are optional, but when filtering by quota type, quotaType and
+ quotaTarget must be supplied together. Service/API will return an error if only one is
+ provided. Known values are: "DefaultUserQuota", "DefaultGroupQuota", "IndividualUserQuota", and
+ "IndividualGroupQuota".
+ :vartype quota_type: str or ~azure.mgmt.netapp.models.QuotaType
+ :ivar quota_target: UserID/GroupID/SID based on the quota target type. UserID and groupID can
+ be found by running 'id' or 'getent' command for the user or group and SID can be found by
+ running . If provided, quotaType must also be
+ specified. The quotaType and quotaTarget properties are optional, but when filtering by quota
+ target, quotaType and quotaTarget must be supplied together. Service/API will return an error
+ if only one is provided.
+ :vartype quota_target: str
+ :ivar usage_threshold_percentage: The usageThresholdPercentage filter takes the usage threshold
+ percentage and returns records where the usage is greater than or equal to the input value.
+ This is an optional property.
+ :vartype usage_threshold_percentage: int
+ """
+
+ quota_type: Optional[Union[str, "_models.QuotaType"]] = rest_field(
+ name="quotaType", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Type of quota. If provided, quotaTarget must also be specified. The quotaType and quotaTarget
+ properties are optional, but when filtering by quota type, quotaType and quotaTarget must be
+ supplied together. Service/API will return an error if only one is provided. Known values are:
+ \"DefaultUserQuota\", \"DefaultGroupQuota\", \"IndividualUserQuota\", and
+ \"IndividualGroupQuota\"."""
+ quota_target: Optional[str] = rest_field(
+ name="quotaTarget", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running
+ 'id' or 'getent' command for the user or group and SID can be found by running . If provided, quotaType must also be specified. The
+ quotaType and quotaTarget properties are optional, but when filtering by quota target,
+ quotaType and quotaTarget must be supplied together. Service/API will return an error if only
+ one is provided."""
+ usage_threshold_percentage: Optional[int] = rest_field(
+ name="usageThresholdPercentage", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """The usageThresholdPercentage filter takes the usage threshold percentage and returns records
+ where the usage is greater than or equal to the input value. This is an optional property."""
+
+ @overload
+ def __init__(
+ self,
+ *,
+ quota_type: Optional[Union[str, "_models.QuotaType"]] = None,
+ quota_target: Optional[str] = None,
+ usage_threshold_percentage: Optional[int] = None,
+ ) -> None: ...
+
+ @overload
+ def __init__(self, mapping: Mapping[str, Any]) -> None:
+ """
+ :param mapping: raw JSON to initialize the model.
+ :type mapping: Mapping[str, Any]
+ """
+
+ def __init__(self, *args: Any, **kwargs: Any) -> None:
+ super().__init__(*args, **kwargs)
+
+
class RansomwareProtectionPatchSettings(_Model):
"""Advanced Ransomware Protection reports (ARP) updatable settings.
@@ -7345,13 +3731,12 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
class RansomwareReport(ProxyResource):
- """Advanced Ransomware Protection (ARP) report
- Get details of the specified Advanced Ransomware Protection report (ARP).
- ARP reports are created with a list of suspected files when it detects any combination of high
- data entropy, abnormal volume activity with data encryption, and unusual file extensions.
- ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware
- threat. You can use one of these ARP snapshots or another snapshot of your volume to restore
- data.
+ """Advanced Ransomware Protection (ARP) report Get details of the specified Advanced Ransomware
+ Protection report (ARP). ARP reports are created with a list of suspected files when it detects
+ any combination of high data entropy, abnormal volume activity with data encryption, and
+ unusual file extensions. ARP creates snapshots named Anti_ransomware_backup when it detects a
+ potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your
+ volume to restore data.
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
@@ -7751,7 +4136,7 @@ class Replication(_Model):
:vartype endpoint_type: str or ~azure.mgmt.netapp.models.EndpointType
:ivar replication_schedule: Schedule. Known values are: "_10minutely", "hourly", and "daily".
:vartype replication_schedule: str or ~azure.mgmt.netapp.models.ReplicationSchedule
- :ivar remote_volume_resource_id: The resource ID of the remote volume. Required.
+ :ivar remote_volume_resource_id: The resource ID of the remote volume.
:vartype remote_volume_resource_id: str
:ivar remote_volume_region: The remote region for the other end of the Volume Replication.
:vartype remote_volume_region: str
@@ -7775,10 +4160,10 @@ class Replication(_Model):
name="replicationSchedule", visibility=["read", "create", "update", "delete", "query"]
)
"""Schedule. Known values are: \"_10minutely\", \"hourly\", and \"daily\"."""
- remote_volume_resource_id: str = rest_field(
+ remote_volume_resource_id: Optional[str] = rest_field(
name="remoteVolumeResourceId", visibility=["read", "create", "update", "delete", "query"]
)
- """The resource ID of the remote volume. Required."""
+ """The resource ID of the remote volume."""
remote_volume_region: Optional[str] = rest_field(
name="remoteVolumeRegion", visibility=["read", "create", "update", "delete", "query"]
)
@@ -7801,9 +4186,9 @@ class Replication(_Model):
def __init__(
self,
*,
- remote_volume_resource_id: str,
endpoint_type: Optional[Union[str, "_models.EndpointType"]] = None,
replication_schedule: Optional[Union[str, "_models.ReplicationSchedule"]] = None,
+ remote_volume_resource_id: Optional[str] = None,
remote_volume_region: Optional[str] = None,
) -> None: ...
@@ -7838,24 +4223,6 @@ class ReplicationObject(_Model):
:vartype remote_volume_region: str
:ivar destination_replications: A list of destination replications.
:vartype destination_replications: list[~azure.mgmt.netapp.models.DestinationReplication]
- :ivar external_replication_setup_status: Property that only applies to external replications.
- Provides a machine-readable value for the status of the external replication setup. Known
- values are: "ClusterPeerRequired", "ClusterPeerPending", "VServerPeerRequired",
- "ReplicationCreateRequired", and "NoActionRequired".
- :vartype external_replication_setup_status: str or
- ~azure.mgmt.netapp.models.ExternalReplicationSetupStatus
- :ivar external_replication_setup_info: Contains human-readable instructions on what the next
- step is to finish the external replication setup.
- :vartype external_replication_setup_info: str
- :ivar mirror_state: The mirror state property describes the current status of data replication
- for a replication. It provides insight into whether the data is actively being mirrored, if the
- replication process has been paused, or if it has yet to be initialized. Known values are:
- "Uninitialized", "Mirrored", and "Broken".
- :vartype mirror_state: str or ~azure.mgmt.netapp.models.MirrorState
- :ivar relationship_status: The status of the Volume Replication. Known values are: "Idle" and
- "Transferring".
- :vartype relationship_status: str or
- ~azure.mgmt.netapp.models.VolumeReplicationRelationshipStatus
"""
replication_id: Optional[str] = rest_field(name="replicationId", visibility=["read"])
@@ -7879,27 +4246,6 @@ class ReplicationObject(_Model):
name="destinationReplications", visibility=["read"]
)
"""A list of destination replications."""
- external_replication_setup_status: Optional[Union[str, "_models.ExternalReplicationSetupStatus"]] = rest_field(
- name="externalReplicationSetupStatus", visibility=["read"]
- )
- """Property that only applies to external replications. Provides a machine-readable value for the
- status of the external replication setup. Known values are: \"ClusterPeerRequired\",
- \"ClusterPeerPending\", \"VServerPeerRequired\", \"ReplicationCreateRequired\", and
- \"NoActionRequired\"."""
- external_replication_setup_info: Optional[str] = rest_field(
- name="externalReplicationSetupInfo", visibility=["read"]
- )
- """Contains human-readable instructions on what the next step is to finish the external
- replication setup."""
- mirror_state: Optional[Union[str, "_models.MirrorState"]] = rest_field(name="mirrorState", visibility=["read"])
- """The mirror state property describes the current status of data replication for a replication.
- It provides insight into whether the data is actively being mirrored, if the replication
- process has been paused, or if it has yet to be initialized. Known values are:
- \"Uninitialized\", \"Mirrored\", and \"Broken\"."""
- relationship_status: Optional[Union[str, "_models.VolumeReplicationRelationshipStatus"]] = rest_field(
- name="relationshipStatus", visibility=["read"]
- )
- """The status of the Volume Replication. Known values are: \"Idle\" and \"Transferring\"."""
@overload
def __init__(
@@ -8068,116 +4414,6 @@ class RestoreStatus(_Model):
"""Displays the total bytes transferred."""
-class SecretPassword(_Model):
- """Access password from Azure KeyVault Secrets to connect Active Directory.
-
- :ivar key_vault_properties: Properties provided by KeyVault.
- :vartype key_vault_properties: ~azure.mgmt.netapp.models.SecretPasswordKeyVaultProperties
- :ivar identity: Identity used to authenticate to KeyVault. Applicable if keySource is
- 'Microsoft.KeyVault'.
- :vartype identity: ~azure.mgmt.netapp.models.SecretPasswordIdentity
- """
-
- key_vault_properties: Optional["_models.SecretPasswordKeyVaultProperties"] = rest_field(
- name="keyVaultProperties", visibility=["read", "create", "update", "delete", "query"]
- )
- """Properties provided by KeyVault."""
- identity: Optional["_models.SecretPasswordIdentity"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'."""
-
- @overload
- def __init__(
- self,
- *,
- key_vault_properties: Optional["_models.SecretPasswordKeyVaultProperties"] = None,
- identity: Optional["_models.SecretPasswordIdentity"] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class SecretPasswordIdentity(_Model):
- """Identity used to authenticate with key vault.
-
- :ivar principal_id: The principal ID (object ID) of the identity used to authenticate with key
- vault. Read-only.
- :vartype principal_id: str
- :ivar user_assigned_identity: The Azure resource identifier of the user assigned identity used
- to authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match
- key of identity.userAssignedIdentities.
- :vartype user_assigned_identity: str
- """
-
- principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
- """The principal ID (object ID) of the identity used to authenticate with key vault. Read-only."""
- user_assigned_identity: Optional[str] = rest_field(
- name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"]
- )
- """The Azure resource identifier of the user assigned identity used to authenticate with key
- vault. Applicable if identity.type has 'UserAssigned'. It should match key of
- identity.userAssignedIdentities."""
-
- @overload
- def __init__(
- self,
- *,
- user_assigned_identity: Optional[str] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
-class SecretPasswordKeyVaultProperties(_Model):
- """Properties of key vault to get the secrets for password.
-
- :ivar key_vault_uri: The Uri of KeyVault. Required.
- :vartype key_vault_uri: str
- :ivar secret_name: The name of KeyVault password secret. Required.
- :vartype secret_name: str
- """
-
- key_vault_uri: str = rest_field(name="keyVaultUri", visibility=["read", "create", "update", "delete", "query"])
- """The Uri of KeyVault. Required."""
- secret_name: str = rest_field(name="secretName", visibility=["read", "create", "update", "delete", "query"])
- """The name of KeyVault password secret. Required."""
-
- @overload
- def __init__(
- self,
- *,
- key_vault_uri: str,
- secret_name: str,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
class ServiceSpecification(_Model):
"""One property of operation, include metric specifications.
@@ -8215,58 +4451,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class SmbSettings(_Model):
- """SMB settings for the cache.
-
- :ivar smb_encryption: Enables encryption for in-flight smb3 data. Only applicable for
- SMB/DualProtocol cache. Known values are: "Disabled" and "Enabled".
- :vartype smb_encryption: str or ~azure.mgmt.netapp.models.SmbEncryptionState
- :ivar smb_access_based_enumerations: Enables access-based enumeration share property for SMB
- Shares. Only applicable for SMB/DualProtocol volume. Known values are: "Disabled" and
- "Enabled".
- :vartype smb_access_based_enumerations: str or
- ~azure.mgmt.netapp.models.SmbAccessBasedEnumeration
- :ivar smb_non_browsable: Enables non-browsable property for SMB Shares. Only applicable for
- SMB/DualProtocol volume. Known values are: "Disabled" and "Enabled".
- :vartype smb_non_browsable: str or ~azure.mgmt.netapp.models.SmbNonBrowsable
- """
-
- smb_encryption: Optional[Union[str, "_models.SmbEncryptionState"]] = rest_field(
- name="smbEncryption", visibility=["read", "create", "update", "delete", "query"]
- )
- """Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol cache. Known
- values are: \"Disabled\" and \"Enabled\"."""
- smb_access_based_enumerations: Optional[Union[str, "_models.SmbAccessBasedEnumeration"]] = rest_field(
- name="smbAccessBasedEnumerations", visibility=["read", "create", "update", "delete", "query"]
- )
- """Enables access-based enumeration share property for SMB Shares. Only applicable for
- SMB/DualProtocol volume. Known values are: \"Disabled\" and \"Enabled\"."""
- smb_non_browsable: Optional[Union[str, "_models.SmbNonBrowsable"]] = rest_field(
- name="smbNonBrowsable", visibility=["read", "create", "update", "delete", "query"]
- )
- """Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume.
- Known values are: \"Disabled\" and \"Enabled\"."""
-
- @overload
- def __init__(
- self,
- *,
- smb_encryption: Optional[Union[str, "_models.SmbEncryptionState"]] = None,
- smb_access_based_enumerations: Optional[Union[str, "_models.SmbAccessBasedEnumeration"]] = None,
- smb_non_browsable: Optional[Union[str, "_models.SmbNonBrowsable"]] = None,
- ) -> None: ...
-
- @overload
- def __init__(self, mapping: Mapping[str, Any]) -> None:
- """
- :param mapping: raw JSON to initialize the model.
- :type mapping: Mapping[str, Any]
- """
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- super().__init__(*args, **kwargs)
-
-
class Snapshot(ProxyResource):
"""Snapshot of a Volume.
@@ -9369,7 +5553,6 @@ class Volume(TrackedResource):
"encryption_key_source",
"key_vault_private_endpoint_resource_id",
"ldap_enabled",
- "ldap_server_type",
"cool_access",
"coolness_period",
"cool_access_retrieval_policy",
@@ -9393,11 +5576,8 @@ class Volume(TrackedResource):
"enable_subvolumes",
"provisioned_availability_zone",
"is_large_volume",
- "large_volume_type",
"originating_resource_id",
"inherited_size_in_bytes",
- "language",
- "breakthrough_mode",
]
@overload
@@ -9861,7 +6041,6 @@ class VolumeGroupVolumeProperties(_Model):
"encryption_key_source",
"key_vault_private_endpoint_resource_id",
"ldap_enabled",
- "ldap_server_type",
"cool_access",
"coolness_period",
"cool_access_retrieval_policy",
@@ -9885,11 +6064,8 @@ class VolumeGroupVolumeProperties(_Model):
"enable_subvolumes",
"provisioned_availability_zone",
"is_large_volume",
- "large_volume_type",
"originating_resource_id",
"inherited_size_in_bytes",
- "language",
- "breakthrough_mode",
]
@overload
@@ -10029,11 +6205,8 @@ class VolumePatchProperties(_Model):
:vartype service_level: str or ~azure.mgmt.netapp.models.ServiceLevel
:ivar usage_threshold: Maximum storage quota allowed for a file system in bytes. This is a soft
quota used for alerting only. For regular volumes, valid values are in the range 50GiB to
- 100TiB.
- For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis,
- from to 2400GiB to 2400TiB.
- For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in
- bytes as multiples of 1 GiB.
+ 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an
+ exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB.
:vartype usage_threshold: int
:ivar export_policy: Set of export policy rules.
:vartype export_policy: ~azure.mgmt.netapp.models.VolumePatchPropertiesExportPolicy
@@ -10067,13 +6240,11 @@ class VolumePatchProperties(_Model):
:vartype coolness_period: int
:ivar cool_access_retrieval_policy: coolAccessRetrievalPolicy determines the data retrieval
behavior from the cool tier to standard storage based on the read pattern for cool access
- enabled volumes. The possible values for this field are:
- Default - Data will be pulled from cool tier to standard storage on random reads. This policy
- is the default.
- OnRead - All client-driven data read is pulled from cool tier to standard storage on both
- sequential and random reads.
- Never - No client-driven data is pulled from cool tier to standard storage. Known values are:
- "Default", "OnRead", and "Never".
+ enabled volumes. The possible values for this field are: Default - Data will be pulled from
+ cool tier to standard storage on random reads. This policy is the default. OnRead - All
+ client-driven data read is pulled from cool tier to standard storage on both sequential and
+ random reads. Never - No client-driven data is pulled from cool tier to standard storage. Known
+ values are: "Default", "OnRead", and "Never".
:vartype cool_access_retrieval_policy: str or
~azure.mgmt.netapp.models.CoolAccessRetrievalPolicy
:ivar cool_access_tiering_policy: coolAccessTieringPolicy determines which cold data blocks are
@@ -10105,11 +6276,9 @@ class VolumePatchProperties(_Model):
name="usageThreshold", visibility=["read", "create", "update", "delete", "query"]
)
"""Maximum storage quota allowed for a file system in bytes. This is a soft quota used for
- alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB.
- For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis,
- from to 2400GiB to 2400TiB.
- For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in
- bytes as multiples of 1 GiB."""
+ alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large
+ volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to
+ 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB."""
export_policy: Optional["_models.VolumePatchPropertiesExportPolicy"] = rest_field(
name="exportPolicy", visibility=["read", "create", "update", "delete", "query"]
)
@@ -10162,13 +6331,10 @@ class VolumePatchProperties(_Model):
)
"""coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard
storage based on the read pattern for cool access enabled volumes. The possible values for this
- field are:
- Default - Data will be pulled from cool tier to standard storage on random reads. This policy
- is the default.
- OnRead - All client-driven data read is pulled from cool tier to standard storage on both
- sequential and random reads.
- Never - No client-driven data is pulled from cool tier to standard storage. Known values are:
- \"Default\", \"OnRead\", and \"Never\"."""
+ field are: Default - Data will be pulled from cool tier to standard storage on random reads.
+ This policy is the default. OnRead - All client-driven data read is pulled from cool tier to
+ standard storage on both sequential and random reads. Never - No client-driven data is pulled
+ from cool tier to standard storage. Known values are: \"Default\", \"OnRead\", and \"Never\"."""
cool_access_tiering_policy: Optional[Union[str, "_models.CoolAccessTieringPolicy"]] = rest_field(
name="coolAccessTieringPolicy", visibility=["read", "create", "update", "delete", "query"]
)
@@ -10314,11 +6480,9 @@ class VolumeProperties(_Model):
:vartype service_level: str or ~azure.mgmt.netapp.models.ServiceLevel
:ivar usage_threshold: Maximum storage quota allowed for a file system in bytes. This is a soft
quota used for alerting only. For regular volumes, valid values are in the range 50GiB to
- 100TiB.
- For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis,
- from to 2400GiB to 2400TiB.
- For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in
- bytes as multiples of 1 GiB. Required.
+ 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an
+ exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB.
+ Required.
:vartype usage_threshold: int
:ivar export_policy: Set of export policy rules.
:vartype export_policy: ~azure.mgmt.netapp.models.VolumePropertiesExportPolicy
@@ -10410,9 +6574,6 @@ class VolumeProperties(_Model):
:vartype key_vault_private_endpoint_resource_id: str
:ivar ldap_enabled: Specifies whether LDAP is enabled or not for a given NFS volume.
:vartype ldap_enabled: bool
- :ivar ldap_server_type: Specifies the type of LDAP server for a given NFS volume. Known values
- are: "ActiveDirectory" and "OpenLDAP".
- :vartype ldap_server_type: str or ~azure.mgmt.netapp.models.LdapServerType
:ivar cool_access: Specifies whether Cool Access(tiering) is enabled for the volume.
:vartype cool_access: bool
:ivar coolness_period: Specifies the number of days after which data that is not accessed by
@@ -10420,13 +6581,11 @@ class VolumeProperties(_Model):
:vartype coolness_period: int
:ivar cool_access_retrieval_policy: coolAccessRetrievalPolicy determines the data retrieval
behavior from the cool tier to standard storage based on the read pattern for cool access
- enabled volumes. The possible values for this field are:
- Default - Data will be pulled from cool tier to standard storage on random reads. This policy
- is the default.
- OnRead - All client-driven data read is pulled from cool tier to standard storage on both
- sequential and random reads.
- Never - No client-driven data is pulled from cool tier to standard storage. Known values are:
- "Default", "OnRead", and "Never".
+ enabled volumes. The possible values for this field are: Default - Data will be pulled from
+ cool tier to standard storage on random reads. This policy is the default. OnRead - All
+ client-driven data read is pulled from cool tier to standard storage on both sequential and
+ random reads. Never - No client-driven data is pulled from cool tier to standard storage. Known
+ values are: "Default", "OnRead", and "Never".
:vartype cool_access_retrieval_policy: str or
~azure.mgmt.netapp.models.CoolAccessRetrievalPolicy
:ivar cool_access_tiering_policy: coolAccessTieringPolicy determines which cold data blocks are
@@ -10493,31 +6652,11 @@ class VolumeProperties(_Model):
:vartype provisioned_availability_zone: str
:ivar is_large_volume: Specifies whether volume is a Large Volume or Regular Volume.
:vartype is_large_volume: bool
- :ivar large_volume_type: Specifies the type of the Large Volume. When set to 'LargeVolume', the
- large volume is created with standard configuration.
- If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher
- capacity limit 7.2PiB with cool access enabled,
- delivering higher capacity limit with lower costs. Known values are: "LargeVolume" and
- "PremExtraLargeVolume7Dot2PiB".
- :vartype large_volume_type: str or ~azure.mgmt.netapp.models.LargeVolumeType
:ivar originating_resource_id: Id of the snapshot or backup that the volume is restored from.
:vartype originating_resource_id: str
:ivar inherited_size_in_bytes: Space shared by short term clone volume with parent volume in
bytes.
:vartype inherited_size_in_bytes: int
- :ivar language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar",
- "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en",
- "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu",
- "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck",
- "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko",
- "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru",
- "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8",
- "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8",
- "tr", "tr.utf-8", "en-us", and "en-us.utf-8".
- :vartype language: str or ~azure.mgmt.netapp.models.VolumeLanguage
- :ivar breakthrough_mode: Specifies whether the volume operates in Breakthrough Mode. Known
- values are: "Enabled" and "Disabled".
- :vartype breakthrough_mode: str or ~azure.mgmt.netapp.models.BreakthroughMode
"""
file_system_id: Optional[str] = rest_field(name="fileSystemId", visibility=["read"])
@@ -10531,11 +6670,9 @@ class VolumeProperties(_Model):
\"StandardZRS\", and \"Flexible\"."""
usage_threshold: int = rest_field(name="usageThreshold", visibility=["read", "create", "update", "delete", "query"])
"""Maximum storage quota allowed for a file system in bytes. This is a soft quota used for
- alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB.
- For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis,
- from to 2400GiB to 2400TiB.
- For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in
- bytes as multiples of 1 GiB. Required."""
+ alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large
+ volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to
+ 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. Required."""
export_policy: Optional["_models.VolumePropertiesExportPolicy"] = rest_field(
name="exportPolicy", visibility=["read", "create", "update", "delete", "query"]
)
@@ -10650,11 +6787,6 @@ class VolumeProperties(_Model):
volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'."""
ldap_enabled: Optional[bool] = rest_field(name="ldapEnabled", visibility=["read", "create"])
"""Specifies whether LDAP is enabled or not for a given NFS volume."""
- ldap_server_type: Optional[Union[str, "_models.LdapServerType"]] = rest_field(
- name="ldapServerType", visibility=["read", "create"]
- )
- """Specifies the type of LDAP server for a given NFS volume. Known values are: \"ActiveDirectory\"
- and \"OpenLDAP\"."""
cool_access: Optional[bool] = rest_field(
name="coolAccess", visibility=["read", "create", "update", "delete", "query"]
)
@@ -10668,13 +6800,10 @@ class VolumeProperties(_Model):
)
"""coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard
storage based on the read pattern for cool access enabled volumes. The possible values for this
- field are:
- Default - Data will be pulled from cool tier to standard storage on random reads. This policy
- is the default.
- OnRead - All client-driven data read is pulled from cool tier to standard storage on both
- sequential and random reads.
- Never - No client-driven data is pulled from cool tier to standard storage. Known values are:
- \"Default\", \"OnRead\", and \"Never\"."""
+ field are: Default - Data will be pulled from cool tier to standard storage on random reads.
+ This policy is the default. OnRead - All client-driven data read is pulled from cool tier to
+ standard storage on both sequential and random reads. Never - No client-driven data is pulled
+ from cool tier to standard storage. Known values are: \"Default\", \"OnRead\", and \"Never\"."""
cool_access_tiering_policy: Optional[Union[str, "_models.CoolAccessTieringPolicy"]] = rest_field(
name="coolAccessTieringPolicy", visibility=["read", "create", "update", "delete", "query"]
)
@@ -10758,38 +6887,10 @@ class VolumeProperties(_Model):
zone where the volume resides."""
is_large_volume: Optional[bool] = rest_field(name="isLargeVolume", visibility=["read", "create"])
"""Specifies whether volume is a Large Volume or Regular Volume."""
- large_volume_type: Optional[Union[str, "_models.LargeVolumeType"]] = rest_field(
- name="largeVolumeType", visibility=["read", "create"]
- )
- """Specifies the type of the Large Volume. When set to 'LargeVolume', the large volume is created
- with standard configuration.
- If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher
- capacity limit 7.2PiB with cool access enabled,
- delivering higher capacity limit with lower costs. Known values are: \"LargeVolume\" and
- \"PremExtraLargeVolume7Dot2PiB\"."""
originating_resource_id: Optional[str] = rest_field(name="originatingResourceId", visibility=["read"])
"""Id of the snapshot or backup that the volume is restored from."""
inherited_size_in_bytes: Optional[int] = rest_field(name="inheritedSizeInBytes", visibility=["read"])
"""Space shared by short term clone volume with parent volume in bytes."""
- language: Optional[Union[str, "_models.VolumeLanguage"]] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
- )
- """Language supported for volume. Known values are: \"c.utf-8\", \"utf8mb4\", \"ar\",
- \"ar.utf-8\", \"hr\", \"hr.utf-8\", \"cs\", \"cs.utf-8\", \"da\", \"da.utf-8\", \"nl\",
- \"nl.utf-8\", \"en\", \"en.utf-8\", \"fi\", \"fi.utf-8\", \"fr\", \"fr.utf-8\", \"de\",
- \"de.utf-8\", \"he\", \"he.utf-8\", \"hu\", \"hu.utf-8\", \"it\", \"it.utf-8\", \"ja\",
- \"ja.utf-8\", \"ja-v1\", \"ja-v1.utf-8\", \"ja-jp.pck\", \"ja-jp.pck.utf-8\", \"ja-jp.932\",
- \"ja-jp.932.utf-8\", \"ja-jp.pck-v2\", \"ja-jp.pck-v2.utf-8\", \"ko\", \"ko.utf-8\", \"no\",
- \"no.utf-8\", \"pl\", \"pl.utf-8\", \"pt\", \"pt.utf-8\", \"c\", \"ro\", \"ro.utf-8\", \"ru\",
- \"ru.utf-8\", \"zh\", \"zh.utf-8\", \"zh.gbk\", \"zh.gbk.utf-8\", \"zh-tw.big5\",
- \"zh-tw.big5.utf-8\", \"zh-tw\", \"zh-tw.utf-8\", \"sk\", \"sk.utf-8\", \"sl\", \"sl.utf-8\",
- \"es\", \"es.utf-8\", \"sv\", \"sv.utf-8\", \"tr\", \"tr.utf-8\", \"en-us\", and
- \"en-us.utf-8\"."""
- breakthrough_mode: Optional[Union[str, "_models.BreakthroughMode"]] = rest_field(
- name="breakthroughMode", visibility=["read", "create", "update", "delete", "query"]
- )
- """Specifies whether the volume operates in Breakthrough Mode. Known values are: \"Enabled\" and
- \"Disabled\"."""
@overload
def __init__( # pylint: disable=too-many-locals
@@ -10821,7 +6922,6 @@ def __init__( # pylint: disable=too-many-locals
encryption_key_source: Optional[Union[str, "_models.EncryptionKeySource"]] = None,
key_vault_private_endpoint_resource_id: Optional[str] = None,
ldap_enabled: Optional[bool] = None,
- ldap_server_type: Optional[Union[str, "_models.LdapServerType"]] = None,
cool_access: Optional[bool] = None,
coolness_period: Optional[int] = None,
cool_access_retrieval_policy: Optional[Union[str, "_models.CoolAccessRetrievalPolicy"]] = None,
@@ -10837,9 +6937,6 @@ def __init__( # pylint: disable=too-many-locals
placement_rules: Optional[list["_models.PlacementKeyValuePairs"]] = None,
enable_subvolumes: Optional[Union[str, "_models.EnableSubvolumes"]] = None,
is_large_volume: Optional[bool] = None,
- large_volume_type: Optional[Union[str, "_models.LargeVolumeType"]] = None,
- language: Optional[Union[str, "_models.VolumeLanguage"]] = None,
- breakthrough_mode: Optional[Union[str, "_models.BreakthroughMode"]] = None,
) -> None: ...
@overload
@@ -11074,7 +7171,7 @@ class VolumeQuotaRulesProperties(_Model):
:vartype quota_size_in_ki_bs: int
:ivar quota_type: Type of quota. Known values are: "DefaultUserQuota", "DefaultGroupQuota",
"IndividualUserQuota", and "IndividualGroupQuota".
- :vartype quota_type: str or ~azure.mgmt.netapp.models.Type
+ :vartype quota_type: str or ~azure.mgmt.netapp.models.QuotaType
:ivar quota_target: UserID/GroupID/SID based on the quota target type. UserID and groupID can
be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by
running .
@@ -11091,7 +7188,7 @@ class VolumeQuotaRulesProperties(_Model):
name="quotaSizeInKiBs", visibility=["read", "create", "update", "delete", "query"]
)
"""Size of quota."""
- quota_type: Optional[Union[str, "_models.Type"]] = rest_field(name="quotaType", visibility=["read", "create"])
+ quota_type: Optional[Union[str, "_models.QuotaType"]] = rest_field(name="quotaType", visibility=["read", "create"])
"""Type of quota. Known values are: \"DefaultUserQuota\", \"DefaultGroupQuota\",
\"IndividualUserQuota\", and \"IndividualGroupQuota\"."""
quota_target: Optional[str] = rest_field(name="quotaTarget", visibility=["read", "create"])
@@ -11104,7 +7201,7 @@ def __init__(
self,
*,
quota_size_in_ki_bs: Optional[int] = None,
- quota_type: Optional[Union[str, "_models.Type"]] = None,
+ quota_type: Optional[Union[str, "_models.QuotaType"]] = None,
quota_target: Optional[str] = None,
) -> None: ...
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 dc8916780c55..c5f8e5b377a9 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
@@ -23,17 +23,6 @@
from ._operations import VolumeQuotaRulesOperations # type: ignore
from ._operations import RansomwareReportsOperations # type: ignore
from ._operations import BackupVaultsOperations # type: ignore
-from ._operations import BucketsOperations # type: ignore
-from ._operations import CachesOperations # type: ignore
-from ._operations import ElasticAccountsOperations # type: ignore
-from ._operations import ElasticCapacityPoolsOperations # type: ignore
-from ._operations import ElasticVolumesOperations # type: ignore
-from ._operations import ElasticSnapshotsOperations # type: ignore
-from ._operations import ElasticSnapshotPoliciesOperations # type: ignore
-from ._operations import ElasticBackupVaultsOperations # type: ignore
-from ._operations import ElasticBackupPoliciesOperations # type: ignore
-from ._operations import ElasticBackupsOperations # type: ignore
-from ._operations import ActiveDirectoryConfigsOperations # type: ignore
from ._operations import NetAppResourceQuotaLimitsOperations # type: ignore
from ._operations import NetAppResourceRegionInfosOperations # type: ignore
from ._operations import AccountsOperations # type: ignore
@@ -61,17 +50,6 @@
"VolumeQuotaRulesOperations",
"RansomwareReportsOperations",
"BackupVaultsOperations",
- "BucketsOperations",
- "CachesOperations",
- "ElasticAccountsOperations",
- "ElasticCapacityPoolsOperations",
- "ElasticVolumesOperations",
- "ElasticSnapshotsOperations",
- "ElasticSnapshotPoliciesOperations",
- "ElasticBackupVaultsOperations",
- "ElasticBackupPoliciesOperations",
- "ElasticBackupsOperations",
- "ActiveDirectoryConfigsOperations",
"NetAppResourceQuotaLimitsOperations",
"NetAppResourceRegionInfosOperations",
"AccountsOperations",
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 8fd012577b8d..e576f51e5e94 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
@@ -51,7 +51,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -72,7 +72,7 @@ def build_net_app_resource_quota_limits_account_get_request( # pylint: disable=
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -101,7 +101,7 @@ def build_net_app_resource_quota_limits_account_list_request( # pylint: disable
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -129,7 +129,7 @@ def build_volume_groups_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -159,7 +159,7 @@ def build_volume_groups_create_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -189,7 +189,7 @@ def build_volume_groups_delete_request(
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}"
path_format_arguments = {
@@ -213,7 +213,7 @@ def build_volume_groups_list_by_net_app_account_request( # pylint: disable=name
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -246,7 +246,7 @@ def build_backups_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -282,7 +282,7 @@ def build_backups_create_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -320,7 +320,7 @@ def build_backups_update_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -356,7 +356,7 @@ def build_backups_delete_request(
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}"
path_format_arguments = {
@@ -387,7 +387,7 @@ def build_backups_list_by_vault_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -418,7 +418,7 @@ def build_backups_get_latest_status_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -448,7 +448,7 @@ def build_backups_get_volume_latest_restore_status_request( # pylint: disable=n
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -478,7 +478,7 @@ def build_volumes_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -509,7 +509,7 @@ def build_volumes_create_or_update_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -542,7 +542,7 @@ def build_volumes_update_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -580,7 +580,7 @@ def build_volumes_delete_request(
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}"
path_format_arguments = {
@@ -607,7 +607,7 @@ def build_volumes_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -636,7 +636,7 @@ def build_volumes_populate_availability_zone_request( # pylint: disable=name-to
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -667,7 +667,7 @@ def build_volumes_revert_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revert"
path_format_arguments = {
@@ -695,7 +695,7 @@ def build_volumes_reset_cifs_password_request( # pylint: disable=name-too-long
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resetCifsPassword"
path_format_arguments = {
@@ -720,7 +720,7 @@ def build_volumes_split_clone_from_parent_request( # pylint: disable=name-too-l
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -751,7 +751,7 @@ def build_volumes_break_file_locks_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakFileLocks"
path_format_arguments = {
@@ -781,7 +781,7 @@ def build_volumes_list_get_group_id_list_for_ldap_user_request( # pylint: disab
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -814,7 +814,7 @@ def build_volumes_break_replication_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication"
path_format_arguments = {
@@ -844,7 +844,7 @@ def build_volumes_reestablish_replication_request( # pylint: disable=name-too-l
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reestablishReplication"
path_format_arguments = {
@@ -873,7 +873,7 @@ def build_volumes_replication_status_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -904,7 +904,7 @@ def build_volumes_list_replications_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -935,7 +935,7 @@ def build_volumes_resync_replication_request(
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication"
path_format_arguments = {
@@ -959,7 +959,7 @@ def build_volumes_delete_replication_request(
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/deleteReplication"
path_format_arguments = {
@@ -985,7 +985,7 @@ def build_volumes_authorize_replication_request( # pylint: disable=name-too-lon
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeReplication"
path_format_arguments = {
@@ -1013,7 +1013,7 @@ def build_volumes_re_initialize_replication_request( # pylint: disable=name-too
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reinitializeReplication"
path_format_arguments = {
@@ -1039,7 +1039,7 @@ def build_volumes_peer_external_cluster_request( # pylint: disable=name-too-lon
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1071,7 +1071,7 @@ def build_volumes_authorize_external_replication_request( # pylint: disable=nam
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1100,7 +1100,7 @@ def build_volumes_finalize_external_replication_request( # pylint: disable=name
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeExternalReplication"
path_format_arguments = {
@@ -1124,7 +1124,7 @@ def build_volumes_perform_replication_transfer_request( # pylint: disable=name-
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/performReplicationTransfer"
path_format_arguments = {
@@ -1150,7 +1150,7 @@ def build_volumes_pool_change_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/poolChange"
path_format_arguments = {
@@ -1180,7 +1180,7 @@ def build_volumes_relocate_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/relocate"
path_format_arguments = {
@@ -1208,7 +1208,7 @@ def build_volumes_finalize_relocation_request( # pylint: disable=name-too-long
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeRelocation"
path_format_arguments = {
@@ -1232,7 +1232,7 @@ def build_volumes_revert_relocation_request(
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revertRelocation"
path_format_arguments = {
@@ -1257,7 +1257,8 @@ def build_volumes_list_quota_report_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1276,6 +1277,8 @@ def build_volumes_list_quota_report_request(
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
@@ -1293,7 +1296,7 @@ def build_snapshots_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1331,7 +1334,7 @@ def build_snapshots_create_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1371,7 +1374,7 @@ def build_snapshots_update_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1409,7 +1412,7 @@ def build_snapshots_delete_request(
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}"
path_format_arguments = {
@@ -1435,7 +1438,7 @@ def build_snapshots_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1472,7 +1475,7 @@ def build_snapshots_restore_files_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}/restoreFiles"
path_format_arguments = {
@@ -1502,7 +1505,7 @@ def build_snapshot_policies_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1532,7 +1535,7 @@ def build_snapshot_policies_create_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1564,7 +1567,7 @@ def build_snapshot_policies_update_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1594,7 +1597,7 @@ def build_snapshot_policies_delete_request(
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}"
path_format_arguments = {
@@ -1618,7 +1621,7 @@ def build_snapshot_policies_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1646,7 +1649,7 @@ def build_snapshot_policies_list_volumes_request( # pylint: disable=name-too-lo
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1675,7 +1678,7 @@ def build_backup_policies_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1705,7 +1708,7 @@ def build_backup_policies_create_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1737,7 +1740,7 @@ def build_backup_policies_update_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1767,7 +1770,7 @@ def build_backup_policies_delete_request(
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}"
path_format_arguments = {
@@ -1791,7 +1794,7 @@ def build_backup_policies_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1825,7 +1828,7 @@ def build_volume_quota_rules_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1863,7 +1866,7 @@ def build_volume_quota_rules_create_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1903,7 +1906,7 @@ def build_volume_quota_rules_update_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1941,7 +1944,7 @@ def build_volume_quota_rules_delete_request(
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}"
path_format_arguments = {
@@ -1967,7 +1970,7 @@ def build_volume_quota_rules_list_by_volume_request( # pylint: disable=name-too
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -2003,7 +2006,7 @@ def build_ransomware_reports_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -2034,7 +2037,7 @@ def build_ransomware_reports_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -2071,7 +2074,7 @@ def build_ransomware_reports_clear_suspects_request( # pylint: disable=name-too
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}/clearSuspects"
path_format_arguments = {
@@ -2101,7 +2104,7 @@ def build_backup_vaults_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -2131,7 +2134,7 @@ def build_backup_vaults_create_or_update_request( # pylint: disable=name-too-lo
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -2163,7 +2166,7 @@ def build_backup_vaults_update_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -2193,7 +2196,7 @@ def build_backup_vaults_delete_request(
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
_url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}"
path_format_arguments = {
@@ -2217,7 +2220,7 @@ def build_backup_vaults_list_by_net_app_account_request( # pylint: disable=name
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -2239,30 +2242,23 @@ def build_backup_vaults_list_by_net_app_account_request( # pylint: disable=name
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_buckets_get_request(
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- subscription_id: str,
- **kwargs: Any
+def build_net_app_resource_quota_limits_get_request( # pylint: disable=name-too-long
+ location: str, quota_limit_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}"
+ _url = (
+ "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits/{quotaLimitName}"
+ )
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- "bucketName": _SERIALIZER.url("bucket_name", bucket_name, "str"),
+ "location": _SERIALIZER.url("location", location, "str"),
+ "quotaLimitName": _SERIALIZER.url("quota_limit_name", quota_limit_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2276,71 +2272,20 @@ def build_buckets_get_request(
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_buckets_create_or_update_request(
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- subscription_id: str,
- **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- "bucketName": _SERIALIZER.url("bucket_name", bucket_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_buckets_update_request(
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- subscription_id: str,
- **kwargs: Any
+def build_net_app_resource_quota_limits_list_request( # pylint: disable=name-too-long
+ location: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}"
+ _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- "bucketName": _SERIALIZER.url("bucket_name", bucket_name, "str"),
+ "location": _SERIALIZER.url("location", location, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2349,61 +2294,25 @@ def build_buckets_update_request(
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_buckets_delete_request(
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- subscription_id: str,
- **kwargs: Any
-) -> HttpRequest:
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- "bucketName": _SERIALIZER.url("bucket_name", bucket_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_buckets_list_request(
- resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any
+def build_net_app_resource_region_infos_get_request( # pylint: disable=name-too-long
+ location: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets"
+ _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos/default"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
+ "location": _SERIALIZER.url("location", location, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2417,31 +2326,20 @@ def build_buckets_list_request(
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_buckets_generate_credentials_request( # pylint: disable=name-too-long
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- subscription_id: str,
- **kwargs: Any
+def build_net_app_resource_region_infos_list_request( # pylint: disable=name-too-long
+ location: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}/generateCredentials"
+ _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- "bucketName": _SERIALIZER.url("bucket_name", bucket_name, "str"),
+ "location": _SERIALIZER.url("location", location, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2450,30 +2348,26 @@ def build_buckets_generate_credentials_request( # pylint: disable=name-too-long
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_caches_get_request(
- resource_group_name: str, account_name: str, pool_name: str, cache_name: str, subscription_id: str, **kwargs: Any
+def build_accounts_get_request(
+ resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "cacheName": _SERIALIZER.url("cache_name", cache_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2487,24 +2381,22 @@ def build_caches_get_request(
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_caches_create_or_update_request(
- resource_group_name: str, account_name: str, pool_name: str, cache_name: str, subscription_id: str, **kwargs: Any
+def build_accounts_create_or_update_request(
+ resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "cacheName": _SERIALIZER.url("cache_name", cache_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2520,24 +2412,22 @@ def build_caches_create_or_update_request(
return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-def build_caches_update_request(
- resource_group_name: str, account_name: str, pool_name: str, cache_name: str, subscription_id: str, **kwargs: Any
+def build_accounts_update_request(
+ resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "cacheName": _SERIALIZER.url("cache_name", cache_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2553,20 +2443,18 @@ def build_caches_update_request(
return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
-def build_caches_delete_request(
- resource_group_name: str, account_name: str, pool_name: str, cache_name: str, subscription_id: str, **kwargs: Any
+def build_accounts_delete_request(
+ resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "cacheName": _SERIALIZER.url("cache_name", cache_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2577,22 +2465,20 @@ def build_caches_delete_request(
return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-def build_caches_list_by_capacity_pools_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
+def build_accounts_list_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches"
+ _url = (
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts"
+ )
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2606,23 +2492,19 @@ def build_caches_list_by_capacity_pools_request( # pylint: disable=name-too-lon
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_caches_list_peering_passphrases_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, pool_name: str, cache_name: str, subscription_id: str, **kwargs: Any
+def build_accounts_list_by_subscription_request( # pylint: disable=name-too-long
+ subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/listPeeringPassphrases"
+ _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/netAppAccounts"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "cacheName": _SERIALIZER.url("cache_name", cache_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2633,27 +2515,21 @@ def build_caches_list_peering_passphrases_request( # pylint: disable=name-too-l
# Construct headers
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_caches_pool_change_request(
- resource_group_name: str, account_name: str, pool_name: str, cache_name: str, subscription_id: str, **kwargs: Any
+def build_accounts_renew_credentials_request(
+ resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/poolChange"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/renewCredentials"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "cacheName": _SERIALIZER.url("cache_name", cache_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2661,25 +2537,19 @@ def build_caches_pool_change_request(
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="POST", url=_url, params=_params, **kwargs)
-def build_elastic_accounts_get_request(
+def build_accounts_transition_to_cmk_request(
resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/transitiontocmk"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
@@ -2692,23 +2562,23 @@ def build_elastic_accounts_get_request(
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_accounts_create_or_update_request( # pylint: disable=name-too-long
+def build_accounts_get_change_key_vault_information_request( # pylint: disable=name-too-long
resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/getKeyVaultStatus"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
@@ -2721,25 +2591,21 @@ def build_elastic_accounts_create_or_update_request( # pylint: disable=name-too
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_accounts_update_request(
+def build_accounts_change_key_vault_request(
resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/changeKeyVault"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
@@ -2754,19 +2620,20 @@ def build_elastic_accounts_update_request(
# Construct headers
if content_type is not None:
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_accounts_delete_request(
+def build_backups_under_account_migrate_backups_request( # pylint: disable=name-too-long
resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/migrateBackups"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
@@ -2778,25 +2645,29 @@ def build_elastic_accounts_delete_request(
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
+ # Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_accounts_list_by_resource_group_request( # pylint: disable=name-too-long
- resource_group_name: str, subscription_id: str, **kwargs: Any
+def build_pools_get_request(
+ resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = (
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts"
- )
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "accountName": _SERIALIZER.url("account_name", account_name, "str"),
+ "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2810,19 +2681,23 @@ def build_elastic_accounts_list_by_resource_group_request( # pylint: disable=na
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_accounts_list_by_subscription_request( # pylint: disable=name-too-long
- subscription_id: str, **kwargs: Any
+def build_pools_create_or_update_request(
+ resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/elasticAccounts"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "accountName": _SERIALIZER.url("account_name", account_name, "str"),
+ "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2831,22 +2706,25 @@ def build_elastic_accounts_list_by_subscription_request( # pylint: disable=name
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_capacity_pools_get_request(
+def build_pools_update_request(
resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
@@ -2860,23 +2738,21 @@ def build_elastic_capacity_pools_get_request(
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_capacity_pools_create_or_update_request( # pylint: disable=name-too-long
+def build_pools_delete_request(
resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
@@ -2889,80 +2765,20 @@ def build_elastic_capacity_pools_create_or_update_request( # pylint: disable=na
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-def build_elastic_capacity_pools_update_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
+def build_pools_list_request(
+ resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_elastic_capacity_pools_delete_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-
-
-def build_elastic_capacity_pools_list_by_elastic_account_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
@@ -2980,23 +2796,27 @@ def build_elastic_capacity_pools_list_by_elastic_account_request( # pylint: dis
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_capacity_pools_change_zone_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
+def build_backups_under_backup_vault_restore_files_request( # pylint: disable=name-too-long
+ resource_group_name: str,
+ account_name: str,
+ backup_vault_name: str,
+ backup_name: str,
+ subscription_id: str,
+ **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/changeZone"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}/restoreFiles"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
+ "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"),
+ "backupName": _SERIALIZER.url("backup_name", backup_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3007,28 +2827,26 @@ def build_elastic_capacity_pools_change_zone_request( # pylint: disable=name-to
# Construct headers
if content_type is not None:
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_capacity_pools_check_volume_file_path_availability_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
+def build_backups_under_volume_migrate_backups_request( # pylint: disable=name-too-long
+ resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/checkVolumeFilePathAvailability"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/migrateBackups"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"accountName": _SERIALIZER.url("account_name", account_name, "str"),
"poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
+ "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3039,28 +2857,34 @@ def build_elastic_capacity_pools_check_volume_file_path_availability_request( #
# Construct headers
if content_type is not None:
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_volumes_get_request(
- resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any
+def build_subvolumes_get_request(
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ subvolume_name: str,
+ subscription_id: str,
+ **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"accountName": _SERIALIZER.url("account_name", account_name, "str"),
"poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
"volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
+ "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3074,24 +2898,31 @@ def build_elastic_volumes_get_request(
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_volumes_create_or_update_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any
+def build_subvolumes_create_request(
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ subvolume_name: str,
+ subscription_id: str,
+ **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"accountName": _SERIALIZER.url("account_name", account_name, "str"),
"poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
"volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
+ "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3107,24 +2938,31 @@ def build_elastic_volumes_create_or_update_request( # pylint: disable=name-too-
return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_volumes_update_request(
- resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any
+def build_subvolumes_update_request(
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ subvolume_name: str,
+ subscription_id: str,
+ **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"accountName": _SERIALIZER.url("account_name", account_name, "str"),
"poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
"volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
+ "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3140,20 +2978,27 @@ def build_elastic_volumes_update_request(
return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_volumes_delete_request(
- resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any
+def build_subvolumes_delete_request(
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ subvolume_name: str,
+ subscription_id: str,
+ **kwargs: Any
) -> HttpRequest:
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"accountName": _SERIALIZER.url("account_name", account_name, "str"),
"poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
"volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
+ "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3164,22 +3009,23 @@ def build_elastic_volumes_delete_request(
return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-def build_elastic_volumes_list_by_elastic_pool_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
+def build_subvolumes_list_by_volume_request(
+ resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"accountName": _SERIALIZER.url("account_name", account_name, "str"),
"poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
+ "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3193,24 +3039,30 @@ def build_elastic_volumes_list_by_elastic_pool_request( # pylint: disable=name-
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_volumes_revert_request(
- resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any
+def build_subvolumes_get_metadata_request(
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ subvolume_name: str,
+ subscription_id: str,
+ **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/revert"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}/getMetadata"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"accountName": _SERIALIZER.url("account_name", account_name, "str"),
"poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
"volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
+ "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3219,37 +3071,26 @@ def build_elastic_volumes_revert_request(
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_snapshots_get_request(
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- subscription_id: str,
- **kwargs: Any
+def build_net_app_resource_check_name_availability_request( # pylint: disable=name-too-long
+ location: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}"
+ _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- "snapshotName": _SERIALIZER.url("snapshot_name", snapshot_name, "str"),
+ "location": _SERIALIZER.url("location", location, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3258,36 +3099,28 @@ def build_elastic_snapshots_get_request(
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_snapshots_create_or_update_request( # pylint: disable=name-too-long
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- subscription_id: str,
- **kwargs: Any
+def build_net_app_resource_check_file_path_availability_request( # pylint: disable=name-too-long
+ location: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}"
+ _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- "snapshotName": _SERIALIZER.url("snapshot_name", snapshot_name, "str"),
+ "location": _SERIALIZER.url("location", location, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3300,30 +3133,24 @@ def build_elastic_snapshots_create_or_update_request( # pylint: disable=name-to
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_snapshots_delete_request(
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- subscription_id: str,
- **kwargs: Any
+def build_net_app_resource_check_quota_availability_request( # pylint: disable=name-too-long
+ location: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
+ accept = _headers.pop("Accept", "application/json")
+
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}"
+ _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkQuotaAvailability"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- "snapshotName": _SERIALIZER.url("snapshot_name", snapshot_name, "str"),
+ "location": _SERIALIZER.url("location", location, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3331,26 +3158,28 @@ def build_elastic_snapshots_delete_request(
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
+ # Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_snapshots_list_by_elastic_volume_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any
+def build_net_app_resource_query_region_info_request( # pylint: disable=name-too-long
+ location: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots"
+ _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfo"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
+ "location": _SERIALIZER.url("location", location, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3364,22 +3193,21 @@ def build_elastic_snapshots_list_by_elastic_volume_request( # pylint: disable=n
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_snapshot_policies_get_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, snapshot_policy_name: str, subscription_id: str, **kwargs: Any
+def build_net_app_resource_query_network_sibling_set_request( # pylint: disable=name-too-long
+ location: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}"
+ _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/queryNetworkSiblingSet"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "snapshotPolicyName": _SERIALIZER.url("snapshot_policy_name", snapshot_policy_name, "str"),
+ "location": _SERIALIZER.url("location", location, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3388,28 +3216,28 @@ def build_elastic_snapshot_policies_get_request( # pylint: disable=name-too-lon
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_snapshot_policies_create_or_update_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, snapshot_policy_name: str, subscription_id: str, **kwargs: Any
+def build_net_app_resource_update_network_sibling_set_request( # pylint: disable=name-too-long
+ location: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}"
+ _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/updateNetworkSiblingSet"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "snapshotPolicyName": _SERIALIZER.url("snapshot_policy_name", snapshot_policy_name, "str"),
+ "location": _SERIALIZER.url("location", location, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3422,26 +3250,23 @@ def build_elastic_snapshot_policies_create_or_update_request( # pylint: disable
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_snapshot_policies_update_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, snapshot_policy_name: str, subscription_id: str, **kwargs: Any
+def build_net_app_resource_usages_list_request( # pylint: disable=name-too-long
+ location: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}"
+ _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/usages"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "snapshotPolicyName": _SERIALIZER.url("snapshot_policy_name", snapshot_policy_name, "str"),
+ "location": _SERIALIZER.url("location", location, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3450,253 +3275,26 @@ def build_elastic_snapshot_policies_update_request( # pylint: disable=name-too-
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_snapshot_policies_delete_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, snapshot_policy_name: str, subscription_id: str, **kwargs: Any
+def build_net_app_resource_usages_get_request( # pylint: disable=name-too-long
+ location: str, usage_type: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-12-01"))
+ accept = _headers.pop("Accept", "application/json")
+
# Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}"
+ _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/usages/{usageType}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "snapshotPolicyName": _SERIALIZER.url("snapshot_policy_name", snapshot_policy_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-
-
-def build_elastic_snapshot_policies_list_by_elastic_account_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_elastic_snapshot_policies_list_elastic_volumes_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, snapshot_policy_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}/elasticvolumes"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "snapshotPolicyName": _SERIALIZER.url("snapshot_policy_name", snapshot_policy_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_elastic_backup_vaults_get_request(
- resource_group_name: str, account_name: str, backup_vault_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_elastic_backup_vaults_create_or_update_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, backup_vault_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_elastic_backup_vaults_update_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, backup_vault_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_elastic_backup_vaults_delete_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, backup_vault_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-
-
-def build_elastic_backup_vaults_list_by_elastic_account_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_elastic_backup_policies_get_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, backup_policy_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, "str"),
+ "location": _SERIALIZER.url("location", location, "str"),
+ "usageType": _SERIALIZER.url("usage_type", usage_type, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3710,12227 +3308,35 @@ def build_elastic_backup_policies_get_request( # pylint: disable=name-too-long
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_elastic_backup_policies_create_or_update_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, backup_policy_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_elastic_backup_policies_update_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, backup_policy_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+class Operations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_elastic_backup_policies_delete_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, backup_policy_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-
-
-def build_elastic_backup_policies_list_by_elastic_account_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_elastic_backups_get_request(
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- subscription_id: str,
- **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"),
- "backupName": _SERIALIZER.url("backup_name", backup_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_elastic_backups_create_or_update_request( # pylint: disable=name-too-long
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- subscription_id: str,
- **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"),
- "backupName": _SERIALIZER.url("backup_name", backup_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_elastic_backups_update_request(
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- subscription_id: str,
- **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"),
- "backupName": _SERIALIZER.url("backup_name", backup_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_elastic_backups_delete_request(
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- subscription_id: str,
- **kwargs: Any
-) -> HttpRequest:
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"),
- "backupName": _SERIALIZER.url("backup_name", backup_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-
-
-def build_elastic_backups_list_by_vault_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, backup_vault_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_active_directory_configs_get_request( # pylint: disable=name-too-long
- resource_group_name: str, active_directory_config_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "activeDirectoryConfigName": _SERIALIZER.url(
- "active_directory_config_name", active_directory_config_name, "str"
- ),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_active_directory_configs_create_or_update_request( # pylint: disable=name-too-long
- resource_group_name: str, active_directory_config_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "activeDirectoryConfigName": _SERIALIZER.url(
- "active_directory_config_name", active_directory_config_name, "str"
- ),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_active_directory_configs_update_request( # pylint: disable=name-too-long
- resource_group_name: str, active_directory_config_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "activeDirectoryConfigName": _SERIALIZER.url(
- "active_directory_config_name", active_directory_config_name, "str"
- ),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_active_directory_configs_delete_request( # pylint: disable=name-too-long
- resource_group_name: str, active_directory_config_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "activeDirectoryConfigName": _SERIALIZER.url(
- "active_directory_config_name", active_directory_config_name, "str"
- ),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-
-
-def build_active_directory_configs_list_by_resource_group_request( # pylint: disable=name-too-long
- resource_group_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_active_directory_configs_list_by_subscription_request( # pylint: disable=name-too-long
- subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/activeDirectoryConfigs"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_net_app_resource_quota_limits_get_request( # pylint: disable=name-too-long
- location: str, quota_limit_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = (
- "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits/{quotaLimitName}"
- )
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "str"),
- "quotaLimitName": _SERIALIZER.url("quota_limit_name", quota_limit_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_net_app_resource_quota_limits_list_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_net_app_resource_region_infos_get_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos/default"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_net_app_resource_region_infos_list_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_accounts_get_request(
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_accounts_create_or_update_request(
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_accounts_update_request(
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_accounts_delete_request(
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-
-
-def build_accounts_list_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = (
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts"
- )
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_accounts_list_by_subscription_request( # pylint: disable=name-too-long
- subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/netAppAccounts"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_accounts_renew_credentials_request(
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/renewCredentials"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, **kwargs)
-
-
-def build_accounts_transition_to_cmk_request(
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/transitiontocmk"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_accounts_get_change_key_vault_information_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/getKeyVaultStatus"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_accounts_change_key_vault_request(
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/changeKeyVault"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_backups_under_account_migrate_backups_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/migrateBackups"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_pools_get_request(
- resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_pools_create_or_update_request(
- resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_pools_update_request(
- resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_pools_delete_request(
- resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-
-
-def build_pools_list_request(
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_backups_under_backup_vault_restore_files_request( # pylint: disable=name-too-long
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- subscription_id: str,
- **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}/restoreFiles"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "backupVaultName": _SERIALIZER.url("backup_vault_name", backup_vault_name, "str"),
- "backupName": _SERIALIZER.url("backup_name", backup_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_backups_under_volume_migrate_backups_request( # pylint: disable=name-too-long
- resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/migrateBackups"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_subvolumes_get_request(
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- subvolume_name: str,
- subscription_id: str,
- **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_subvolumes_create_request(
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- subvolume_name: str,
- subscription_id: str,
- **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_subvolumes_update_request(
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- subvolume_name: str,
- subscription_id: str,
- **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_subvolumes_delete_request(
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- subvolume_name: str,
- subscription_id: str,
- **kwargs: Any
-) -> HttpRequest:
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-
-
-def build_subvolumes_list_by_volume_request(
- resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_subvolumes_get_metadata_request(
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- subvolume_name: str,
- subscription_id: str,
- **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}/getMetadata"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
- "accountName": _SERIALIZER.url("account_name", account_name, "str"),
- "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
- "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
- "subvolumeName": _SERIALIZER.url("subvolume_name", subvolume_name, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_net_app_resource_check_name_availability_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_net_app_resource_check_file_path_availability_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_net_app_resource_check_quota_availability_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkQuotaAvailability"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_net_app_resource_query_region_info_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfo"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_net_app_resource_query_network_sibling_set_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/queryNetworkSiblingSet"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_net_app_resource_update_network_sibling_set_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/updateNetworkSiblingSet"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- if content_type is not None:
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_net_app_resource_usages_list_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/usages"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-def build_net_app_resource_usages_get_request( # pylint: disable=name-too-long
- location: str, usage_type: str, subscription_id: str, **kwargs: Any
-) -> HttpRequest:
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
-
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/usages/{usageType}"
- path_format_arguments = {
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "str"),
- "usageType": _SERIALIZER.url("usage_type", usage_type, "str"),
- }
-
- _url: str = _url.format(**path_format_arguments) # type: ignore
-
- # Construct parameters
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
-
- # Construct headers
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
-
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-class Operations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`operations` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace
- def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]:
- """List the operations for the provider.
-
- :return: An iterator like instance of Operation
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Operation]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_operations_list_request(
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
-
- def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(get_next, extract_data)
-
-
-class NetAppResourceQuotaLimitsAccountOperations: # pylint: disable=name-too-long
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`net_app_resource_quota_limits_account` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "quota_limit_name",
- "accept",
- ]
- },
- api_versions_list=[
- "2025-07-01-preview",
- "2025-08-01",
- "2025-08-01-preview",
- "2025-09-01",
- "2025-09-01-preview",
- ],
- )
- def get(
- self, resource_group_name: str, account_name: str, quota_limit_name: str, **kwargs: Any
- ) -> _models.QuotaItem:
- """Get the default, current and usages account quota limit.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param quota_limit_name: The name of the Quota Limit. Required.
- :type quota_limit_name: str
- :return: QuotaItem. The QuotaItem is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.QuotaItem
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.QuotaItem] = kwargs.pop("cls", None)
-
- _request = build_net_app_resource_quota_limits_account_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- quota_limit_name=quota_limit_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.QuotaItem, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"]
- },
- api_versions_list=[
- "2025-07-01-preview",
- "2025-08-01",
- "2025-08-01-preview",
- "2025-09-01",
- "2025-09-01-preview",
- ],
- )
- def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.QuotaItem"]:
- """Gets a list of quota limits for all quotas that are under account. Currently PoolsPerAccount is
- the only one.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :return: An iterator like instance of QuotaItem
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.QuotaItem]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.QuotaItem]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_net_app_resource_quota_limits_account_list_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.QuotaItem], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
-
- def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(get_next, extract_data)
-
-
-class VolumeGroupsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`volume_groups` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace
- def get(
- self, resource_group_name: str, account_name: str, volume_group_name: str, **kwargs: Any
- ) -> _models.VolumeGroupDetails:
- """Get details of the specified volume group.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param volume_group_name: The name of the volumeGroup. Required.
- :type volume_group_name: str
- :return: VolumeGroupDetails. The VolumeGroupDetails is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.VolumeGroupDetails
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.VolumeGroupDetails] = kwargs.pop("cls", None)
-
- _request = build_volume_groups_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- volume_group_name=volume_group_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.VolumeGroupDetails, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- def _create_initial(
- self,
- resource_group_name: str,
- account_name: str,
- volume_group_name: str,
- body: Union[_models.VolumeGroupDetails, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_volume_groups_create_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- volume_group_name=volume_group_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [201]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- volume_group_name: str,
- body: _models.VolumeGroupDetails,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.VolumeGroupDetails]:
- """Create a volume group along with specified volumes.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param volume_group_name: The name of the volumeGroup. Required.
- :type volume_group_name: str
- :param body: Volume Group object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.VolumeGroupDetails
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- volume_group_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.VolumeGroupDetails]:
- """Create a volume group along with specified volumes.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param volume_group_name: The name of the volumeGroup. Required.
- :type volume_group_name: str
- :param body: Volume Group object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- volume_group_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.VolumeGroupDetails]:
- """Create a volume group along with specified volumes.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param volume_group_name: The name of the volumeGroup. Required.
- :type volume_group_name: str
- :param body: Volume Group object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- volume_group_name: str,
- body: Union[_models.VolumeGroupDetails, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.VolumeGroupDetails]:
- """Create a volume group along with specified volumes.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param volume_group_name: The name of the volumeGroup. Required.
- :type volume_group_name: str
- :param body: Volume Group object supplied in the body of the operation. Is one of the following
- types: VolumeGroupDetails, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.VolumeGroupDetails or JSON or IO[bytes]
- :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.VolumeGroupDetails] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._create_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- volume_group_name=volume_group_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response_headers = {}
- response = pipeline_response.http_response
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = _deserialize(_models.VolumeGroupDetails, response.json())
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.VolumeGroupDetails].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.VolumeGroupDetails](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _delete_initial(
- self, resource_group_name: str, account_name: str, volume_group_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volume_groups_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- volume_group_name=volume_group_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202, 204]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_delete(
- self, resource_group_name: str, account_name: str, volume_group_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Delete the specified volume group only if there are no volumes under volume group.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param volume_group_name: The name of the volumeGroup. Required.
- :type volume_group_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- volume_group_name=volume_group_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- def list_by_net_app_account(
- self, resource_group_name: str, account_name: str, **kwargs: Any
- ) -> ItemPaged["_models.VolumeGroup"]:
- """List all volume groups for given account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :return: An iterator like instance of VolumeGroup
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.VolumeGroup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.VolumeGroup]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_volume_groups_list_by_net_app_account_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.VolumeGroup], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
-
- def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(get_next, extract_data)
-
-
-class BackupsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`backups` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace
- def get(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
- ) -> _models.Backup:
- """Get the specified Backup under Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_vault_name: The name of the Backup Vault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the backup. Required.
- :type backup_name: str
- :return: Backup. The Backup is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.Backup
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.Backup] = kwargs.pop("cls", None)
-
- _request = build_backups_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.Backup, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- def _create_initial(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Union[_models.Backup, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_backups_create_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: _models.Backup,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Create a backup under the Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_vault_name: The name of the Backup Vault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the backup. Required.
- :type backup_name: str
- :param body: Backup object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.Backup
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Backup. The Backup is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Create a backup under the Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_vault_name: The name of the Backup Vault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the backup. Required.
- :type backup_name: str
- :param body: Backup object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Backup. The Backup is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Create a backup under the Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_vault_name: The name of the Backup Vault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the backup. Required.
- :type backup_name: str
- :param body: Backup object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Backup. The Backup is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Union[_models.Backup, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Create a backup under the Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_vault_name: The name of the Backup Vault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the backup. Required.
- :type backup_name: str
- :param body: Backup object supplied in the body of the operation. Is one of the following
- types: Backup, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.Backup or JSON or IO[bytes]
- :return: An instance of LROPoller that returns Backup. The Backup is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.Backup] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._create_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.Backup, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.Backup].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.Backup](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Optional[Union[_models.BackupPatch, JSON, IO[bytes]]] = None,
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- content_type = content_type if body else None
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json" if body else None
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- if body is not None:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- else:
- _content = None
-
- _request = build_backups_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Optional[_models.BackupPatch] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Patch a Backup under the Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_vault_name: The name of the Backup Vault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the backup. Required.
- :type backup_name: str
- :param body: Backup object supplied in the body of the operation. Default value is None.
- :type body: ~azure.mgmt.netapp.models.BackupPatch
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Backup. The Backup is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Optional[JSON] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Patch a Backup under the Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_vault_name: The name of the Backup Vault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the backup. Required.
- :type backup_name: str
- :param body: Backup object supplied in the body of the operation. Default value is None.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Backup. The Backup is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Optional[IO[bytes]] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Patch a Backup under the Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_vault_name: The name of the Backup Vault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the backup. Required.
- :type backup_name: str
- :param body: Backup object supplied in the body of the operation. Default value is None.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Backup. The Backup is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Optional[Union[_models.BackupPatch, JSON, IO[bytes]]] = None,
- **kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Patch a Backup under the Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_vault_name: The name of the Backup Vault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the backup. Required.
- :type backup_name: str
- :param body: Backup object supplied in the body of the operation. Is one of the following
- types: BackupPatch, JSON, IO[bytes] Default value is None.
- :type body: ~azure.mgmt.netapp.models.BackupPatch or JSON or IO[bytes]
- :return: An instance of LROPoller that returns Backup. The Backup is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- content_type = content_type if body else None
- cls: ClsType[_models.Backup] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.Backup, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.Backup].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.Backup](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _delete_initial(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_backups_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_delete(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Delete a Backup under the Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_vault_name: The name of the Backup Vault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the backup. Required.
- :type backup_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- def list_by_vault(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- *,
- filter: Optional[str] = None,
- **kwargs: Any
- ) -> ItemPaged["_models.Backup"]:
- """List all backups Under a Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_vault_name: The name of the Backup Vault. Required.
- :type backup_vault_name: str
- :keyword filter: An option to specify the VolumeResourceId. If present, then only returns the
- backups under the specified volume. Default value is None.
- :paramtype filter: str
- :return: An iterator like instance of Backup
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Backup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.Backup]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_backups_list_by_vault_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- subscription_id=self._config.subscription_id,
- filter=filter,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.Backup], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
-
- def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(get_next, extract_data)
-
- @distributed_trace
- def get_latest_status(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> _models.BackupStatus:
- """Get the latest status of the backup for a volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: BackupStatus. The BackupStatus is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.BackupStatus
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.BackupStatus] = kwargs.pop("cls", None)
-
- _request = build_backups_get_latest_status_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.BackupStatus, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def get_volume_latest_restore_status(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> _models.RestoreStatus:
- """Get the latest status of the restore for a volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: RestoreStatus. The RestoreStatus is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.RestoreStatus
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.RestoreStatus] = kwargs.pop("cls", None)
-
- _request = build_backups_get_volume_latest_restore_status_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.RestoreStatus, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
-
-class VolumesOperations: # pylint: disable=too-many-public-methods
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`volumes` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace
- def get(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> _models.Volume:
- """Get the details of the specified volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: Volume. The Volume is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.Volume
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.Volume] = kwargs.pop("cls", None)
-
- _request = build_volumes_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.Volume, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.Volume, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_volumes_create_or_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: _models.Volume,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """Create or update the specified volume within the capacity pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Volume object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.Volume
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Volume. The Volume is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """Create or update the specified volume within the capacity pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Volume object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Volume. The Volume is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """Create or update the specified volume within the capacity pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Volume object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Volume. The Volume is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.Volume, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """Create or update the specified volume within the capacity pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Volume object supplied in the body of the operation. Is one of the following
- types: Volume, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.Volume or JSON or IO[bytes]
- :return: An instance of LROPoller that returns Volume. The Volume is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.Volume] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._create_or_update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.Volume, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.Volume].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.Volume](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.VolumePatch, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_volumes_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: _models.VolumePatch,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """Patch the specified volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Volume object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.VolumePatch
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Volume. The Volume is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """Patch the specified volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Volume object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Volume. The Volume is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """Patch the specified volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Volume object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Volume. The Volume is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.VolumePatch, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """Patch the specified volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Volume object supplied in the body of the operation. Is one of the following
- types: VolumePatch, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.VolumePatch or JSON or IO[bytes]
- :return: An instance of LROPoller that returns Volume. The Volume is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.Volume] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.Volume, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.Volume].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.Volume](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _delete_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- *,
- force_delete: Optional[bool] = None,
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volumes_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- force_delete=force_delete,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_delete(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- *,
- force_delete: Optional[bool] = None,
- **kwargs: Any
- ) -> LROPoller[None]:
- """Delete the specified volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :keyword force_delete: An option to force delete the volume. Will cleanup resources connected
- to the particular volume. Default value is None.
- :paramtype force_delete: bool
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- force_delete=force_delete,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- def list(
- self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any
- ) -> ItemPaged["_models.Volume"]:
- """List all volumes within the capacity pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :return: An iterator like instance of Volume
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Volume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.Volume]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_volumes_list_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.Volume], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
-
- def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(get_next, extract_data)
-
- def _populate_availability_zone_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volumes_populate_availability_zone_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_populate_availability_zone(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """This operation will populate availability zone information for a volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An instance of LROPoller that returns Volume. The Volume is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.Volume] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._populate_availability_zone_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response_headers = {}
- response = pipeline_response.http_response
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = _deserialize(_models.Volume, response.json())
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.Volume].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.Volume](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _revert_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.VolumeRevert, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_volumes_revert_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_revert(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: _models.VolumeRevert,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Revert a volume to the snapshot specified in the body.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Object for snapshot to revert supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.VolumeRevert
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_revert(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Revert a volume to the snapshot specified in the body.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Object for snapshot to revert supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_revert(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Revert a volume to the snapshot specified in the body.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Object for snapshot to revert supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_revert(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.VolumeRevert, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[None]:
- """Revert a volume to the snapshot specified in the body.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Object for snapshot to revert supplied in the body of the operation. Is one of the
- following types: VolumeRevert, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.VolumeRevert or JSON or IO[bytes]
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._revert_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- def _reset_cifs_password_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volumes_reset_cifs_password_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_reset_cifs_password(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Reset cifs password from volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._reset_cifs_password_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- def _split_clone_from_parent_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volumes_split_clone_from_parent_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_split_clone_from_parent(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """Split operation to convert clone volume to an independent volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An instance of LROPoller that returns Volume. The Volume is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.Volume] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._split_clone_from_parent_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response_headers = {}
- response = pipeline_response.http_response
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = _deserialize(_models.Volume, response.json())
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.Volume].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.Volume](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _break_file_locks_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[Union[_models.BreakFileLocksRequest, JSON, IO[bytes]]] = None,
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- content_type = content_type if body else None
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json" if body else None
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- if body is not None:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- else:
- _content = None
-
- _request = build_volumes_break_file_locks_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_break_file_locks(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[_models.BreakFileLocksRequest] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Break all the file locks on a volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Optional body to provide the ability to clear file locks with selected options.
- Default value is None.
- :type body: ~azure.mgmt.netapp.models.BreakFileLocksRequest
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_break_file_locks(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[JSON] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Break all the file locks on a volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Optional body to provide the ability to clear file locks with selected options.
- Default value is None.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_break_file_locks(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[IO[bytes]] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Break all the file locks on a volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Optional body to provide the ability to clear file locks with selected options.
- Default value is None.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_break_file_locks(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[Union[_models.BreakFileLocksRequest, JSON, IO[bytes]]] = None,
- **kwargs: Any
- ) -> LROPoller[None]:
- """Break all the file locks on a volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Optional body to provide the ability to clear file locks with selected options. Is
- one of the following types: BreakFileLocksRequest, JSON, IO[bytes] Default value is None.
- :type body: ~azure.mgmt.netapp.models.BreakFileLocksRequest or JSON or IO[bytes]
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- content_type = content_type if body else None
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._break_file_locks_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @api_version_validation(
- method_added_on="2025-08-01",
- params_added_on={
- "2025-08-01": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
- )
- def _list_get_group_id_list_for_ldap_user_initial( # pylint: disable=name-too-long
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.GetGroupIdListForLDAPUserRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_volumes_list_get_group_id_list_for_ldap_user_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: _models.GetGroupIdListForLDAPUserRequest,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]:
- """Returns the list of group Ids for a specific LDAP User.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Returns group Id list for a specific LDAP user. Required.
- :type body: ~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserRequest
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The
- GetGroupIdListForLDAPUserResponse is compatible with MutableMapping
- :rtype:
- ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]:
- """Returns the list of group Ids for a specific LDAP User.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Returns group Id list for a specific LDAP user. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The
- GetGroupIdListForLDAPUserResponse is compatible with MutableMapping
- :rtype:
- ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]:
- """Returns the list of group Ids for a specific LDAP User.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Returns group Id list for a specific LDAP user. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The
- GetGroupIdListForLDAPUserResponse is compatible with MutableMapping
- :rtype:
- ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-08-01",
- params_added_on={
- "2025-08-01": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
- )
- def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.GetGroupIdListForLDAPUserRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]:
- """Returns the list of group Ids for a specific LDAP User.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Returns group Id list for a specific LDAP user. Is one of the following types:
- GetGroupIdListForLDAPUserRequest, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserRequest or JSON or IO[bytes]
- :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The
- GetGroupIdListForLDAPUserResponse is compatible with MutableMapping
- :rtype:
- ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.GetGroupIdListForLDAPUserResponse] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._list_get_group_id_list_for_ldap_user_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response_headers = {}
- response = pipeline_response.http_response
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = _deserialize(_models.GetGroupIdListForLDAPUserResponse, response.json())
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.GetGroupIdListForLDAPUserResponse].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.GetGroupIdListForLDAPUserResponse](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _break_replication_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[Union[_models.BreakReplicationRequest, JSON, IO[bytes]]] = None,
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- content_type = content_type if body else None
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json" if body else None
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- if body is not None:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- else:
- _content = None
-
- _request = build_volumes_break_replication_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_break_replication(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[_models.BreakReplicationRequest] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Break the replication connection on the destination volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Optional body to force break the replication. Default value is None.
- :type body: ~azure.mgmt.netapp.models.BreakReplicationRequest
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_break_replication(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[JSON] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Break the replication connection on the destination volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Optional body to force break the replication. Default value is None.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_break_replication(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[IO[bytes]] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Break the replication connection on the destination volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Optional body to force break the replication. Default value is None.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_break_replication(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[Union[_models.BreakReplicationRequest, JSON, IO[bytes]]] = None,
- **kwargs: Any
- ) -> LROPoller[None]:
- """Break the replication connection on the destination volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Optional body to force break the replication. Is one of the following types:
- BreakReplicationRequest, JSON, IO[bytes] Default value is None.
- :type body: ~azure.mgmt.netapp.models.BreakReplicationRequest or JSON or IO[bytes]
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- content_type = content_type if body else None
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._break_replication_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- def _reestablish_replication_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.ReestablishReplicationRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_volumes_reestablish_replication_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_reestablish_replication(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: _models.ReestablishReplicationRequest,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or
- policy-based snapshots.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: body for the id of the source volume. Required.
- :type body: ~azure.mgmt.netapp.models.ReestablishReplicationRequest
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_reestablish_replication(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or
- policy-based snapshots.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: body for the id of the source volume. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_reestablish_replication(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or
- policy-based snapshots.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: body for the id of the source volume. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_reestablish_replication(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.ReestablishReplicationRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[None]:
- """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or
- policy-based snapshots.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: body for the id of the source volume. Is one of the following types:
- ReestablishReplicationRequest, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ReestablishReplicationRequest or JSON or IO[bytes]
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._reestablish_replication_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- def replication_status(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> _models.ReplicationStatus:
- """Get the status of the replication.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: ReplicationStatus. The ReplicationStatus is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ReplicationStatus
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ReplicationStatus] = kwargs.pop("cls", None)
-
- _request = build_volumes_replication_status_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ReplicationStatus, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def list_replications(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[_models.ListReplicationsRequest] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> ItemPaged["_models.Replication"]:
- """List all replications for a specified volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: The content of the action request. Default value is None.
- :type body: ~azure.mgmt.netapp.models.ListReplicationsRequest
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An iterator like instance of Replication
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def list_replications(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[JSON] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> ItemPaged["_models.Replication"]:
- """List all replications for a specified volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: The content of the action request. Default value is None.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An iterator like instance of Replication
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def list_replications(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[IO[bytes]] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> ItemPaged["_models.Replication"]:
- """List all replications for a specified volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: The content of the action request. Default value is None.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An iterator like instance of Replication
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-08-01",
- params_added_on={
- "2025-08-01": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
- )
- def list_replications(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[Union[_models.ListReplicationsRequest, JSON, IO[bytes]]] = None,
- **kwargs: Any
- ) -> ItemPaged["_models.Replication"]:
- """List all replications for a specified volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: The content of the action request. Is one of the following types:
- ListReplicationsRequest, JSON, IO[bytes] Default value is None.
- :type body: ~azure.mgmt.netapp.models.ListReplicationsRequest or JSON or IO[bytes]
- :return: An iterator like instance of Replication
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- content_type = content_type if body else None
- cls: ClsType[List[_models.Replication]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
- content_type = content_type or "application/json" if body else None
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- if body is not None:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- else:
- _content = None
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_volumes_list_replications_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.Replication], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
-
- def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(get_next, extract_data)
-
- def _resync_replication_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volumes_resync_replication_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_resync_replication(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Resync the connection on the destination volume. If the operation is ran on the source volume
- it will reverse-resync the connection and sync from destination to source.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._resync_replication_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- def _delete_replication_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volumes_delete_replication_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_delete_replication(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Delete the replication connection on the destination volume, and send release to the source
- replication.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._delete_replication_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- def _authorize_replication_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.AuthorizeRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_volumes_authorize_replication_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_authorize_replication(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: _models.AuthorizeRequest,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Authorize the replication connection on the source volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Authorize request object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.AuthorizeRequest
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_authorize_replication(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Authorize the replication connection on the source volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Authorize request object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_authorize_replication(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Authorize the replication connection on the source volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Authorize request object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_authorize_replication(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.AuthorizeRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[None]:
- """Authorize the replication connection on the source volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Authorize request object supplied in the body of the operation. Is one of the
- following types: AuthorizeRequest, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.AuthorizeRequest or JSON or IO[bytes]
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._authorize_replication_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- def _re_initialize_replication_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volumes_re_initialize_replication_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_re_initialize_replication(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Re-Initializes the replication connection on the destination volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._re_initialize_replication_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- def _peer_external_cluster_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.PeerClusterForVolumeMigrationRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_volumes_peer_external_cluster_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_peer_external_cluster(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: _models.PeerClusterForVolumeMigrationRequest,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.ClusterPeerCommandResponse]:
- """Starts peering the external cluster for this migration volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Cluster peer request object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The
- ClusterPeerCommandResponse is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_peer_external_cluster(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.ClusterPeerCommandResponse]:
- """Starts peering the external cluster for this migration volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Cluster peer request object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The
- ClusterPeerCommandResponse is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_peer_external_cluster(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.ClusterPeerCommandResponse]:
- """Starts peering the external cluster for this migration volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Cluster peer request object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The
- ClusterPeerCommandResponse is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_peer_external_cluster(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.PeerClusterForVolumeMigrationRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.ClusterPeerCommandResponse]:
- """Starts peering the external cluster for this migration volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Cluster peer request object supplied in the body of the operation. Is one of the
- following types: PeerClusterForVolumeMigrationRequest, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The
- ClusterPeerCommandResponse is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ClusterPeerCommandResponse] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._peer_external_cluster_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response_headers = {}
- response = pipeline_response.http_response
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = _deserialize(_models.ClusterPeerCommandResponse, response.json())
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.ClusterPeerCommandResponse].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.ClusterPeerCommandResponse](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _authorize_external_replication_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volumes_authorize_external_replication_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_authorize_external_replication(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> LROPoller[_models.SvmPeerCommandResponse]:
- """Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once
- the SVM have been peered a SnapMirror will be created.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An instance of LROPoller that returns SvmPeerCommandResponse. The
- SvmPeerCommandResponse is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SvmPeerCommandResponse]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.SvmPeerCommandResponse] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._authorize_external_replication_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response_headers = {}
- response = pipeline_response.http_response
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = _deserialize(_models.SvmPeerCommandResponse, response.json())
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.SvmPeerCommandResponse].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.SvmPeerCommandResponse](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _finalize_external_replication_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volumes_finalize_external_replication_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_finalize_external_replication(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Finalizes the migration of an external volume by releasing the replication and breaking the
- external cluster peering if no other migration is active.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._finalize_external_replication_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- def _perform_replication_transfer_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volumes_perform_replication_transfer_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_perform_replication_transfer(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Performs an adhoc replication transfer on a volume with volumeType Migration.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._perform_replication_transfer_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- def _pool_change_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.PoolChangeRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_volumes_pool_change_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_pool_change(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: _models.PoolChangeRequest,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Moves volume to another pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Move volume to the pool supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.PoolChangeRequest
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_pool_change(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Moves volume to another pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Move volume to the pool supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_pool_change(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Moves volume to another pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Move volume to the pool supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_pool_change(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.PoolChangeRequest, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[None]:
- """Moves volume to another pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Move volume to the pool supplied in the body of the operation. Is one of the
- following types: PoolChangeRequest, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.PoolChangeRequest or JSON or IO[bytes]
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._pool_change_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- def _relocate_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[Union[_models.RelocateVolumeRequest, JSON, IO[bytes]]] = None,
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- content_type = content_type if body else None
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json" if body else None
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- if body is not None:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- else:
- _content = None
-
- _request = build_volumes_relocate_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_relocate(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[_models.RelocateVolumeRequest] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Relocates volume to a new stamp.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Relocate volume request. Default value is None.
- :type body: ~azure.mgmt.netapp.models.RelocateVolumeRequest
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_relocate(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[JSON] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Relocates volume to a new stamp.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Relocate volume request. Default value is None.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_relocate(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[IO[bytes]] = None,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Relocates volume to a new stamp.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Relocate volume request. Default value is None.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_relocate(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[Union[_models.RelocateVolumeRequest, JSON, IO[bytes]]] = None,
- **kwargs: Any
- ) -> LROPoller[None]:
- """Relocates volume to a new stamp.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param body: Relocate volume request. Is one of the following types: RelocateVolumeRequest,
- JSON, IO[bytes] Default value is None.
- :type body: ~azure.mgmt.netapp.models.RelocateVolumeRequest or JSON or IO[bytes]
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- content_type = content_type if body else None
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._relocate_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- def _finalize_relocation_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volumes_finalize_relocation_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_finalize_relocation(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Finalizes the relocation of the volume and cleans up the old volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._finalize_relocation_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- def _revert_relocation_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volumes_revert_relocation_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_revert_relocation(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Reverts the volume relocation process, cleans up the new volume and starts using the
- former-existing volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._revert_relocation_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
- )
- def _list_quota_report_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volumes_list_quota_report_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
- )
- def begin_list_quota_report(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> LROPoller[_models.ListQuotaReportResponse]:
- """A long-running resource action.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An instance of LROPoller that returns ListQuotaReportResponse. The
- ListQuotaReportResponse is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResponse]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ListQuotaReportResponse] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._list_quota_report_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response_headers = {}
- response = pipeline_response.http_response
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = _deserialize(_models.ListQuotaReportResponse, response.json())
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.ListQuotaReportResponse].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.ListQuotaReportResponse](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
-
-class SnapshotsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`snapshots` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace
- def get(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- **kwargs: Any
- ) -> _models.Snapshot:
- """Get details of the specified snapshot.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :return: Snapshot. The Snapshot is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.Snapshot
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None)
-
- _request = build_snapshots_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.Snapshot, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- def _create_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: Union[_models.Snapshot, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_snapshots_create_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [201, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: _models.Snapshot,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Create the specified snapshot within the given volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :param body: Snapshot object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.Snapshot
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Create the specified snapshot within the given volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :param body: Snapshot object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Create the specified snapshot within the given volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :param body: Snapshot object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: Union[_models.Snapshot, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Create the specified snapshot within the given volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :param body: Snapshot object supplied in the body of the operation. Is one of the following
- types: Snapshot, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.Snapshot or JSON or IO[bytes]
- :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._create_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response_headers = {}
- response = pipeline_response.http_response
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = _deserialize(_models.Snapshot, response.json())
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.Snapshot].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.Snapshot](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: Union[_models.SnapshotPatch, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_snapshots_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: _models.SnapshotPatch,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Patch a snapshot.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :param body: Snapshot object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.SnapshotPatch
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Patch a snapshot.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :param body: Snapshot object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Patch a snapshot.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :param body: Snapshot object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: Union[_models.SnapshotPatch, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Patch a snapshot.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :param body: Snapshot object supplied in the body of the operation. Is one of the following
- types: SnapshotPatch, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.SnapshotPatch or JSON or IO[bytes]
- :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.Snapshot, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.Snapshot].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.Snapshot](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _delete_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_snapshots_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202, 204]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_delete(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- **kwargs: Any
- ) -> LROPoller[None]:
- """Delete snapshot.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- def list(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> ItemPaged["_models.Snapshot"]:
- """List all snapshots associated with the volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An iterator like instance of Snapshot
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Snapshot]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_snapshots_list_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.Snapshot], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
-
- def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(get_next, extract_data)
-
- def _restore_files_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: Union[_models.SnapshotRestoreFiles, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_snapshots_restore_files_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_restore_files(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: _models.SnapshotRestoreFiles,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Restore the specified files from the specified snapshot to the active filesystem.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :param body: Restore payload supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.SnapshotRestoreFiles
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_restore_files(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Restore the specified files from the specified snapshot to the active filesystem.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :param body: Restore payload supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_restore_files(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[None]:
- """Restore the specified files from the specified snapshot to the active filesystem.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :param body: Restore payload supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_restore_files(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: Union[_models.SnapshotRestoreFiles, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[None]:
- """Restore the specified files from the specified snapshot to the active filesystem.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param snapshot_name: The name of the snapshot. Required.
- :type snapshot_name: str
- :param body: Restore payload supplied in the body of the operation. Is one of the following
- types: SnapshotRestoreFiles, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.SnapshotRestoreFiles or JSON or IO[bytes]
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._restore_files_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
-
-class SnapshotPoliciesOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`snapshot_policies` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace
- def get(
- self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
- ) -> _models.SnapshotPolicy:
- """Get a snapshot Policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the snapshot policy. Required.
- :type snapshot_policy_name: str
- :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.SnapshotPolicy] = kwargs.pop("cls", None)
-
- _request = build_snapshot_policies_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.SnapshotPolicy, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def create(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: _models.SnapshotPolicy,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> _models.SnapshotPolicy:
- """Create a snapshot policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the snapshot policy. Required.
- :type snapshot_policy_name: str
- :param body: Snapshot policy object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.SnapshotPolicy
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def create(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> _models.SnapshotPolicy:
- """Create a snapshot policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the snapshot policy. Required.
- :type snapshot_policy_name: str
- :param body: Snapshot policy object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def create(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> _models.SnapshotPolicy:
- """Create a snapshot policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the snapshot policy. Required.
- :type snapshot_policy_name: str
- :param body: Snapshot policy object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def create(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: Union[_models.SnapshotPolicy, JSON, IO[bytes]],
- **kwargs: Any
- ) -> _models.SnapshotPolicy:
- """Create a snapshot policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the snapshot policy. Required.
- :type snapshot_policy_name: str
- :param body: Snapshot policy object supplied in the body of the operation. Is one of the
- following types: SnapshotPolicy, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.SnapshotPolicy or JSON or IO[bytes]
- :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.SnapshotPolicy] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_snapshot_policies_create_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.SnapshotPolicy, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: Union[_models.SnapshotPolicyPatch, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_snapshot_policies_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: _models.SnapshotPolicyPatch,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.SnapshotPolicy]:
- """Patch a snapshot policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the snapshot policy. Required.
- :type snapshot_policy_name: str
- :param body: Snapshot policy object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.SnapshotPolicy]:
- """Patch a snapshot policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the snapshot policy. Required.
- :type snapshot_policy_name: str
- :param body: Snapshot policy object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.SnapshotPolicy]:
- """Patch a snapshot policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the snapshot policy. Required.
- :type snapshot_policy_name: str
- :param body: Snapshot policy object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: Union[_models.SnapshotPolicyPatch, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.SnapshotPolicy]:
- """Patch a snapshot policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the snapshot policy. Required.
- :type snapshot_policy_name: str
- :param body: Snapshot policy object supplied in the body of the operation. Is one of the
- following types: SnapshotPolicyPatch, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch or JSON or IO[bytes]
- :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.SnapshotPolicy] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.SnapshotPolicy, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.SnapshotPolicy].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.SnapshotPolicy](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _delete_initial(
- self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_snapshot_policies_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202, 204]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_delete(
- self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Delete snapshot policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the snapshot policy. Required.
- :type snapshot_policy_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.SnapshotPolicy"]:
- """List snapshot policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :return: An iterator like instance of SnapshotPolicy
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.SnapshotPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.SnapshotPolicy]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_snapshot_policies_list_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.SnapshotPolicy], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
-
- def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(get_next, extract_data)
-
- @distributed_trace
- def list_volumes(
- self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
- ) -> _models.SnapshotPolicyVolumeList:
- """Get volumes associated with snapshot policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param snapshot_policy_name: The name of the snapshot policy. Required.
- :type snapshot_policy_name: str
- :return: SnapshotPolicyVolumeList. The SnapshotPolicyVolumeList is compatible with
- MutableMapping
- :rtype: ~azure.mgmt.netapp.models.SnapshotPolicyVolumeList
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.SnapshotPolicyVolumeList] = kwargs.pop("cls", None)
-
- _request = build_snapshot_policies_list_volumes_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.SnapshotPolicyVolumeList, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
-
-class BackupPoliciesOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`backup_policies` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace
- def get(
- self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any
- ) -> _models.BackupPolicy:
- """Get a particular backup Policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
- :type backup_policy_name: str
- :return: BackupPolicy. The BackupPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.BackupPolicy
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.BackupPolicy] = kwargs.pop("cls", None)
-
- _request = build_backup_policies_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.BackupPolicy, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- def _create_initial(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: Union[_models.BackupPolicy, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_backup_policies_create_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: _models.BackupPolicy,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Create a backup policy for Netapp Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
- :type backup_policy_name: str
- :param body: Backup policy object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.BackupPolicy
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Create a backup policy for Netapp Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
- :type backup_policy_name: str
- :param body: Backup policy object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Create a backup policy for Netapp Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
- :type backup_policy_name: str
- :param body: Backup policy object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: Union[_models.BackupPolicy, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Create a backup policy for Netapp Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
- :type backup_policy_name: str
- :param body: Backup policy object supplied in the body of the operation. Is one of the
- following types: BackupPolicy, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.BackupPolicy or JSON or IO[bytes]
- :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.BackupPolicy] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._create_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.BackupPolicy, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.BackupPolicy].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.BackupPolicy](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: Union[_models.BackupPolicyPatch, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_backup_policies_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: _models.BackupPolicyPatch,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Patch a backup policy for Netapp Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
- :type backup_policy_name: str
- :param body: Backup policy object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Patch a backup policy for Netapp Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
- :type backup_policy_name: str
- :param body: Backup policy object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Patch a backup policy for Netapp Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
- :type backup_policy_name: str
- :param body: Backup policy object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_policy_name: str,
- body: Union[_models.BackupPolicyPatch, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Patch a backup policy for Netapp Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
- :type backup_policy_name: str
- :param body: Backup policy object supplied in the body of the operation. Is one of the
- following types: BackupPolicyPatch, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch or JSON or IO[bytes]
- :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.BackupPolicy] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.BackupPolicy, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.BackupPolicy].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.BackupPolicy](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _delete_initial(
- self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_backup_policies_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202, 204]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_delete(
- self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Delete backup policy.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
- :type backup_policy_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_policy_name=backup_policy_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.BackupPolicy"]:
- """List backup policies for Netapp Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :return: An iterator like instance of BackupPolicy
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.BackupPolicy]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.BackupPolicy]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_backup_policies_list_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.BackupPolicy], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
-
- def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(get_next, extract_data)
-
-
-class VolumeQuotaRulesOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`volume_quota_rules` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace
- def get(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- **kwargs: Any
- ) -> _models.VolumeQuotaRule:
- """Get details of the specified quota rule.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param volume_quota_rule_name: The name of volume quota rule. Required.
- :type volume_quota_rule_name: str
- :return: VolumeQuotaRule. The VolumeQuotaRule is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.VolumeQuotaRule
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.VolumeQuotaRule] = kwargs.pop("cls", None)
-
- _request = build_volume_quota_rules_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- volume_quota_rule_name=volume_quota_rule_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.VolumeQuotaRule, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- def _create_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- body: Union[_models.VolumeQuotaRule, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_volume_quota_rules_create_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- volume_quota_rule_name=volume_quota_rule_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- body: _models.VolumeQuotaRule,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Create the specified quota rule within the given volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param volume_quota_rule_name: The name of volume quota rule. Required.
- :type volume_quota_rule_name: str
- :param body: Quota rule object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.VolumeQuotaRule
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Create the specified quota rule within the given volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param volume_quota_rule_name: The name of volume quota rule. Required.
- :type volume_quota_rule_name: str
- :param body: Quota rule object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Create the specified quota rule within the given volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param volume_quota_rule_name: The name of volume quota rule. Required.
- :type volume_quota_rule_name: str
- :param body: Quota rule object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_create(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- body: Union[_models.VolumeQuotaRule, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Create the specified quota rule within the given volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param volume_quota_rule_name: The name of volume quota rule. Required.
- :type volume_quota_rule_name: str
- :param body: Quota rule object supplied in the body of the operation. Is one of the following
- types: VolumeQuotaRule, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.VolumeQuotaRule or JSON or IO[bytes]
- :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.VolumeQuotaRule] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._create_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- volume_quota_rule_name=volume_quota_rule_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.VolumeQuotaRule, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.VolumeQuotaRule].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.VolumeQuotaRule](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- body: Union[_models.VolumeQuotaRulePatch, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_volume_quota_rules_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- volume_quota_rule_name=volume_quota_rule_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- body: _models.VolumeQuotaRulePatch,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Patch a quota rule.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param volume_quota_rule_name: The name of volume quota rule. Required.
- :type volume_quota_rule_name: str
- :param body: Quota rule object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.VolumeQuotaRulePatch
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Patch a quota rule.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param volume_quota_rule_name: The name of volume quota rule. Required.
- :type volume_quota_rule_name: str
- :param body: Quota rule object supplied in the body of the operation. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Patch a quota rule.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param volume_quota_rule_name: The name of volume quota rule. Required.
- :type volume_quota_rule_name: str
- :param body: Quota rule object supplied in the body of the operation. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- body: Union[_models.VolumeQuotaRulePatch, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Patch a quota rule.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param volume_quota_rule_name: The name of volume quota rule. Required.
- :type volume_quota_rule_name: str
- :param body: Quota rule object supplied in the body of the operation. Is one of the following
- types: VolumeQuotaRulePatch, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.VolumeQuotaRulePatch or JSON or IO[bytes]
- :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.VolumeQuotaRule] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- volume_quota_rule_name=volume_quota_rule_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.VolumeQuotaRule, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.VolumeQuotaRule].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.VolumeQuotaRule](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- def _delete_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_volume_quota_rules_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- volume_quota_rule_name=volume_quota_rule_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 202, 204]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
- @distributed_trace
- def begin_delete(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- **kwargs: Any
- ) -> LROPoller[None]:
- """Delete quota rule.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param volume_quota_rule_name: The name of volume quota rule. Required.
- :type volume_quota_rule_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- volume_quota_rule_name=volume_quota_rule_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
+ :attr:`operations` attribute.
+ """
+
+ def __init__(self, *args, **kwargs) -> None:
+ input_args = list(args)
+ self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
+ self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
- def list_by_volume(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> ItemPaged["_models.VolumeQuotaRule"]:
- """List all quota rules associated with the volume.
+ def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]:
+ """List the operations for the provider.
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An iterator like instance of VolumeQuotaRule
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.VolumeQuotaRule]
+ :return: An iterator like instance of Operation
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Operation]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[List[_models.VolumeQuotaRule]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -15943,12 +3349,7 @@ def list_by_volume(
def prepare_request(next_link=None):
if not next_link:
- _request = build_volume_quota_rules_list_by_volume_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
+ _request = build_operations_list_request(
api_version=self._config.api_version,
headers=_headers,
params=_params,
@@ -15984,7 +3385,7 @@ def prepare_request(next_link=None):
def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.VolumeQuotaRule], deserialized.get("value", []))
+ list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -16011,14 +3412,14 @@ def get_next(next_link=None):
return ItemPaged(get_next, extract_data)
-class RansomwareReportsOperations:
+class NetAppResourceQuotaLimitsAccountOperations: # pylint: disable=name-too-long
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`ransomware_reports` attribute.
+ :attr:`net_app_resource_quota_limits_account` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -16030,50 +3431,40 @@ def __init__(self, *args, **kwargs) -> None:
@distributed_trace
@api_version_validation(
- method_added_on="2025-09-01-preview",
+ method_added_on="2025-07-01-preview",
params_added_on={
- "2025-09-01-preview": [
+ "2025-07-01-preview": [
"api_version",
"subscription_id",
"resource_group_name",
"account_name",
- "pool_name",
- "volume_name",
- "ransomware_report_name",
+ "quota_limit_name",
"accept",
]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=[
+ "2025-07-01-preview",
+ "2025-08-01",
+ "2025-08-01-preview",
+ "2025-09-01",
+ "2025-09-01-preview",
+ "2025-12-01",
+ ],
)
def get(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- ransomware_report_name: str,
- **kwargs: Any
- ) -> _models.RansomwareReport:
- """Get details of the specified ransomware report (ARP)
- ARP reports are created with a list of suspected files when it detects any combination of high
- data entropy, abnormal volume activity with data encryption, and unusual file extensions.
- ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware
- threat. You can use one of these ARP snapshots or another snapshot of your volume to restore
- data.
+ self, resource_group_name: str, account_name: str, quota_limit_name: str, **kwargs: Any
+ ) -> _models.QuotaItem:
+ """Get the default, current and usages account quota limit.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param ransomware_report_name: The name of the ransomware report. Required.
- :type ransomware_report_name: str
- :return: RansomwareReport. The RansomwareReport is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.RansomwareReport
+ :param quota_limit_name: The name of the Quota Limit. Required.
+ :type quota_limit_name: str
+ :return: QuotaItem. The QuotaItem is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.QuotaItem
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
@@ -16087,14 +3478,12 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.RansomwareReport] = kwargs.pop("cls", None)
+ cls: ClsType[_models.QuotaItem] = kwargs.pop("cls", None)
- _request = build_ransomware_reports_get_request(
+ _request = build_net_app_resource_quota_limits_account_get_request(
resource_group_name=resource_group_name,
account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- ransomware_report_name=ransomware_report_name,
+ quota_limit_name=quota_limit_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -16128,7 +3517,7 @@ def get(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.RansomwareReport, response.json())
+ deserialized = _deserialize(_models.QuotaItem, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -16137,48 +3526,36 @@ def get(
@distributed_trace
@api_version_validation(
- method_added_on="2025-09-01-preview",
+ method_added_on="2025-07-01-preview",
params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "accept",
- ]
+ "2025-07-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=[
+ "2025-07-01-preview",
+ "2025-08-01",
+ "2025-08-01-preview",
+ "2025-09-01",
+ "2025-09-01-preview",
+ "2025-12-01",
+ ],
)
- def list(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> ItemPaged["_models.RansomwareReport"]:
- """List all ransomware reports for the volume
- Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume.
- ARP reports are created with a list of suspected files when it detects any combination of high
- data entropy, abnormal volume activity with data encryption, and unusual file extensions.
- ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware
- threat. You can use one of these ARP snapshots or another snapshot of your volume to restore
- data".
+ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.QuotaItem"]:
+ """Gets a list of quota limits for all quotas that are under account. Currently PoolsPerAccount is
+ the only one.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An iterator like instance of RansomwareReport
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.RansomwareReport]
+ :return: An iterator like instance of QuotaItem
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.QuotaItem]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[List[_models.RansomwareReport]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.QuotaItem]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -16191,11 +3568,9 @@ def list(
def prepare_request(next_link=None):
if not next_link:
- _request = build_ransomware_reports_list_request(
+ _request = build_net_app_resource_quota_limits_account_list_request(
resource_group_name=resource_group_name,
account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -16232,7 +3607,7 @@ def prepare_request(next_link=None):
def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.RansomwareReport], deserialized.get("value", []))
+ list_of_elem = _deserialize(List[_models.QuotaItem], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -16258,30 +3633,104 @@ def get_next(next_link=None):
return ItemPaged(get_next, extract_data)
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "ransomware_report_name",
- "content_type",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _clear_suspects_initial(
+
+class VolumeGroupsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
+ :attr:`volume_groups` attribute.
+ """
+
+ def __init__(self, *args, **kwargs) -> None:
+ input_args = list(args)
+ self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
+ self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
+
+ @distributed_trace
+ def get(
+ self, resource_group_name: str, account_name: str, volume_group_name: str, **kwargs: Any
+ ) -> _models.VolumeGroupDetails:
+ """Get details of the specified volume group.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param volume_group_name: The name of the volumeGroup. Required.
+ :type volume_group_name: str
+ :return: VolumeGroupDetails. The VolumeGroupDetails is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.VolumeGroupDetails
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[_models.VolumeGroupDetails] = kwargs.pop("cls", None)
+
+ _request = build_volume_groups_get_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ volume_group_name=volume_group_name,
+ subscription_id=self._config.subscription_id,
+ api_version=self._config.api_version,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
+
+ _stream = kwargs.pop("stream", False)
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ if _stream:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
+ )
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ if _stream:
+ deserialized = response.iter_bytes()
+ else:
+ deserialized = _deserialize(_models.VolumeGroupDetails, response.json())
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ def _create_initial(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- ransomware_report_name: str,
- body: Union[_models.RansomwareSuspectsClearRequest, JSON, IO[bytes]],
+ volume_group_name: str,
+ body: Union[_models.VolumeGroupDetails, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -16305,12 +3754,10 @@ def _clear_suspects_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_ransomware_reports_clear_suspects_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- ransomware_report_name=ransomware_report_name,
+ _request = build_volume_groups_create_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ volume_group_name=volume_group_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -16330,7 +3777,7 @@ def _clear_suspects_initial(
response = pipeline_response.http_response
- if response.status_code not in [202]:
+ if response.status_code not in [201]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -16354,197 +3801,271 @@ def _clear_suspects_initial(
return deserialized # type: ignore
@overload
- def begin_clear_suspects(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- ransomware_report_name: str,
- body: _models.RansomwareSuspectsClearRequest,
+ volume_group_name: str,
+ body: _models.VolumeGroupDetails,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """ "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
- evaluate the report to determine whether the activity is acceptable (false positive) or whether
- an attack seems malicious.
- ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware
- threat. You can use one of these ARP snapshots or another snapshot of your volume to restore
- data",.
+ ) -> LROPoller[_models.VolumeGroupDetails]:
+ """Create a volume group along with specified volumes.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param ransomware_report_name: The name of the ransomware report. Required.
- :type ransomware_report_name: str
- :param body: Clear suspects request object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.RansomwareSuspectsClearRequest
+ :param volume_group_name: The name of the volumeGroup. Required.
+ :type volume_group_name: str
+ :param body: Volume Group object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.VolumeGroupDetails
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_clear_suspects(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- ransomware_report_name: str,
+ volume_group_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """ "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
- evaluate the report to determine whether the activity is acceptable (false positive) or whether
- an attack seems malicious.
- ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware
- threat. You can use one of these ARP snapshots or another snapshot of your volume to restore
- data",.
+ ) -> LROPoller[_models.VolumeGroupDetails]:
+ """Create a volume group along with specified volumes.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param ransomware_report_name: The name of the ransomware report. Required.
- :type ransomware_report_name: str
- :param body: Clear suspects request object supplied in the body of the operation. Required.
+ :param volume_group_name: The name of the volumeGroup. Required.
+ :type volume_group_name: str
+ :param body: Volume Group object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_clear_suspects(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- ransomware_report_name: str,
+ volume_group_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """ "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
- evaluate the report to determine whether the activity is acceptable (false positive) or whether
- an attack seems malicious.
- ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware
- threat. You can use one of these ARP snapshots or another snapshot of your volume to restore
- data",.
+ ) -> LROPoller[_models.VolumeGroupDetails]:
+ """Create a volume group along with specified volumes.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param ransomware_report_name: The name of the ransomware report. Required.
- :type ransomware_report_name: str
- :param body: Clear suspects request object supplied in the body of the operation. Required.
+ :param volume_group_name: The name of the volumeGroup. Required.
+ :type volume_group_name: str
+ :param body: Volume Group object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "ransomware_report_name",
- "content_type",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_clear_suspects(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- ransomware_report_name: str,
- body: Union[_models.RansomwareSuspectsClearRequest, JSON, IO[bytes]],
+ volume_group_name: str,
+ body: Union[_models.VolumeGroupDetails, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[None]:
- """ "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
- evaluate the report to determine whether the activity is acceptable (false positive) or whether
- an attack seems malicious.
- ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware
- threat. You can use one of these ARP snapshots or another snapshot of your volume to restore
- data",.
+ ) -> LROPoller[_models.VolumeGroupDetails]:
+ """Create a volume group along with specified volumes.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :param ransomware_report_name: The name of the ransomware report. Required.
- :type ransomware_report_name: str
- :param body: Clear suspects request object supplied in the body of the operation. Is one of the
- following types: RansomwareSuspectsClearRequest, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.RansomwareSuspectsClearRequest or JSON or IO[bytes]
+ :param volume_group_name: The name of the volumeGroup. Required.
+ :type volume_group_name: str
+ :param body: Volume Group object supplied in the body of the operation. Is one of the following
+ types: VolumeGroupDetails, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.VolumeGroupDetails or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns VolumeGroupDetails. The VolumeGroupDetails is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeGroupDetails]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = kwargs.pop("params", {}) or {}
+
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.VolumeGroupDetails] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._create_initial(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ volume_group_name=volume_group_name,
+ body=body,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ response_headers = {}
+ response = pipeline_response.http_response
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = _deserialize(_models.VolumeGroupDetails, response.json())
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return deserialized
+
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.VolumeGroupDetails].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.VolumeGroupDetails](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ def _delete_initial(
+ self, resource_group_name: str, account_name: str, volume_group_name: str, **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ _request = build_volume_groups_delete_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ volume_group_name=volume_group_name,
+ subscription_id=self._config.subscription_id,
+ api_version=self._config.api_version,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
+
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202, 204]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
+ )
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.iter_bytes()
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def begin_delete(
+ self, resource_group_name: str, account_name: str, volume_group_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Delete the specified volume group only if there are no volumes under volume group.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param volume_group_name: The name of the volumeGroup. Required.
+ :type volume_group_name: str
:return: An instance of LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._clear_suspects_initial(
+ raw_result = self._delete_initial(
resource_group_name=resource_group_name,
account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- ransomware_report_name=ransomware_report_name,
- body=body,
- content_type=content_type,
+ volume_group_name=volume_group_name,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -16578,15 +4099,111 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
)
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+ @distributed_trace
+ def list_by_net_app_account(
+ self, resource_group_name: str, account_name: str, **kwargs: Any
+ ) -> ItemPaged["_models.VolumeGroup"]:
+ """List all volume groups for given account.
-class BackupVaultsOperations:
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :return: An iterator like instance of VolumeGroup
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.VolumeGroup]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[List[_models.VolumeGroup]] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_volume_groups_list_by_net_app_account_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ subscription_id=self._config.subscription_id,
+ api_version=self._config.api_version,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url(
+ "self._config.base_url", self._config.base_url, "str", skip_quote=True
+ ),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url(
+ "self._config.base_url", self._config.base_url, "str", skip_quote=True
+ ),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
+
+ return _request
+
+ def extract_data(pipeline_response):
+ deserialized = pipeline_response.http_response.json()
+ list_of_elem = _deserialize(List[_models.VolumeGroup], deserialized.get("value", []))
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.get("nextLink") or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
+ )
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
+
+class BackupsOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`backup_vaults` attribute.
+ :attr:`backups` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -16598,9 +4215,9 @@ def __init__(self, *args, **kwargs) -> None:
@distributed_trace
def get(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
- ) -> _models.BackupVault:
- """Get the Backup Vault.
+ self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
+ ) -> _models.Backup:
+ """Get the specified Backup under Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -16609,8 +4226,10 @@ def get(
:type account_name: str
:param backup_vault_name: The name of the Backup Vault. Required.
:type backup_vault_name: str
- :return: BackupVault. The BackupVault is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.BackupVault
+ :param backup_name: The name of the backup. Required.
+ :type backup_name: str
+ :return: Backup. The Backup is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.Backup
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
@@ -16624,12 +4243,13 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None)
+ cls: ClsType[_models.Backup] = kwargs.pop("cls", None)
- _request = build_backup_vaults_get_request(
+ _request = build_backups_get_request(
resource_group_name=resource_group_name,
account_name=account_name,
backup_vault_name=backup_vault_name,
+ backup_name=backup_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -16663,19 +4283,20 @@ def get(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.BackupVault, response.json())
+ deserialized = _deserialize(_models.Backup, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
- def _create_or_update_initial(
+ def _create_initial(
self,
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- body: Union[_models.BackupVault, JSON, IO[bytes]],
+ backup_name: str,
+ body: Union[_models.Backup, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -16699,10 +4320,11 @@ def _create_or_update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_backup_vaults_create_or_update_request(
+ _request = build_backups_create_request(
resource_group_name=resource_group_name,
account_name=account_name,
backup_vault_name=backup_vault_name,
+ backup_name=backup_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -16749,17 +4371,18 @@ def _create_or_update_initial(
return deserialized # type: ignore
@overload
- def begin_create_or_update(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- body: _models.BackupVault,
+ backup_name: str,
+ body: _models.Backup,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Create or update the specified Backup Vault in the NetApp account.
+ ) -> LROPoller[_models.Backup]:
+ """Create a backup under the Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -16768,29 +4391,32 @@ def begin_create_or_update(
:type account_name: str
:param backup_vault_name: The name of the Backup Vault. Required.
:type backup_vault_name: str
- :param body: BackupVault object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.BackupVault
+ :param backup_name: The name of the backup. Required.
+ :type backup_name: str
+ :param body: Backup object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.Backup
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ :return: An instance of LROPoller that returns Backup. The Backup is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
backup_vault_name: str,
+ backup_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Create or update the specified Backup Vault in the NetApp account.
+ ) -> LROPoller[_models.Backup]:
+ """Create a backup under the Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -16799,29 +4425,32 @@ def begin_create_or_update(
:type account_name: str
:param backup_vault_name: The name of the Backup Vault. Required.
:type backup_vault_name: str
- :param body: BackupVault object supplied in the body of the operation. Required.
+ :param backup_name: The name of the backup. Required.
+ :type backup_name: str
+ :param body: Backup object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ :return: An instance of LROPoller that returns Backup. The Backup is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
backup_vault_name: str,
+ backup_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Create or update the specified Backup Vault in the NetApp account.
+ ) -> LROPoller[_models.Backup]:
+ """Create a backup under the Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -16830,27 +4459,30 @@ def begin_create_or_update(
:type account_name: str
:param backup_vault_name: The name of the Backup Vault. Required.
:type backup_vault_name: str
- :param body: BackupVault object supplied in the body of the operation. Required.
+ :param backup_name: The name of the backup. Required.
+ :type backup_name: str
+ :param body: Backup object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ :return: An instance of LROPoller that returns Backup. The Backup is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- def begin_create_or_update(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- body: Union[_models.BackupVault, JSON, IO[bytes]],
+ backup_name: str,
+ body: Union[_models.Backup, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Create or update the specified Backup Vault in the NetApp account.
+ ) -> LROPoller[_models.Backup]:
+ """Create a backup under the Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -16859,27 +4491,30 @@ def begin_create_or_update(
:type account_name: str
:param backup_vault_name: The name of the Backup Vault. Required.
:type backup_vault_name: str
- :param body: BackupVault object supplied in the body of the operation. Is one of the following
- types: BackupVault, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.BackupVault or JSON or IO[bytes]
- :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ :param backup_name: The name of the backup. Required.
+ :type backup_name: str
+ :param body: Backup object supplied in the body of the operation. Is one of the following
+ types: Backup, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.Backup or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns Backup. The Backup is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None)
+ cls: ClsType[_models.Backup] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._create_or_update_initial(
+ raw_result = self._create_initial(
resource_group_name=resource_group_name,
account_name=account_name,
backup_vault_name=backup_vault_name,
+ backup_name=backup_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -16892,7 +4527,7 @@ def begin_create_or_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.BackupVault, response.json())
+ deserialized = _deserialize(_models.Backup, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -16910,13 +4545,13 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.BackupVault].from_continuation_token(
+ return LROPoller[_models.Backup].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.BackupVault](
+ return LROPoller[_models.Backup](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
@@ -16925,7 +4560,8 @@ def _update_initial(
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- body: Union[_models.BackupVaultPatch, JSON, IO[bytes]],
+ backup_name: str,
+ body: Optional[Union[_models.BackupPatch, JSON, IO[bytes]]] = None,
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -16940,19 +4576,24 @@ def _update_initial(
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ content_type = content_type if body else None
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- content_type = content_type or "application/json"
+ content_type = content_type or "application/json" if body else None
_content = None
if isinstance(body, (IOBase, bytes)):
_content = body
else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ if body is not None:
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ else:
+ _content = None
- _request = build_backup_vaults_update_request(
+ _request = build_backups_update_request(
resource_group_name=resource_group_name,
account_name=account_name,
backup_vault_name=backup_vault_name,
+ backup_name=backup_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -17002,12 +4643,13 @@ def begin_update(
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- body: _models.BackupVaultPatch,
+ backup_name: str,
+ body: Optional[_models.BackupPatch] = None,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Patch the specified NetApp Backup Vault.
+ ) -> LROPoller[_models.Backup]:
+ """Patch a Backup under the Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -17016,14 +4658,16 @@ def begin_update(
:type account_name: str
:param backup_vault_name: The name of the Backup Vault. Required.
:type backup_vault_name: str
- :param body: Backup Vault object supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.BackupVaultPatch
+ :param backup_name: The name of the backup. Required.
+ :type backup_name: str
+ :param body: Backup object supplied in the body of the operation. Default value is None.
+ :type body: ~azure.mgmt.netapp.models.BackupPatch
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ :return: An instance of LROPoller that returns Backup. The Backup is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -17033,12 +4677,13 @@ def begin_update(
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- body: JSON,
+ backup_name: str,
+ body: Optional[JSON] = None,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Patch the specified NetApp Backup Vault.
+ ) -> LROPoller[_models.Backup]:
+ """Patch a Backup under the Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -17047,14 +4692,16 @@ def begin_update(
:type account_name: str
:param backup_vault_name: The name of the Backup Vault. Required.
:type backup_vault_name: str
- :param body: Backup Vault object supplied in the body of the operation. Required.
+ :param backup_name: The name of the backup. Required.
+ :type backup_name: str
+ :param body: Backup object supplied in the body of the operation. Default value is None.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ :return: An instance of LROPoller that returns Backup. The Backup is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -17064,12 +4711,13 @@ def begin_update(
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- body: IO[bytes],
+ backup_name: str,
+ body: Optional[IO[bytes]] = None,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Patch the specified NetApp Backup Vault.
+ ) -> LROPoller[_models.Backup]:
+ """Patch a Backup under the Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -17078,14 +4726,16 @@ def begin_update(
:type account_name: str
:param backup_vault_name: The name of the Backup Vault. Required.
:type backup_vault_name: str
- :param body: Backup Vault object supplied in the body of the operation. Required.
+ :param backup_name: The name of the backup. Required.
+ :type backup_name: str
+ :param body: Backup object supplied in the body of the operation. Default value is None.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ :return: An instance of LROPoller that returns Backup. The Backup is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -17095,10 +4745,11 @@ def begin_update(
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- body: Union[_models.BackupVaultPatch, JSON, IO[bytes]],
+ backup_name: str,
+ body: Optional[Union[_models.BackupPatch, JSON, IO[bytes]]] = None,
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Patch the specified NetApp Backup Vault.
+ ) -> LROPoller[_models.Backup]:
+ """Patch a Backup under the Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -17107,19 +4758,22 @@ def begin_update(
:type account_name: str
:param backup_vault_name: The name of the Backup Vault. Required.
:type backup_vault_name: str
- :param body: Backup Vault object supplied in the body of the operation. Is one of the following
- types: BackupVaultPatch, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.BackupVaultPatch or JSON or IO[bytes]
- :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ :param backup_name: The name of the backup. Required.
+ :type backup_name: str
+ :param body: Backup object supplied in the body of the operation. Is one of the following
+ types: BackupPatch, JSON, IO[bytes] Default value is None.
+ :type body: ~azure.mgmt.netapp.models.BackupPatch or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns Backup. The Backup is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None)
+ content_type = content_type if body else None
+ cls: ClsType[_models.Backup] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
@@ -17128,6 +4782,7 @@ def begin_update(
resource_group_name=resource_group_name,
account_name=account_name,
backup_vault_name=backup_vault_name,
+ backup_name=backup_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -17140,7 +4795,7 @@ def begin_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.BackupVault, response.json())
+ deserialized = _deserialize(_models.Backup, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -17158,18 +4813,18 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.BackupVault].from_continuation_token(
+ return LROPoller[_models.Backup].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.BackupVault](
+ return LROPoller[_models.Backup](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
def _delete_initial(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
+ self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -17184,10 +4839,11 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_backup_vaults_delete_request(
+ _request = build_backups_delete_request(
resource_group_name=resource_group_name,
account_name=account_name,
backup_vault_name=backup_vault_name,
+ backup_name=backup_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -17231,9 +4887,9 @@ def _delete_initial(
@distributed_trace
def begin_delete(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
+ self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
) -> LROPoller[None]:
- """Delete the specified Backup Vault.
+ """Delete a Backup under the Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -17242,6 +4898,8 @@ def begin_delete(
:type account_name: str
:param backup_vault_name: The name of the Backup Vault. Required.
:type backup_vault_name: str
+ :param backup_name: The name of the backup. Required.
+ :type backup_name: str
:return: An instance of LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
@@ -17258,6 +4916,7 @@ def begin_delete(
resource_group_name=resource_group_name,
account_name=account_name,
backup_vault_name=backup_vault_name,
+ backup_name=backup_name,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -17292,24 +4951,35 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
@distributed_trace
- def list_by_net_app_account(
- self, resource_group_name: str, account_name: str, **kwargs: Any
- ) -> ItemPaged["_models.BackupVault"]:
- """List and describe all Backup Vaults in the NetApp account.
+ def list_by_vault(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ backup_vault_name: str,
+ *,
+ filter: Optional[str] = None,
+ **kwargs: Any
+ ) -> ItemPaged["_models.Backup"]:
+ """List all backups Under a Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param account_name: The name of the NetApp account. Required.
:type account_name: str
- :return: An iterator like instance of BackupVault
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.BackupVault]
+ :param backup_vault_name: The name of the Backup Vault. Required.
+ :type backup_vault_name: str
+ :keyword filter: An option to specify the VolumeResourceId. If present, then only returns the
+ backups under the specified volume. Default value is None.
+ :paramtype filter: str
+ :return: An iterator like instance of Backup
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Backup]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[List[_models.BackupVault]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.Backup]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -17322,10 +4992,12 @@ def list_by_net_app_account(
def prepare_request(next_link=None):
if not next_link:
- _request = build_backup_vaults_list_by_net_app_account_request(
+ _request = build_backups_list_by_vault_request(
resource_group_name=resource_group_name,
account_name=account_name,
+ backup_vault_name=backup_vault_name,
subscription_id=self._config.subscription_id,
+ filter=filter,
api_version=self._config.api_version,
headers=_headers,
params=_params,
@@ -17337,65 +5009,219 @@ def prepare_request(next_link=None):
}
_request.url = self._client.format_url(_request.url, **path_format_arguments)
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url(
+ "self._config.base_url", self._config.base_url, "str", skip_quote=True
+ ),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
+
+ return _request
+
+ def extract_data(pipeline_response):
+ deserialized = pipeline_response.http_response.json()
+ list_of_elem = _deserialize(List[_models.Backup], deserialized.get("value", []))
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.get("nextLink") or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
+ )
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
+ @distributed_trace
+ def get_latest_status(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> _models.BackupStatus:
+ """Get the latest status of the backup for a volume.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: BackupStatus. The BackupStatus is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.BackupStatus
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[_models.BackupStatus] = kwargs.pop("cls", None)
+
+ _request = build_backups_get_latest_status_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ subscription_id=self._config.subscription_id,
+ api_version=self._config.api_version,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
+
+ _stream = kwargs.pop("stream", False)
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ if _stream:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
+ )
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ if _stream:
+ deserialized = response.iter_bytes()
+ else:
+ deserialized = _deserialize(_models.BackupStatus, response.json())
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def get_volume_latest_restore_status(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> _models.RestoreStatus:
+ """Get the latest status of the restore for a volume.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: RestoreStatus. The RestoreStatus is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.RestoreStatus
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[_models.RestoreStatus] = kwargs.pop("cls", None)
- return _request
+ _request = build_backups_get_volume_latest_restore_status_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ subscription_id=self._config.subscription_id,
+ api_version=self._config.api_version,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.BackupVault], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
+ _stream = kwargs.pop("stream", False)
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
- def get_next(next_link=None):
- _request = prepare_request(next_link)
+ response = pipeline_response.http_response
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
+ if response.status_code not in [200]:
+ if _stream:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
)
- response = pipeline_response.http_response
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ if _stream:
+ deserialized = response.iter_bytes()
+ else:
+ deserialized = _deserialize(_models.RestoreStatus, response.json())
- return pipeline_response
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
- return ItemPaged(get_next, extract_data)
+ return deserialized # type: ignore
-class BucketsOperations:
+class VolumesOperations: # pylint: disable=too-many-public-methods
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`buckets` attribute.
+ :attr:`volumes` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -17406,33 +5232,10 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
def get(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- bucket_name: str,
- **kwargs: Any
- ) -> _models.Bucket:
- """Get the details of the specified volume's bucket. A bucket allows additional services, such as
- AI services, connect to the volume data contained in those buckets.
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> _models.Volume:
+ """Get the details of the specified volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -17443,10 +5246,8 @@ def get(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :return: Bucket. The Bucket is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.Bucket
+ :return: Volume. The Volume is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.Volume
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
@@ -17460,14 +5261,13 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.Bucket] = kwargs.pop("cls", None)
+ cls: ClsType[_models.Volume] = kwargs.pop("cls", None)
- _request = build_buckets_get_request(
+ _request = build_volumes_get_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
- bucket_name=bucket_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -17501,38 +5301,20 @@ def get(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.Bucket, response.json())
+ deserialized = _deserialize(_models.Volume, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
def _create_or_update_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
- body: Union[_models.Bucket, JSON, IO[bytes]],
+ body: Union[_models.Volume, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -17556,12 +5338,11 @@ def _create_or_update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_buckets_create_or_update_request(
+ _request = build_volumes_create_or_update_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
- bucket_name=bucket_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -17581,7 +5362,7 @@ def _create_or_update_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 201]:
+ if response.status_code not in [200, 201, 202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -17600,6 +5381,10 @@ def _create_or_update_initial(
)
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
deserialized = response.iter_bytes()
if cls:
@@ -17614,14 +5399,12 @@ def begin_create_or_update(
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
- body: _models.Bucket,
+ body: _models.Volume,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Bucket]:
- """Creates or updates a bucket for a volume. A bucket allows additional services, such as AI
- services, connect to the volume data contained in those buckets.
+ ) -> LROPoller[_models.Volume]:
+ """Create or update the specified volume within the capacity pool.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -17632,17 +5415,14 @@ def begin_create_or_update(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Required.
- :type body: ~azure.mgmt.netapp.models.Bucket
+ :param body: Volume object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.Volume
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with
+ :return: An instance of LROPoller that returns Volume. The Volume is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -17653,14 +5433,12 @@ def begin_create_or_update(
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Bucket]:
- """Creates or updates a bucket for a volume. A bucket allows additional services, such as AI
- services, connect to the volume data contained in those buckets.
+ ) -> LROPoller[_models.Volume]:
+ """Create or update the specified volume within the capacity pool.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -17671,17 +5449,14 @@ def begin_create_or_update(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Required.
+ :param body: Volume object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with
+ :return: An instance of LROPoller that returns Volume. The Volume is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -17692,14 +5467,12 @@ def begin_create_or_update(
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Bucket]:
- """Creates or updates a bucket for a volume. A bucket allows additional services, such as AI
- services, connect to the volume data contained in those buckets.
+ ) -> LROPoller[_models.Volume]:
+ """Create or update the specified volume within the capacity pool.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -17710,50 +5483,28 @@ def begin_create_or_update(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Required.
+ :param body: Volume object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with
+ :return: An instance of LROPoller that returns Volume. The Volume is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
- body: Union[_models.Bucket, JSON, IO[bytes]],
+ body: Union[_models.Volume, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.Bucket]:
- """Creates or updates a bucket for a volume. A bucket allows additional services, such as AI
- services, connect to the volume data contained in those buckets.
+ ) -> LROPoller[_models.Volume]:
+ """Create or update the specified volume within the capacity pool.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -17764,21 +5515,19 @@ def begin_create_or_update(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Is one of the following types: Bucket, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.Bucket or JSON or IO[bytes]
- :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with
+ :param body: Volume object supplied in the body of the operation. Is one of the following
+ types: Volume, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.Volume or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns Volume. The Volume is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.Bucket] = kwargs.pop("cls", None)
+ cls: ClsType[_models.Volume] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
@@ -17788,7 +5537,6 @@ def begin_create_or_update(
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
- bucket_name=bucket_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -17801,7 +5549,7 @@ def begin_create_or_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.Bucket, response.json())
+ deserialized = _deserialize(_models.Volume, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -17819,41 +5567,23 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.Bucket].from_continuation_token(
+ return LROPoller[_models.Volume].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.Bucket](
+ return LROPoller[_models.Volume](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
def _update_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
- body: Union[_models.BucketPatch, JSON, IO[bytes]],
+ body: Union[_models.VolumePatch, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -17877,12 +5607,11 @@ def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_buckets_update_request(
+ _request = build_volumes_update_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
- bucket_name=bucket_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -17916,9 +5645,6 @@ def _update_initial(
response_headers = {}
if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
@@ -17936,13 +5662,12 @@ def begin_update(
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
- body: _models.BucketPatch,
+ body: _models.VolumePatch,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Bucket]:
- """Updates the details of a volume bucket.
+ ) -> LROPoller[_models.Volume]:
+ """Patch the specified volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -17953,17 +5678,14 @@ def begin_update(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Required.
- :type body: ~azure.mgmt.netapp.models.BucketPatch
+ :param body: Volume object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.VolumePatch
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with
+ :return: An instance of LROPoller that returns Volume. The Volume is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -17974,13 +5696,12 @@ def begin_update(
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Bucket]:
- """Updates the details of a volume bucket.
+ ) -> LROPoller[_models.Volume]:
+ """Patch the specified volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -17991,17 +5712,14 @@ def begin_update(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Required.
+ :param body: Volume object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with
+ :return: An instance of LROPoller that returns Volume. The Volume is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -18012,13 +5730,12 @@ def begin_update(
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Bucket]:
- """Updates the details of a volume bucket.
+ ) -> LROPoller[_models.Volume]:
+ """Patch the specified volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -18029,49 +5746,28 @@ def begin_update(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Required.
+ :param body: Volume object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with
+ :return: An instance of LROPoller that returns Volume. The Volume is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
def begin_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
- body: Union[_models.BucketPatch, JSON, IO[bytes]],
+ body: Union[_models.VolumePatch, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.Bucket]:
- """Updates the details of a volume bucket.
+ ) -> LROPoller[_models.Volume]:
+ """Patch the specified volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -18082,22 +5778,19 @@ def begin_update(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket details including user details, and the volume path that should be
- mounted inside the bucket. Is one of the following types: BucketPatch, JSON, IO[bytes]
- Required.
- :type body: ~azure.mgmt.netapp.models.BucketPatch or JSON or IO[bytes]
- :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with
+ :param body: Volume object supplied in the body of the operation. Is one of the following
+ types: VolumePatch, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.VolumePatch or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns Volume. The Volume is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.Bucket] = kwargs.pop("cls", None)
+ cls: ClsType[_models.Volume] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
@@ -18107,7 +5800,6 @@ def begin_update(
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
- bucket_name=bucket_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -18120,7 +5812,7 @@ def begin_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.Bucket, response.json())
+ deserialized = _deserialize(_models.Volume, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -18138,38 +5830,24 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.Bucket].from_continuation_token(
+ return LROPoller[_models.Volume].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.Bucket](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
+ return LROPoller[_models.Volume](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
def _delete_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
+ *,
+ force_delete: Optional[bool] = None,
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -18185,13 +5863,13 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_buckets_delete_request(
+ _request = build_volumes_delete_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
- bucket_name=bucket_name,
subscription_id=self._config.subscription_id,
+ force_delete=force_delete,
api_version=self._config.api_version,
headers=_headers,
params=_params,
@@ -18222,9 +5900,6 @@ def _delete_initial(
response_headers = {}
if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
@@ -18236,31 +5911,17 @@ def _delete_initial(
return deserialized # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
def begin_delete(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
+ *,
+ force_delete: Optional[bool] = None,
**kwargs: Any
) -> LROPoller[None]:
- """Delete a volume's bucket.
+ """Delete the specified volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -18271,8 +5932,9 @@ def begin_delete(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
+ :keyword force_delete: An option to force delete the volume. Will cleanup resources connected
+ to the particular volume. Default value is None.
+ :paramtype force_delete: bool
:return: An instance of LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
@@ -18290,7 +5952,7 @@ def begin_delete(
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
- bucket_name=bucket_name,
+ force_delete=force_delete,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -18325,26 +5987,10 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
def list(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> ItemPaged["_models.Bucket"]:
- """Describes all buckets belonging to a volume. Buckets allow additional services, such as AI
- services, connect to the volume data contained in those buckets.
+ self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any
+ ) -> ItemPaged["_models.Volume"]:
+ """List all volumes within the capacity pool.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -18353,16 +5999,14 @@ def list(
:type account_name: str
:param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
- :type volume_name: str
- :return: An iterator like instance of Bucket
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Bucket]
+ :return: An iterator like instance of Volume
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Volume]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[List[_models.Bucket]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.Volume]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -18375,11 +6019,10 @@ def list(
def prepare_request(next_link=None):
if not next_link:
- _request = build_buckets_list_request(
+ _request = build_volumes_list_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
- volume_name=volume_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -18392,71 +6035,284 @@ def prepare_request(next_link=None):
}
_request.url = self._client.format_url(_request.url, **path_format_arguments)
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url(
+ "self._config.base_url", self._config.base_url, "str", skip_quote=True
+ ),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
+
+ return _request
+
+ def extract_data(pipeline_response):
+ deserialized = pipeline_response.http_response.json()
+ list_of_elem = _deserialize(List[_models.Volume], deserialized.get("value", []))
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.get("nextLink") or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
+ )
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
+ def _populate_availability_zone_initial(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ _request = build_volumes_populate_availability_zone_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ subscription_id=self._config.subscription_id,
+ api_version=self._config.api_version,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
+
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
+ )
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.iter_bytes()
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def begin_populate_availability_zone(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> LROPoller[_models.Volume]:
+ """This operation will populate availability zone information for a volume.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: An instance of LROPoller that returns Volume. The Volume is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[_models.Volume] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._populate_availability_zone_initial(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ response_headers = {}
+ response = pipeline_response.http_response
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = _deserialize(_models.Volume, response.json())
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return deserialized
+
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.Volume].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.Volume](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ def _revert_initial(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Union[_models.VolumeRevert, JSON, IO[bytes]],
+ **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = kwargs.pop("params", {}) or {}
- return _request
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.Bucket], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
+ content_type = content_type or "application/json"
+ _content = None
+ if isinstance(body, (IOBase, bytes)):
+ _content = body
+ else:
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- def get_next(next_link=None):
- _request = prepare_request(next_link)
+ _request = build_volumes_revert_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ subscription_id=self._config.subscription_id,
+ content_type=content_type,
+ api_version=self._config.api_version,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
)
- response = pipeline_response.http_response
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
- return pipeline_response
+ deserialized = response.iter_bytes()
- return ItemPaged(get_next, extract_data)
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
@overload
- def generate_credentials(
+ def begin_revert(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
- body: _models.BucketCredentialsExpiry,
+ body: _models.VolumeRevert,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> _models.BucketGenerateCredentials:
- """Generate the access key and secret key used for accessing the specified volume bucket. Also
- return expiry date and time of key pair (in UTC).
+ ) -> LROPoller[None]:
+ """Revert a volume to the snapshot specified in the body.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -18467,35 +6323,29 @@ def generate_credentials(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket's Access and Secret key pair expiry time expressed as the number of
- days from now. Required.
- :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry
+ :param body: Object for snapshot to revert supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.VolumeRevert
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with
- MutableMapping
- :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def generate_credentials(
+ def begin_revert(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> _models.BucketGenerateCredentials:
- """Generate the access key and secret key used for accessing the specified volume bucket. Also
- return expiry date and time of key pair (in UTC).
+ ) -> LROPoller[None]:
+ """Revert a volume to the snapshot specified in the body.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -18506,35 +6356,29 @@ def generate_credentials(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket's Access and Secret key pair expiry time expressed as the number of
- days from now. Required.
+ :param body: Object for snapshot to revert supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with
- MutableMapping
- :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def generate_credentials(
+ def begin_revert(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> _models.BucketGenerateCredentials:
- """Generate the access key and secret key used for accessing the specified volume bucket. Also
- return expiry date and time of key pair (in UTC).
+ ) -> LROPoller[None]:
+ """Revert a volume to the snapshot specified in the body.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -18545,50 +6389,27 @@ def generate_credentials(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket's Access and Secret key pair expiry time expressed as the number of
- days from now. Required.
+ :param body: Object for snapshot to revert supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with
- MutableMapping
- :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-07-01-preview",
- params_added_on={
- "2025-07-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "bucket_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01-preview"],
- )
- def generate_credentials(
+ def begin_revert(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- bucket_name: str,
- body: Union[_models.BucketCredentialsExpiry, JSON, IO[bytes]],
+ body: Union[_models.VolumeRevert, JSON, IO[bytes]],
**kwargs: Any
- ) -> _models.BucketGenerateCredentials:
- """Generate the access key and secret key used for accessing the specified volume bucket. Also
- return expiry date and time of key pair (in UTC).
+ ) -> LROPoller[None]:
+ """Revert a volume to the snapshot specified in the body.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -18599,138 +6420,65 @@ def generate_credentials(
:type pool_name: str
:param volume_name: The name of the volume. Required.
:type volume_name: str
- :param bucket_name: The name of the bucket. Required.
- :type bucket_name: str
- :param body: The bucket's Access and Secret key pair expiry time expressed as the number of
- days from now. Is one of the following types: BucketCredentialsExpiry, JSON, IO[bytes]
- Required.
- :type body: ~azure.mgmt.netapp.models.BucketCredentialsExpiry or JSON or IO[bytes]
- :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with
- MutableMapping
- :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials
+ :param body: Object for snapshot to revert supplied in the body of the operation. Is one of the
+ following types: VolumeRevert, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.VolumeRevert or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.BucketGenerateCredentials] = kwargs.pop("cls", None)
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._revert_initial(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ body=body,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
- _request = build_buckets_generate_credentials_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- bucket_name=bucket_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
path_format_arguments = {
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
}
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.BucketGenerateCredentials, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
-
-class CachesOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`caches` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def get(
- self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any
- ) -> _models.Cache:
- """Get the details of the specified Cache.
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :return: Cache. The Cache is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.Cache
- :raises ~azure.core.exceptions.HttpResponseError:
- """
+ def _reset_cifs_password_initial(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
@@ -18742,13 +6490,13 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.Cache] = kwargs.pop("cls", None)
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_caches_get_request(
+ _request = build_volumes_reset_cifs_password_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
- cache_name=cache_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -18759,19 +6507,18 @@ def get(
}
_request.url = self._client.format_url(_request.url, **path_format_arguments)
- _stream = kwargs.pop("stream", False)
+ _stream = True
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **kwargs
)
response = pipeline_response.http_response
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
+ if response.status_code not in [202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = _failsafe_deserialize(
_models.ErrorResponse,
@@ -18779,40 +6526,84 @@ def get(
)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.Cache, response.json())
+ response_headers = {}
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.iter_bytes()
if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: Union[_models.Cache, JSON, IO[bytes]],
- **kwargs: Any
+ @distributed_trace
+ def begin_reset_cifs_password(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Reset cifs password from volume.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._reset_cifs_password_initial(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ def _split_clone_from_parent_initial(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -18822,28 +6613,18 @@ def _create_or_update_initial(
}
error_map.update(kwargs.pop("error_map", {}) or {})
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_caches_create_or_update_request(
+ _request = build_volumes_split_clone_from_parent_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
- cache_name=cache_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
- content_type=content_type,
api_version=self._config.api_version,
- content=_content,
headers=_headers,
params=_params,
)
@@ -18859,7 +6640,7 @@ def _create_or_update_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 201]:
+ if response.status_code not in [200, 202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -18872,10 +6653,8 @@ def _create_or_update_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
deserialized = response.iter_bytes()
@@ -18885,135 +6664,11 @@ def _create_or_update_initial(
return deserialized # type: ignore
- @overload
- def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: _models.Cache,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Cache]:
- """Create or update the specified Cache within the Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.Cache
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Cache]:
- """Create or update the specified Cache within the Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Resource create parameters. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Cache]:
- """Create or update the specified Cache within the Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Resource create parameters. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: Union[_models.Cache, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.Cache]:
- """Create or update the specified Cache within the Capacity Pool.
+ def begin_split_clone_from_parent(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> LROPoller[_models.Volume]:
+ """Split operation to convert clone volume to an independent volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -19022,32 +6677,26 @@ def begin_create_or_update(
:type account_name: str
:param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Resource create parameters. Is one of the following types: Cache, JSON, IO[bytes]
- Required.
- :type body: ~azure.mgmt.netapp.models.Cache or JSON or IO[bytes]
- :return: An instance of LROPoller that returns Cache. The Cache is compatible with
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: An instance of LROPoller that returns Volume. The Volume is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.Cache] = kwargs.pop("cls", None)
+ cls: ClsType[_models.Volume] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._create_or_update_initial(
+ raw_result = self._split_clone_from_parent_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
- cache_name=cache_name,
- body=body,
- content_type=content_type,
+ volume_name=volume_name,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -19057,10 +6706,14 @@ def begin_create_or_update(
kwargs.pop("error_map", None)
def get_long_running_output(pipeline_response):
+ response_headers = {}
response = pipeline_response.http_response
- deserialized = _deserialize(_models.Cache, response.json())
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = _deserialize(_models.Volume, response.json())
if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized
path_format_arguments = {
@@ -19076,39 +6729,23 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.Cache].from_continuation_token(
+ return LROPoller[_models.Volume].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.Cache](
+ return LROPoller[_models.Volume](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _update_initial(
+ def _break_file_locks_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- cache_name: str,
- body: Union[_models.CacheUpdate, JSON, IO[bytes]],
+ volume_name: str,
+ body: Optional[Union[_models.BreakFileLocksRequest, JSON, IO[bytes]]] = None,
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -19123,20 +6760,24 @@ def _update_initial(
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ content_type = content_type if body else None
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- content_type = content_type or "application/json"
+ content_type = content_type or "application/json" if body else None
_content = None
if isinstance(body, (IOBase, bytes)):
_content = body
else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ if body is not None:
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ else:
+ _content = None
- _request = build_caches_update_request(
+ _request = build_volumes_break_file_locks_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
- cache_name=cache_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -19170,9 +6811,6 @@ def _update_initial(
response_headers = {}
if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
@@ -19184,18 +6822,18 @@ def _update_initial(
return deserialized # type: ignore
@overload
- def begin_update(
+ def begin_break_file_locks(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- cache_name: str,
- body: _models.CacheUpdate,
+ volume_name: str,
+ body: Optional[_models.BreakFileLocksRequest] = None,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Cache]:
- """Patch the specified Cache.
+ ) -> LROPoller[None]:
+ """Break all the file locks on a volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -19204,32 +6842,32 @@ def begin_update(
:type account_name: str
:param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.CacheUpdate
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Optional body to provide the ability to clear file locks with selected options.
+ Default value is None.
+ :type body: ~azure.mgmt.netapp.models.BreakFileLocksRequest
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_update(
+ def begin_break_file_locks(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- cache_name: str,
- body: JSON,
+ volume_name: str,
+ body: Optional[JSON] = None,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Cache]:
- """Patch the specified Cache.
+ ) -> LROPoller[None]:
+ """Break all the file locks on a volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -19238,247 +6876,64 @@ def begin_update(
:type account_name: str
:param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: The resource properties to be updated. Required.
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Optional body to provide the ability to clear file locks with selected options.
+ Default value is None.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- cache_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.Cache]:
- """Patch the specified Cache.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: The resource properties to be updated. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_update(
+ def begin_break_file_locks(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- cache_name: str,
- body: Union[_models.CacheUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.Cache]:
- """Patch the specified Cache.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: The resource properties to be updated. Is one of the following types: CacheUpdate,
- JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.CacheUpdate or JSON or IO[bytes]
- :return: An instance of LROPoller that returns Cache. The Cache is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.Cache] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cache_name=cache_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.Cache, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.Cache].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.Cache](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _delete_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_caches_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cache_name=cache_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ volume_name: str,
+ body: Optional[IO[bytes]] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Break all the file locks on a volume.
- return deserialized # type: ignore
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Optional body to provide the ability to clear file locks with selected options.
+ Default value is None.
+ :type body: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_delete(
- self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any
+ def begin_break_file_locks(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[Union[_models.BreakFileLocksRequest, JSON, IO[bytes]]] = None,
+ **kwargs: Any
) -> LROPoller[None]:
- """Delete the specified cache.
+ """Break all the file locks on a volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -19487,25 +6942,32 @@ def begin_delete(
:type account_name: str
:param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Optional body to provide the ability to clear file locks with selected options. Is
+ one of the following types: BreakFileLocksRequest, JSON, IO[bytes] Default value is None.
+ :type body: ~azure.mgmt.netapp.models.BreakFileLocksRequest or JSON or IO[bytes]
:return: An instance of LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = kwargs.pop("headers", {}) or {}
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ content_type = content_type if body else None
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._delete_initial(
+ raw_result = self._break_file_locks_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
- cache_name=cache_name,
+ volume_name=volume_name,
+ body=body,
+ content_type=content_type,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -19539,235 +7001,29 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
)
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_capacity_pools(
- self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any
- ) -> ItemPaged["_models.Cache"]:
- """List all Caches within the Capacity Pool.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :return: An iterator like instance of Cache
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Cache]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.Cache]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_caches_list_by_capacity_pools_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.Cache], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
-
- def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(get_next, extract_data)
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "cache_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_peering_passphrases(
- self, resource_group_name: str, account_name: str, pool_name: str, cache_name: str, **kwargs: Any
- ) -> _models.PeeringPassphrases:
- """This operation will list the cluster peering command, cluster peering passphrase and the
- vserver peering command.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :param pool_name: The name of the capacity pool. Required.
- :type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :return: PeeringPassphrases. The PeeringPassphrases is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.PeeringPassphrases
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.PeeringPassphrases] = kwargs.pop("cls", None)
-
- _request = build_caches_list_peering_passphrases_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- cache_name=cache_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.PeeringPassphrases, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
@api_version_validation(
- method_added_on="2025-09-01-preview",
+ method_added_on="2025-08-01",
params_added_on={
- "2025-09-01-preview": [
+ "2025-08-01": [
"api_version",
"subscription_id",
"resource_group_name",
"account_name",
"pool_name",
- "cache_name",
+ "volume_name",
"content_type",
"accept",
]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview", "2025-12-01"],
)
- def _pool_change_initial(
+ def _list_get_group_id_list_for_ldap_user_initial( # pylint: disable=name-too-long
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- cache_name: str,
- body: Union[_models.PoolChangeRequest, JSON, IO[bytes]],
+ volume_name: str,
+ body: Union[_models.GetGroupIdListForLDAPUserRequest, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -19791,11 +7047,11 @@ def _pool_change_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_caches_pool_change_request(
+ _request = build_volumes_list_get_group_id_list_for_ldap_user_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
- cache_name=cache_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -19829,6 +7085,9 @@ def _pool_change_initial(
response_headers = {}
if response.status_code == 202:
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
@@ -19840,18 +7099,18 @@ def _pool_change_initial(
return deserialized # type: ignore
@overload
- def begin_pool_change(
+ def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- cache_name: str,
- body: _models.PoolChangeRequest,
+ volume_name: str,
+ body: _models.GetGroupIdListForLDAPUserRequest,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """Moves Cache to another Capacity Pool.
+ ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]:
+ """Returns the list of group Ids for a specific LDAP User.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -19860,31 +7119,33 @@ def begin_pool_change(
:type account_name: str
:param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Move cache to the pool supplied in the body of the operation. Required.
- :type body: ~azure.mgmt.netapp.models.PoolChangeRequest
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Returns group Id list for a specific LDAP user. Required.
+ :type body: ~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserRequest
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The
+ GetGroupIdListForLDAPUserResponse is compatible with MutableMapping
+ :rtype:
+ ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_pool_change(
+ def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- cache_name: str,
+ volume_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """Moves Cache to another Capacity Pool.
+ ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]:
+ """Returns the list of group Ids for a specific LDAP User.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -19893,31 +7154,33 @@ def begin_pool_change(
:type account_name: str
:param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Move cache to the pool supplied in the body of the operation. Required.
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Returns group Id list for a specific LDAP user. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The
+ GetGroupIdListForLDAPUserResponse is compatible with MutableMapping
+ :rtype:
+ ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_pool_change(
+ def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- cache_name: str,
+ volume_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """Moves Cache to another Capacity Pool.
+ ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]:
+ """Returns the list of group Ids for a specific LDAP User.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -19926,45 +7189,47 @@ def begin_pool_change(
:type account_name: str
:param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Move cache to the pool supplied in the body of the operation. Required.
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Returns group Id list for a specific LDAP user. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The
+ GetGroupIdListForLDAPUserResponse is compatible with MutableMapping
+ :rtype:
+ ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
@api_version_validation(
- method_added_on="2025-09-01-preview",
+ method_added_on="2025-08-01",
params_added_on={
- "2025-09-01-preview": [
+ "2025-08-01": [
"api_version",
"subscription_id",
"resource_group_name",
"account_name",
"pool_name",
- "cache_name",
+ "volume_name",
"content_type",
"accept",
]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview", "2025-12-01"],
)
- def begin_pool_change(
+ def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- cache_name: str,
- body: Union[_models.PoolChangeRequest, JSON, IO[bytes]],
+ volume_name: str,
+ body: Union[_models.GetGroupIdListForLDAPUserRequest, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[None]:
- """Moves Cache to another Capacity Pool.
+ ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]:
+ """Returns the list of group Ids for a specific LDAP User.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -19973,29 +7238,31 @@ def begin_pool_change(
:type account_name: str
:param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param cache_name: The name of the cache resource. Required.
- :type cache_name: str
- :param body: Move cache to the pool supplied in the body of the operation. Is one of the
- following types: PoolChangeRequest, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.PoolChangeRequest or JSON or IO[bytes]
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Returns group Id list for a specific LDAP user. Is one of the following types:
+ GetGroupIdListForLDAPUserRequest, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserRequest or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns GetGroupIdListForLDAPUserResponse. The
+ GetGroupIdListForLDAPUserResponse is compatible with MutableMapping
+ :rtype:
+ ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[None] = kwargs.pop("cls", None)
+ cls: ClsType[_models.GetGroupIdListForLDAPUserResponse] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._pool_change_initial(
+ raw_result = self._list_get_group_id_list_for_ldap_user_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
- cache_name=cache_name,
+ volume_name=volume_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -20006,9 +7273,19 @@ def begin_pool_change(
raw_result.http_response.read() # type: ignore
kwargs.pop("error_map", None)
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ def get_long_running_output(pipeline_response):
+ response_headers = {}
+ response = pipeline_response.http_response
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = _deserialize(_models.GetGroupIdListForLDAPUserResponse, response.json())
if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return deserialized
path_format_arguments = {
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
@@ -20023,127 +7300,23 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
else:
polling_method = polling
if cont_token:
- return LROPoller[None].from_continuation_token(
+ return LROPoller[_models.GetGroupIdListForLDAPUserResponse].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
-
-class ElasticAccountsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`elastic_accounts` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def get(self, resource_group_name: str, account_name: str, **kwargs: Any) -> _models.ElasticAccount:
- """Get the NetApp Elastic Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :return: ElasticAccount. The ElasticAccount is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticAccount
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ElasticAccount] = kwargs.pop("cls", None)
-
- _request = build_elastic_accounts_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
+ return LROPoller[_models.GetGroupIdListForLDAPUserResponse](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ElasticAccount, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _create_or_update_initial(
+ def _break_replication_initial(
self,
resource_group_name: str,
account_name: str,
- body: Union[_models.ElasticAccount, JSON, IO[bytes]],
+ pool_name: str,
+ volume_name: str,
+ body: Optional[Union[_models.BreakReplicationRequest, JSON, IO[bytes]]] = None,
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -20158,18 +7331,24 @@ def _create_or_update_initial(
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ content_type = content_type if body else None
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- content_type = content_type or "application/json"
+ content_type = content_type or "application/json" if body else None
_content = None
if isinstance(body, (IOBase, bytes)):
_content = body
else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ if body is not None:
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ else:
+ _content = None
- _request = build_elastic_accounts_create_or_update_request(
+ _request = build_volumes_break_replication_request(
resource_group_name=resource_group_name,
account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -20189,7 +7368,7 @@ def _create_or_update_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 201]:
+ if response.status_code not in [200, 202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -20202,10 +7381,8 @@ def _create_or_update_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
deserialized = response.iter_bytes()
@@ -20216,138 +7393,147 @@ def _create_or_update_initial(
return deserialized # type: ignore
@overload
- def begin_create_or_update(
+ def begin_break_replication(
self,
resource_group_name: str,
account_name: str,
- body: _models.ElasticAccount,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[_models.BreakReplicationRequest] = None,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticAccount]:
- """Create or update the specified NetApp Elastic Account within the resource group.
+ ) -> LROPoller[None]:
+ """Break the replication connection on the destination volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticAccount
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Optional body to force break the replication. Default value is None.
+ :type body: ~azure.mgmt.netapp.models.BreakReplicationRequest
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_break_replication(
self,
resource_group_name: str,
account_name: str,
- body: JSON,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[JSON] = None,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticAccount]:
- """Create or update the specified NetApp Elastic Account within the resource group.
+ ) -> LROPoller[None]:
+ """Break the replication connection on the destination volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param body: Resource create parameters. Required.
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Optional body to force break the replication. Default value is None.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_break_replication(
self,
resource_group_name: str,
account_name: str,
- body: IO[bytes],
+ pool_name: str,
+ volume_name: str,
+ body: Optional[IO[bytes]] = None,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticAccount]:
- """Create or update the specified NetApp Elastic Account within the resource group.
+ ) -> LROPoller[None]:
+ """Break the replication connection on the destination volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param body: Resource create parameters. Required.
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Optional body to force break the replication. Default value is None.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_create_or_update(
+ def begin_break_replication(
self,
resource_group_name: str,
account_name: str,
- body: Union[_models.ElasticAccount, JSON, IO[bytes]],
+ pool_name: str,
+ volume_name: str,
+ body: Optional[Union[_models.BreakReplicationRequest, JSON, IO[bytes]]] = None,
**kwargs: Any
- ) -> LROPoller[_models.ElasticAccount]:
- """Create or update the specified NetApp Elastic Account within the resource group.
+ ) -> LROPoller[None]:
+ """Break the replication connection on the destination volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticAccount, JSON,
- IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticAccount or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Optional body to force break the replication. Is one of the following types:
+ BreakReplicationRequest, JSON, IO[bytes] Default value is None.
+ :type body: ~azure.mgmt.netapp.models.BreakReplicationRequest or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticAccount] = kwargs.pop("cls", None)
+ content_type = content_type if body else None
+ cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._create_or_update_initial(
+ raw_result = self._break_replication_initial(
resource_group_name=resource_group_name,
account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -20358,12 +7544,9 @@ def begin_create_or_update(
raw_result.http_response.read() # type: ignore
kwargs.pop("error_map", None)
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticAccount, response.json())
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
+ return cls(pipeline_response, None, {}) # type: ignore
path_format_arguments = {
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
@@ -20378,35 +7561,21 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ElasticAccount].from_continuation_token(
+ return LROPoller[None].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ElasticAccount](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _update_initial(
+ def _reestablish_replication_initial(
self,
resource_group_name: str,
account_name: str,
- body: Union[_models.ElasticAccountUpdate, JSON, IO[bytes]],
+ pool_name: str,
+ volume_name: str,
+ body: Union[_models.ReestablishReplicationRequest, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -20430,9 +7599,11 @@ def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_elastic_accounts_update_request(
+ _request = build_volumes_reestablish_replication_request(
resource_group_name=resource_group_name,
account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -20452,7 +7623,7 @@ def _update_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202]:
+ if response.status_code not in [202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -20465,9 +7636,8 @@ def _update_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
deserialized = response.iter_bytes()
@@ -20477,138 +7647,150 @@ def _update_initial(
return deserialized # type: ignore
@overload
- def begin_update(
+ def begin_reestablish_replication(
self,
resource_group_name: str,
account_name: str,
- body: _models.ElasticAccountUpdate,
+ pool_name: str,
+ volume_name: str,
+ body: _models.ReestablishReplicationRequest,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticAccount]:
- """Patch the specified NetApp Elastic Account.
+ ) -> LROPoller[None]:
+ """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or
+ policy-based snapshots.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticAccountUpdate
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: body for the id of the source volume. Required.
+ :type body: ~azure.mgmt.netapp.models.ReestablishReplicationRequest
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_update(
+ def begin_reestablish_replication(
self,
resource_group_name: str,
account_name: str,
+ pool_name: str,
+ volume_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticAccount]:
- """Patch the specified NetApp Elastic Account.
+ ) -> LROPoller[None]:
+ """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or
+ policy-based snapshots.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param body: The resource properties to be updated. Required.
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: body for the id of the source volume. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_update(
+ def begin_reestablish_replication(
self,
resource_group_name: str,
account_name: str,
+ pool_name: str,
+ volume_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticAccount]:
- """Patch the specified NetApp Elastic Account.
+ ) -> LROPoller[None]:
+ """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or
+ policy-based snapshots.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param body: The resource properties to be updated. Required.
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: body for the id of the source volume. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_update(
+ def begin_reestablish_replication(
self,
resource_group_name: str,
account_name: str,
- body: Union[_models.ElasticAccountUpdate, JSON, IO[bytes]],
+ pool_name: str,
+ volume_name: str,
+ body: Union[_models.ReestablishReplicationRequest, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ElasticAccount]:
- """Patch the specified NetApp Elastic Account.
+ ) -> LROPoller[None]:
+ """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or
+ policy-based snapshots.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticAccountUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticAccountUpdate or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: body for the id of the source volume. Is one of the following types:
+ ReestablishReplicationRequest, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.ReestablishReplicationRequest or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticAccount] = kwargs.pop("cls", None)
+ cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._update_initial(
+ raw_result = self._reestablish_replication_initial(
resource_group_name=resource_group_name,
account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -20619,12 +7801,9 @@ def begin_update(
raw_result.http_response.read() # type: ignore
kwargs.pop("error_map", None)
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticAccount, response.json())
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
+ return cls(pipeline_response, None, {}) # type: ignore
path_format_arguments = {
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
@@ -20639,24 +7818,33 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ElasticAccount].from_continuation_token(
+ return LROPoller[None].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ElasticAccount](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _delete_initial(self, resource_group_name: str, account_name: str, **kwargs: Any) -> Iterator[bytes]:
+ @distributed_trace
+ def replication_status(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> _models.ReplicationStatus:
+ """Get the status of the replication.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: ReplicationStatus. The ReplicationStatus is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.ReplicationStatus
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
@@ -20668,11 +7856,13 @@ def _delete_initial(self, resource_group_name: str, account_name: str, **kwargs:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+ cls: ClsType[_models.ReplicationStatus] = kwargs.pop("cls", None)
- _request = build_elastic_accounts_delete_request(
+ _request = build_volumes_replication_status_request(
resource_group_name=resource_group_name,
account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -20683,18 +7873,19 @@ def _delete_initial(self, resource_group_name: str, account_name: str, **kwargs:
}
_request.url = self._client.format_url(_request.url, **path_format_arguments)
- _stream = True
+ _stream = kwargs.pop("stream", False)
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **kwargs
)
response = pipeline_response.http_response
- if response.status_code not in [202, 204]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
+ if response.status_code not in [200]:
+ if _stream:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = _failsafe_deserialize(
_models.ErrorResponse,
@@ -20702,102 +7893,165 @@ def _delete_initial(self, resource_group_name: str, account_name: str, **kwargs:
)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
+ if _stream:
+ deserialized = response.iter_bytes()
+ else:
+ deserialized = _deserialize(_models.ReplicationStatus, response.json())
if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_delete(self, resource_group_name: str, account_name: str, **kwargs: Any) -> LROPoller[None]:
- """Delete the specified NetApp elastic account.
+ @overload
+ def list_replications(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[_models.ListReplicationsRequest] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> ItemPaged["_models.Replication"]:
+ """List all replications for a specified volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: The content of the action request. Default value is None.
+ :type body: ~azure.mgmt.netapp.models.ListReplicationsRequest
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An iterator like instance of Replication
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
- cls: ClsType[None] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._delete_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
+ @overload
+ def list_replications(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[JSON] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> ItemPaged["_models.Replication"]:
+ """List all replications for a specified volume.
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: The content of the action request. Default value is None.
+ :type body: JSON
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An iterator like instance of Replication
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
+ @overload
+ def list_replications(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[IO[bytes]] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> ItemPaged["_models.Replication"]:
+ """List all replications for a specified volume.
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[None].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: The content of the action request. Default value is None.
+ :type body: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An iterator like instance of Replication
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
@distributed_trace
@api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={"2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]},
- api_versions_list=["2025-09-01-preview"],
+ method_added_on="2025-08-01",
+ params_added_on={
+ "2025-08-01": [
+ "api_version",
+ "subscription_id",
+ "resource_group_name",
+ "account_name",
+ "pool_name",
+ "volume_name",
+ "content_type",
+ "accept",
+ ]
+ },
+ api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview", "2025-12-01"],
)
- def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.ElasticAccount"]:
- """List and describe all NetApp elastic accounts in the resource group.
+ def list_replications(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[Union[_models.ListReplicationsRequest, JSON, IO[bytes]]] = None,
+ **kwargs: Any
+ ) -> ItemPaged["_models.Replication"]:
+ """List all replications for a specified volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :return: An iterator like instance of ElasticAccount
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticAccount]
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: The content of the action request. Is one of the following types:
+ ListReplicationsRequest, JSON, IO[bytes] Default value is None.
+ :type body: ~azure.mgmt.netapp.models.ListReplicationsRequest or JSON or IO[bytes]
+ :return: An iterator like instance of Replication
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = kwargs.pop("headers", {}) or {}
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[List[_models.ElasticAccount]] = kwargs.pop("cls", None)
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ content_type = content_type if body else None
+ cls: ClsType[List[_models.Replication]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -20806,14 +8060,28 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
+ content_type = content_type or "application/json" if body else None
+ _content = None
+ if isinstance(body, (IOBase, bytes)):
+ _content = body
+ else:
+ if body is not None:
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ else:
+ _content = None
def prepare_request(next_link=None):
if not next_link:
- _request = build_elastic_accounts_list_by_resource_group_request(
+ _request = build_volumes_list_replications_request(
resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
+ content_type=content_type,
api_version=self._config.api_version,
+ content=_content,
headers=_headers,
params=_params,
)
@@ -20848,7 +8116,7 @@ def prepare_request(next_link=None):
def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticAccount], deserialized.get("value", []))
+ list_of_elem = _deserialize(List[_models.Replication], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -20874,24 +8142,9 @@ def get_next(next_link=None):
return ItemPaged(get_next, extract_data)
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={"2025-09-01-preview": ["api_version", "subscription_id", "accept"]},
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.ElasticAccount"]:
- """List and describe all NetApp elastic accounts in the subscription.
-
- :return: An iterator like instance of ElasticAccount
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticAccount]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticAccount]] = kwargs.pop("cls", None)
-
+ def _resync_replication_initial(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
@@ -20900,121 +8153,126 @@ def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.ElasticAccou
}
error_map.update(kwargs.pop("error_map", {}) or {})
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_accounts_list_by_subscription_request(
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticAccount], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
- def get_next(next_link=None):
- _request = prepare_request(next_link)
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
+ _request = build_volumes_resync_replication_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ subscription_id=self._config.subscription_id,
+ api_version=self._config.api_version,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
- return pipeline_response
+ response = pipeline_response.http_response
- return ItemPaged(get_next, extract_data)
+ if response.status_code not in [200, 202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
+ )
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-class ElasticCapacityPoolsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
+ deserialized = response.iter_bytes()
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`elastic_capacity_pools` attribute.
- """
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
+ return deserialized # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def get(
- self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any
- ) -> _models.ElasticCapacityPool:
- """Get the NetApp Elastic Capacity Pool.
+ def begin_resync_replication(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Resync the connection on the destination volume. If the operation is ran on the source volume
+ it will reverse-resync the connection and sync from destination to source.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :return: ElasticCapacityPool. The ElasticCapacityPool is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticCapacityPool
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._resync_replication_initial(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ def _delete_replication_initial(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
@@ -21026,12 +8284,13 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None)
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_elastic_capacity_pools_get_request(
+ _request = build_volumes_delete_replication_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -21042,19 +8301,18 @@ def get(
}
_request.url = self._client.format_url(_request.url, **path_format_arguments)
- _stream = kwargs.pop("stream", False)
+ _stream = True
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **kwargs
)
response = pipeline_response.http_response
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
+ if response.status_code not in [200, 202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = _failsafe_deserialize(
_models.ErrorResponse,
@@ -21062,37 +8320,91 @@ def get(
)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ElasticCapacityPool, response.json())
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.iter_bytes()
if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _create_or_update_initial(
+ @distributed_trace
+ def begin_delete_replication(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Delete the replication connection on the destination volume, and send release to the source
+ replication.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._delete_replication_initial(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ def _authorize_replication_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- body: Union[_models.ElasticCapacityPool, JSON, IO[bytes]],
+ volume_name: str,
+ body: Union[_models.AuthorizeRequest, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -21116,10 +8428,11 @@ def _create_or_update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_elastic_capacity_pools_create_or_update_request(
+ _request = build_volumes_authorize_replication_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -21139,7 +8452,7 @@ def _create_or_update_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 201]:
+ if response.status_code not in [200, 202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -21152,10 +8465,8 @@ def _create_or_update_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
deserialized = response.iter_bytes()
@@ -21166,156 +8477,146 @@ def _create_or_update_initial(
return deserialized # type: ignore
@overload
- def begin_create_or_update(
+ def begin_authorize_replication(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- body: _models.ElasticCapacityPool,
+ volume_name: str,
+ body: _models.AuthorizeRequest,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticCapacityPool]:
- """Create or update the specified NetApp Elastic Capacity Pool within the resource group and
- NetApp Elastic Account.
+ ) -> LROPoller[None]:
+ """Authorize the replication connection on the source volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticCapacityPool
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Authorize request object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.AuthorizeRequest
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_authorize_replication(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
+ volume_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticCapacityPool]:
- """Create or update the specified NetApp Elastic Capacity Pool within the resource group and
- NetApp Elastic Account.
+ ) -> LROPoller[None]:
+ """Authorize the replication connection on the source volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param body: Resource create parameters. Required.
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Authorize request object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_authorize_replication(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
+ volume_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticCapacityPool]:
- """Create or update the specified NetApp Elastic Capacity Pool within the resource group and
- NetApp Elastic Account.
+ ) -> LROPoller[None]:
+ """Authorize the replication connection on the source volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param body: Resource create parameters. Required.
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Authorize request object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_create_or_update(
+ def begin_authorize_replication(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- body: Union[_models.ElasticCapacityPool, JSON, IO[bytes]],
+ volume_name: str,
+ body: Union[_models.AuthorizeRequest, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ElasticCapacityPool]:
- """Create or update the specified NetApp Elastic Capacity Pool within the resource group and
- NetApp Elastic Account.
+ ) -> LROPoller[None]:
+ """Authorize the replication connection on the source volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticCapacityPool,
- JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticCapacityPool or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Authorize request object supplied in the body of the operation. Is one of the
+ following types: AuthorizeRequest, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.AuthorizeRequest or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None)
+ cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._create_or_update_initial(
+ raw_result = self._authorize_replication_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
+ volume_name=volume_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -21326,12 +8627,9 @@ def begin_create_or_update(
raw_result.http_response.read() # type: ignore
kwargs.pop("error_map", None)
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticCapacityPool, response.json())
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
+ return cls(pipeline_response, None, {}) # type: ignore
path_format_arguments = {
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
@@ -21346,37 +8644,148 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ElasticCapacityPool].from_continuation_token(
+ return LROPoller[None].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ElasticCapacityPool](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ def _re_initialize_replication_initial(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ _request = build_volumes_re_initialize_replication_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ subscription_id=self._config.subscription_id,
+ api_version=self._config.api_version,
+ headers=_headers,
+ params=_params,
)
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _update_initial(
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
+ )
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.iter_bytes()
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def begin_re_initialize_replication(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Re-Initializes the replication connection on the destination volume.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._re_initialize_replication_initial(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ def _peer_external_cluster_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- body: Union[_models.ElasticCapacityPoolUpdate, JSON, IO[bytes]],
+ volume_name: str,
+ body: Union[_models.PeerClusterForVolumeMigrationRequest, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -21400,10 +8809,11 @@ def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_elastic_capacity_pools_update_request(
+ _request = build_volumes_peer_external_cluster_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -21437,9 +8847,6 @@ def _update_initial(
response_headers = {}
if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
@@ -21451,152 +8858,150 @@ def _update_initial(
return deserialized # type: ignore
@overload
- def begin_update(
+ def begin_peer_external_cluster(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- body: _models.ElasticCapacityPoolUpdate,
+ volume_name: str,
+ body: _models.PeerClusterForVolumeMigrationRequest,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticCapacityPool]:
- """Patch the specified NetApp Elastic Capacity Pool.
+ ) -> LROPoller[_models.ClusterPeerCommandResponse]:
+ """Starts peering the external cluster for this migration volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticCapacityPoolUpdate
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Cluster peer request object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
+ :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The
+ ClusterPeerCommandResponse is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_update(
+ def begin_peer_external_cluster(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
+ volume_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticCapacityPool]:
- """Patch the specified NetApp Elastic Capacity Pool.
+ ) -> LROPoller[_models.ClusterPeerCommandResponse]:
+ """Starts peering the external cluster for this migration volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param body: The resource properties to be updated. Required.
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Cluster peer request object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
+ :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The
+ ClusterPeerCommandResponse is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_update(
+ def begin_peer_external_cluster(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
+ volume_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticCapacityPool]:
- """Patch the specified NetApp Elastic Capacity Pool.
+ ) -> LROPoller[_models.ClusterPeerCommandResponse]:
+ """Starts peering the external cluster for this migration volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param body: The resource properties to be updated. Required.
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Cluster peer request object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
+ :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The
+ ClusterPeerCommandResponse is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_update(
+ def begin_peer_external_cluster(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- body: Union[_models.ElasticCapacityPoolUpdate, JSON, IO[bytes]],
+ volume_name: str,
+ body: Union[_models.PeerClusterForVolumeMigrationRequest, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ElasticCapacityPool]:
- """Patch the specified NetApp Elastic Capacity Pool.
+ ) -> LROPoller[_models.ClusterPeerCommandResponse]:
+ """Starts peering the external cluster for this migration volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticCapacityPoolUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticCapacityPoolUpdate or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Cluster peer request object supplied in the body of the operation. Is one of the
+ following types: PeerClusterForVolumeMigrationRequest, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.PeerClusterForVolumeMigrationRequest or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns ClusterPeerCommandResponse. The
+ ClusterPeerCommandResponse is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None)
+ cls: ClsType[_models.ClusterPeerCommandResponse] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._update_initial(
+ raw_result = self._peer_external_cluster_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
+ volume_name=volume_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -21608,10 +9013,14 @@ def begin_update(
kwargs.pop("error_map", None)
def get_long_running_output(pipeline_response):
+ response_headers = {}
response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticCapacityPool, response.json())
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = _deserialize(_models.ClusterPeerCommandResponse, response.json())
if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized
path_format_arguments = {
@@ -21627,25 +9036,18 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ElasticCapacityPool].from_continuation_token(
+ return LROPoller[_models.ClusterPeerCommandResponse].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ElasticCapacityPool](
+ return LROPoller[_models.ClusterPeerCommandResponse](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "pool_name"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _delete_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any
+ def _authorize_external_replication_initial(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -21660,10 +9062,11 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_elastic_capacity_pools_delete_request(
+ _request = build_volumes_authorize_external_replication_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -21681,7 +9084,7 @@ def _delete_initial(
response = pipeline_response.http_response
- if response.status_code not in [202, 204]:
+ if response.status_code not in [200, 202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -21706,41 +9109,39 @@ def _delete_initial(
return deserialized # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "pool_name"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_delete(
- self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Delete the specified NetApp Elastic Capacity Pool.
+ def begin_authorize_external_replication(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> LROPoller[_models.SvmPeerCommandResponse]:
+ """Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once
+ the SVM have been peered a SnapMirror will be created.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: An instance of LROPoller that returns SvmPeerCommandResponse. The
+ SvmPeerCommandResponse is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SvmPeerCommandResponse]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[None] = kwargs.pop("cls", None)
+ cls: ClsType[_models.SvmPeerCommandResponse] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._delete_initial(
+ raw_result = self._authorize_external_replication_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
+ volume_name=volume_name,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -21749,9 +9150,16 @@ def begin_delete(
raw_result.http_response.read() # type: ignore
kwargs.pop("error_map", None)
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ def get_long_running_output(pipeline_response):
+ response_headers = {}
+ response = pipeline_response.http_response
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = _deserialize(_models.SvmPeerCommandResponse, response.json())
if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return deserialized
path_format_arguments = {
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
@@ -21766,41 +9174,19 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
else:
polling_method = polling
if cont_token:
- return LROPoller[None].from_continuation_token(
+ return LROPoller[_models.SvmPeerCommandResponse].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_elastic_account(
- self, resource_group_name: str, account_name: str, **kwargs: Any
- ) -> ItemPaged["_models.ElasticCapacityPool"]:
- """List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :return: An iterator like instance of ElasticCapacityPool
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticCapacityPool]] = kwargs.pop("cls", None)
+ return LROPoller[_models.SvmPeerCommandResponse](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+ def _finalize_external_replication_initial(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
@@ -21809,96 +9195,124 @@ def list_by_elastic_account(
}
error_map.update(kwargs.pop("error_map", {}) or {})
- def prepare_request(next_link=None):
- if not next_link:
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
- _request = build_elastic_capacity_pools_list_by_elastic_account_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
+ _request = build_volumes_finalize_external_replication_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ subscription_id=self._config.subscription_id,
+ api_version=self._config.api_version,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
- return _request
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticCapacityPool], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
+ response = pipeline_response.http_response
- def get_next(next_link=None):
- _request = prepare_request(next_link)
+ if response.status_code not in [202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
+ )
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
+ response_headers = {}
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.iter_bytes()
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def begin_finalize_external_replication(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Finalizes the migration of an external volume by releasing the replication and breaking the
+ external cluster peering if no other migration is active.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._finalize_external_replication_initial(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
)
- response = pipeline_response.http_response
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
- return pipeline_response
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
- return ItemPaged(get_next, extract_data)
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _change_zone_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: Union[_models.ChangeZoneRequest, JSON, IO[bytes]],
- **kwargs: Any
+ def _perform_replication_transfer_initial(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -21908,27 +9322,18 @@ def _change_zone_initial(
}
error_map.update(kwargs.pop("error_map", {}) or {})
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_capacity_pools_change_zone_request(
+ _request = build_volumes_perform_replication_transfer_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
- content_type=content_type,
api_version=self._config.api_version,
- content=_content,
headers=_headers,
params=_params,
)
@@ -21944,7 +9349,7 @@ def _change_zone_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202]:
+ if response.status_code not in [202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -21957,9 +9362,8 @@ def _change_zone_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
deserialized = response.iter_bytes()
@@ -21968,532 +9372,332 @@ def _change_zone_initial(
return deserialized # type: ignore
- @overload
- def begin_change_zone(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: _models.ChangeZoneRequest,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.ElasticCapacityPool]:
- """Moves pool to another zone.
+ @distributed_trace
+ def begin_perform_replication_transfer(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Performs an adhoc replication transfer on a volume with volumeType Migration.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param body: The content of the action request. Required.
- :type body: ~azure.mgmt.netapp.models.ChangeZoneRequest
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
- @overload
- def begin_change_zone(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.ElasticCapacityPool]:
- """Moves pool to another zone.
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._perform_replication_transfer_initial(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The content of the action request. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
- @overload
- def begin_change_zone(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.ElasticCapacityPool]:
- """Moves pool to another zone.
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The content of the action request. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_change_zone(
+ def _pool_change_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- body: Union[_models.ChangeZoneRequest, JSON, IO[bytes]],
+ volume_name: str,
+ body: Union[_models.PoolChangeRequest, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ElasticCapacityPool]:
- """Moves pool to another zone.
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param body: The content of the action request. Is one of the following types:
- ChangeZoneRequest, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ChangeZoneRequest or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticCapacityPool. The ElasticCapacityPool is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticCapacityPool]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticCapacityPool] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._change_zone_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _content = None
+ if isinstance(body, (IOBase, bytes)):
+ _content = body
+ else:
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+
+ _request = build_volumes_pool_change_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ subscription_id=self._config.subscription_id,
+ content_type=content_type,
+ api_version=self._config.api_version,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
+
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
)
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- def get_long_running_output(pipeline_response):
- response_headers = {}
- response = pipeline_response.http_response
+ response_headers = {}
+ if response.status_code == 202:
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
- deserialized = _deserialize(_models.ElasticCapacityPool, response.json())
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
- return deserialized
+ deserialized = response.iter_bytes()
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.ElasticCapacityPool].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.ElasticCapacityPool](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
+ return deserialized # type: ignore
@overload
- def check_volume_file_path_availability(
+ def begin_pool_change(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- body: _models.CheckElasticVolumeFilePathAvailabilityRequest,
+ volume_name: str,
+ body: _models.PoolChangeRequest,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> _models.CheckElasticResourceAvailabilityResponse:
- """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool.
+ ) -> LROPoller[None]:
+ """Moves volume to another pool.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param body: The content of the action request. Required.
- :type body: ~azure.mgmt.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Move volume to the pool supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.PoolChangeRequest
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse
- is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def check_volume_file_path_availability(
+ def begin_pool_change(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
+ volume_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> _models.CheckElasticResourceAvailabilityResponse:
- """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool.
+ ) -> LROPoller[None]:
+ """Moves volume to another pool.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param body: The content of the action request. Required.
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Move volume to the pool supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse
- is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def check_volume_file_path_availability(
+ def begin_pool_change(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
+ volume_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> _models.CheckElasticResourceAvailabilityResponse:
- """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool.
+ ) -> LROPoller[None]:
+ """Moves volume to another pool.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param body: The content of the action request. Required.
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Move volume to the pool supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse
- is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def check_volume_file_path_availability(
+ def begin_pool_change(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- body: Union[_models.CheckElasticVolumeFilePathAvailabilityRequest, JSON, IO[bytes]],
+ volume_name: str,
+ body: Union[_models.PoolChangeRequest, JSON, IO[bytes]],
**kwargs: Any
- ) -> _models.CheckElasticResourceAvailabilityResponse:
- """Check if an Elastic Volume file path is available within the given Elastic Capacity Pool.
+ ) -> LROPoller[None]:
+ """Moves volume to another pool.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param body: The content of the action request. Is one of the following types:
- CheckElasticVolumeFilePathAvailabilityRequest, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest or JSON or
- IO[bytes]
- :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse
- is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Move volume to the pool supplied in the body of the operation. Is one of the
+ following types: PoolChangeRequest, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.PoolChangeRequest or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.CheckElasticResourceAvailabilityResponse] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_capacity_pools_check_volume_file_path_availability_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._pool_change_initial(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ body=body,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.CheckElasticResourceAvailabilityResponse, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
-
-class ElasticVolumesOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`elastic_volumes` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def get(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> _models.ElasticVolume:
- """Get the details of the specified volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :return: ElasticVolume. The ElasticVolume is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticVolume
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None)
-
- _request = build_elastic_volumes_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
path_format_arguments = {
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
}
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
else:
- deserialized = _deserialize(_models.ElasticVolume, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _create_or_update_initial(
+ def _relocate_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: Union[_models.ElasticVolume, JSON, IO[bytes]],
+ body: Optional[Union[_models.RelocateVolumeRequest, JSON, IO[bytes]]] = None,
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -22508,16 +9712,20 @@ def _create_or_update_initial(
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ content_type = content_type if body else None
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- content_type = content_type or "application/json"
+ content_type = content_type or "application/json" if body else None
_content = None
if isinstance(body, (IOBase, bytes)):
_content = body
else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ if body is not None:
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ else:
+ _content = None
- _request = build_elastic_volumes_create_or_update_request(
+ _request = build_volumes_relocate_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
@@ -22541,7 +9749,7 @@ def _create_or_update_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 201]:
+ if response.status_code not in [200, 202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -22554,10 +9762,8 @@ def _create_or_update_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
deserialized = response.iter_bytes()
@@ -22568,168 +9774,276 @@ def _create_or_update_initial(
return deserialized # type: ignore
@overload
- def begin_create_or_update(
+ def begin_relocate(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: _models.ElasticVolume,
+ body: Optional[_models.RelocateVolumeRequest] = None,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticVolume]:
- """Create or update the specified volume within the capacity pool.
+ ) -> LROPoller[None]:
+ """Relocates volume to a new stamp.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticVolume
+ :param body: Relocate volume request. Default value is None.
+ :type body: ~azure.mgmt.netapp.models.RelocateVolumeRequest
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_relocate(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: JSON,
+ body: Optional[JSON] = None,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticVolume]:
- """Create or update the specified volume within the capacity pool.
+ ) -> LROPoller[None]:
+ """Relocates volume to a new stamp.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param body: Resource create parameters. Required.
+ :param body: Relocate volume request. Default value is None.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_relocate(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: IO[bytes],
+ body: Optional[IO[bytes]] = None,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticVolume]:
- """Create or update the specified volume within the capacity pool.
+ ) -> LROPoller[None]:
+ """Relocates volume to a new stamp.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param body: Resource create parameters. Required.
+ :param body: Relocate volume request. Default value is None.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_relocate(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[Union[_models.RelocateVolumeRequest, JSON, IO[bytes]]] = None,
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Relocates volume to a new stamp.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: Relocate volume request. Is one of the following types: RelocateVolumeRequest,
+ JSON, IO[bytes] Default value is None.
+ :type body: ~azure.mgmt.netapp.models.RelocateVolumeRequest or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = kwargs.pop("params", {}) or {}
+
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ content_type = content_type if body else None
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._relocate_initial(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ body=body,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ def _finalize_relocation_initial(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ _request = build_volumes_finalize_relocation_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ subscription_id=self._config.subscription_id,
+ api_version=self._config.api_version,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
+
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
+ )
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.iter_bytes()
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.ElasticVolume, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.ElasticVolume]:
- """Create or update the specified volume within the capacity pool.
+ def begin_finalize_relocation(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Finalizes the relocation of the volume and cleans up the old volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticVolume, JSON,
- IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticVolume or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None)
+ cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._create_or_update_initial(
+ raw_result = self._finalize_relocation_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
- body=body,
- content_type=content_type,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -22738,12 +10052,9 @@ def begin_create_or_update(
raw_result.http_response.read() # type: ignore
kwargs.pop("error_map", None)
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticVolume, response.json())
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
+ return cls(pipeline_response, None, {}) # type: ignore
path_format_arguments = {
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
@@ -22758,40 +10069,16 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ElasticVolume].from_continuation_token(
+ return LROPoller[None].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ElasticVolume](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.ElasticVolumeUpdate, JSON, IO[bytes]],
- **kwargs: Any
+ def _revert_relocation_initial(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -22801,28 +10088,18 @@ def _update_initial(
}
error_map.update(kwargs.pop("error_map", {}) or {})
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_volumes_update_request(
+ _request = build_volumes_revert_relocation_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
subscription_id=self._config.subscription_id,
- content_type=content_type,
api_version=self._config.api_version,
- content=_content,
headers=_headers,
params=_params,
)
@@ -22852,9 +10129,6 @@ def _update_initial(
response_headers = {}
if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
@@ -22865,169 +10139,39 @@ def _update_initial(
return deserialized # type: ignore
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: _models.ElasticVolumeUpdate,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.ElasticVolume]:
- """Patch the specified elastic volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticVolumeUpdate
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.ElasticVolume]:
- """Patch the specified elastic volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: The resource properties to be updated. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.ElasticVolume]:
- """Patch the specified elastic volume.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: The resource properties to be updated. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.ElasticVolumeUpdate, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.ElasticVolume]:
- """Patch the specified elastic volume.
+ def begin_revert_relocation(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Reverts the volume relocation process, cleans up the new volume and starts using the
+ former-existing volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticVolumeUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticVolumeUpdate or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None)
+ cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._update_initial(
+ raw_result = self._revert_relocation_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
- body=body,
- content_type=content_type,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -23036,12 +10180,9 @@ def begin_update(
raw_result.http_response.read() # type: ignore
kwargs.pop("error_map", None)
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticVolume, response.json())
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
+ return cls(pipeline_response, None, {}) # type: ignore
path_format_arguments = {
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
@@ -23056,32 +10197,38 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ElasticVolume].from_continuation_token(
+ return LROPoller[None].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ElasticVolume](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
@api_version_validation(
- method_added_on="2025-09-01-preview",
+ method_added_on="2025-12-01",
params_added_on={
- "2025-09-01-preview": [
+ "2025-12-01": [
"api_version",
"subscription_id",
"resource_group_name",
"account_name",
"pool_name",
"volume_name",
+ "content_type",
+ "accept",
]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=["2025-12-01"],
)
- def _delete_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ def _list_quota_report_initial(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[Union[_models.QuotaReportFilterRequest, JSON, IO[bytes]]] = None,
+ **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -23091,18 +10238,32 @@ def _delete_initial(
}
error_map.update(kwargs.pop("error_map", {}) or {})
- _headers = kwargs.pop("headers", {}) or {}
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ content_type = content_type if body else None
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_elastic_volumes_delete_request(
+ content_type = content_type or "application/json" if body else None
+ _content = None
+ if isinstance(body, (IOBase, bytes)):
+ _content = body
+ else:
+ if body is not None:
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ else:
+ _content = None
+
+ _request = build_volumes_list_quota_report_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
subscription_id=self._config.subscription_id,
+ content_type=content_type,
api_version=self._config.api_version,
+ content=_content,
headers=_headers,
params=_params,
)
@@ -23118,7 +10279,7 @@ def _delete_initial(
response = pipeline_response.http_response
- if response.status_code not in [202, 204]:
+ if response.status_code not in [200, 202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -23132,6 +10293,9 @@ def _delete_initial(
response_headers = {}
if response.status_code == 202:
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
@@ -23142,52 +10306,170 @@ def _delete_initial(
return deserialized # type: ignore
+ @overload
+ def begin_list_quota_report(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[_models.QuotaReportFilterRequest] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.ListQuotaReportResponse]:
+ """Get quota report for volume (with filter support).
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: The content of the action request. Default value is None.
+ :type body: ~azure.mgmt.netapp.models.QuotaReportFilterRequest
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns ListQuotaReportResponse. The
+ ListQuotaReportResponse is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResponse]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_list_quota_report(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[JSON] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.ListQuotaReportResponse]:
+ """Get quota report for volume (with filter support).
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: The content of the action request. Default value is None.
+ :type body: JSON
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns ListQuotaReportResponse. The
+ ListQuotaReportResponse is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResponse]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_list_quota_report(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[IO[bytes]] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.ListQuotaReportResponse]:
+ """Get quota report for volume (with filter support).
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param body: The content of the action request. Default value is None.
+ :type body: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns ListQuotaReportResponse. The
+ ListQuotaReportResponse is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResponse]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
@distributed_trace
@api_version_validation(
- method_added_on="2025-09-01-preview",
+ method_added_on="2025-12-01",
params_added_on={
- "2025-09-01-preview": [
+ "2025-12-01": [
"api_version",
"subscription_id",
"resource_group_name",
"account_name",
"pool_name",
"volume_name",
+ "content_type",
+ "accept",
]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=["2025-12-01"],
)
- def begin_delete(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> LROPoller[None]:
- """Delete the specified Elastic Volume.
+ def begin_list_quota_report(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ body: Optional[Union[_models.QuotaReportFilterRequest, JSON, IO[bytes]]] = None,
+ **kwargs: Any
+ ) -> LROPoller[_models.ListQuotaReportResponse]:
+ """Get quota report for volume (with filter support).
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :return: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :param body: The content of the action request. Is one of the following types:
+ QuotaReportFilterRequest, JSON, IO[bytes] Default value is None.
+ :type body: ~azure.mgmt.netapp.models.QuotaReportFilterRequest or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns ListQuotaReportResponse. The
+ ListQuotaReportResponse is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResponse]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = kwargs.pop("headers", {}) or {}
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[None] = kwargs.pop("cls", None)
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ content_type = content_type if body else None
+ cls: ClsType[_models.ListQuotaReportResponse] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._delete_initial(
+ raw_result = self._list_quota_report_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
+ body=body,
+ content_type=content_type,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -23196,9 +10478,19 @@ def begin_delete(
raw_result.http_response.read() # type: ignore
kwargs.pop("error_map", None)
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ def get_long_running_output(pipeline_response):
+ response_headers = {}
+ response = pipeline_response.http_response
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = _deserialize(_models.ListQuotaReportResponse, response.json())
if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return deserialized
path_format_arguments = {
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
@@ -23213,50 +10505,61 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
else:
polling_method = polling
if cont_token:
- return LROPoller[None].from_continuation_token(
+ return LROPoller[_models.ListQuotaReportResponse].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+ return LROPoller[_models.ListQuotaReportResponse](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+
+class SnapshotsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
+ :attr:`snapshots` attribute.
+ """
+
+ def __init__(self, *args, **kwargs) -> None:
+ input_args = list(args)
+ self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
+ self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_elastic_pool(
- self, resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any
- ) -> ItemPaged["_models.ElasticVolume"]:
- """List all Elastic Volumes within the Elastic Capacity Pool.
+ def get(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ snapshot_name: str,
+ **kwargs: Any
+ ) -> _models.Snapshot:
+ """Get details of the specified snapshot.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :return: An iterator like instance of ElasticVolume
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticVolume]
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param snapshot_name: The name of the snapshot. Required.
+ :type snapshot_name: str
+ :return: Snapshot. The Snapshot is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.Snapshot
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticVolume]] = kwargs.pop("cls", None)
-
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
@@ -23265,98 +10568,65 @@ def list_by_elastic_pool(
}
error_map.update(kwargs.pop("error_map", {}) or {})
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_volumes_list_by_elastic_pool_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
+ cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None)
- return _request
+ _request = build_snapshots_get_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ snapshot_name=snapshot_name,
+ subscription_id=self._config.subscription_id,
+ api_version=self._config.api_version,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticVolume], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
+ _stream = kwargs.pop("stream", False)
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
- def get_next(next_link=None):
- _request = prepare_request(next_link)
+ response = pipeline_response.http_response
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
+ if response.status_code not in [200]:
+ if _stream:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
)
- response = pipeline_response.http_response
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ if _stream:
+ deserialized = response.iter_bytes()
+ else:
+ deserialized = _deserialize(_models.Snapshot, response.json())
- return pipeline_response
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
- return ItemPaged(get_next, extract_data)
+ return deserialized # type: ignore
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _revert_initial(
+ def _create_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: Union[_models.ElasticVolumeRevert, JSON, IO[bytes]],
+ snapshot_name: str,
+ body: Union[_models.Snapshot, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -23380,11 +10650,12 @@ def _revert_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_elastic_volumes_revert_request(
+ _request = build_snapshots_create_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
volume_name=volume_name,
+ snapshot_name=snapshot_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -23404,7 +10675,7 @@ def _revert_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202]:
+ if response.status_code not in [201, 202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -23417,9 +10688,8 @@ def _revert_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
deserialized = response.iter_bytes()
@@ -23429,355 +10699,215 @@ def _revert_initial(
return deserialized # type: ignore
@overload
- def begin_revert(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: _models.ElasticVolumeRevert,
+ snapshot_name: str,
+ body: _models.Snapshot,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticVolume]:
- """Revert an Elastic Volume to the snapshot specified in the body.
+ ) -> LROPoller[_models.Snapshot]:
+ """Create the specified snapshot within the given volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param body: The content of the action request. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticVolumeRevert
+ :param snapshot_name: The name of the snapshot. Required.
+ :type snapshot_name: str
+ :param body: Snapshot object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.Snapshot
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume]
+ :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_revert(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
+ snapshot_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticVolume]:
- """Revert an Elastic Volume to the snapshot specified in the body.
+ ) -> LROPoller[_models.Snapshot]:
+ """Create the specified snapshot within the given volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param body: The content of the action request. Required.
+ :param snapshot_name: The name of the snapshot. Required.
+ :type snapshot_name: str
+ :param body: Snapshot object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume]
+ :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_revert(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
+ snapshot_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticVolume]:
- """Revert an Elastic Volume to the snapshot specified in the body.
+ ) -> LROPoller[_models.Snapshot]:
+ """Create the specified snapshot within the given volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param body: The content of the action request. Required.
+ :param snapshot_name: The name of the snapshot. Required.
+ :type snapshot_name: str
+ :param body: Snapshot object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_revert(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.ElasticVolumeRevert, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.ElasticVolume]:
- """Revert an Elastic Volume to the snapshot specified in the body.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
- :type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
- :type volume_name: str
- :param body: The content of the action request. Is one of the following types:
- ElasticVolumeRevert, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticVolumeRevert or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticVolume. The ElasticVolume is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticVolume]
+ :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticVolume] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._revert_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response_headers = {}
- response = pipeline_response.http_response
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = _deserialize(_models.ElasticVolume, response.json())
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.ElasticVolume].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.ElasticVolume](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
-
-class ElasticSnapshotsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`elastic_snapshots` attribute.
- """
-
- def __init__(self, *args, **kwargs) -> None:
- input_args = list(args)
- self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
- self._config: NetAppManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
- self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
- self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "snapshot_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def get(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
snapshot_name: str,
+ body: Union[_models.Snapshot, JSON, IO[bytes]],
**kwargs: Any
- ) -> _models.ElasticSnapshot:
- """Get a ElasticSnapshot.
+ ) -> LROPoller[_models.Snapshot]:
+ """Create the specified snapshot within the given volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param snapshot_name: The name of the ElasticSnapshot. Required.
+ :param snapshot_name: The name of the snapshot. Required.
:type snapshot_name: str
- :return: ElasticSnapshot. The ElasticSnapshot is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticSnapshot
+ :param body: Snapshot object supplied in the body of the operation. Is one of the following
+ types: Snapshot, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.Snapshot or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.ElasticSnapshot] = kwargs.pop("cls", None)
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._create_initial(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ snapshot_name=snapshot_name,
+ body=body,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ response_headers = {}
+ response = pipeline_response.http_response
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = _deserialize(_models.Snapshot, response.json())
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return deserialized
- _request = build_elastic_snapshots_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
path_format_arguments = {
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
}
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
else:
- deserialized = _deserialize(_models.ElasticSnapshot, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.Snapshot].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.Snapshot](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "snapshot_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _create_or_update_initial(
+ def _update_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
snapshot_name: str,
- body: Union[_models.ElasticSnapshot, JSON, IO[bytes]],
+ body: Union[_models.SnapshotPatch, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -23801,7 +10931,7 @@ def _create_or_update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_elastic_snapshots_create_or_update_request(
+ _request = build_snapshots_update_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
@@ -23826,7 +10956,7 @@ def _create_or_update_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 201]:
+ if response.status_code not in [200, 202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -23839,10 +10969,8 @@ def _create_or_update_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
deserialized = response.iter_bytes()
@@ -23853,44 +10981,44 @@ def _create_or_update_initial(
return deserialized # type: ignore
@overload
- def begin_create_or_update(
+ def begin_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
snapshot_name: str,
- body: _models.ElasticSnapshot,
+ body: _models.SnapshotPatch,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticSnapshot]:
- """Create a ElasticSnapshot.
+ ) -> LROPoller[_models.Snapshot]:
+ """Patch a snapshot.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param snapshot_name: The name of the ElasticSnapshot. Required.
+ :param snapshot_name: The name of the snapshot. Required.
:type snapshot_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticSnapshot
+ :param body: Snapshot object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.SnapshotPatch
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticSnapshot. The ElasticSnapshot is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshot]
+ :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_update(
self,
resource_group_name: str,
account_name: str,
@@ -23901,33 +11029,33 @@ def begin_create_or_update(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticSnapshot]:
- """Create a ElasticSnapshot.
+ ) -> LROPoller[_models.Snapshot]:
+ """Patch a snapshot.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param snapshot_name: The name of the ElasticSnapshot. Required.
+ :param snapshot_name: The name of the snapshot. Required.
:type snapshot_name: str
- :param body: Resource create parameters. Required.
+ :param body: Snapshot object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticSnapshot. The ElasticSnapshot is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshot]
+ :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_update(
self,
resource_group_name: str,
account_name: str,
@@ -23938,90 +11066,73 @@ def begin_create_or_update(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticSnapshot]:
- """Create a ElasticSnapshot.
+ ) -> LROPoller[_models.Snapshot]:
+ """Patch a snapshot.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param snapshot_name: The name of the ElasticSnapshot. Required.
+ :param snapshot_name: The name of the snapshot. Required.
:type snapshot_name: str
- :param body: Resource create parameters. Required.
+ :param body: Snapshot object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticSnapshot. The ElasticSnapshot is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshot]
+ :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "snapshot_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_create_or_update(
+ def begin_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
snapshot_name: str,
- body: Union[_models.ElasticSnapshot, JSON, IO[bytes]],
+ body: Union[_models.SnapshotPatch, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ElasticSnapshot]:
- """Create a ElasticSnapshot.
+ ) -> LROPoller[_models.Snapshot]:
+ """Patch a snapshot.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param snapshot_name: The name of the ElasticSnapshot. Required.
+ :param snapshot_name: The name of the snapshot. Required.
:type snapshot_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticSnapshot, JSON,
- IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticSnapshot or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticSnapshot. The ElasticSnapshot is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshot]
+ :param body: Snapshot object supplied in the body of the operation. Is one of the following
+ types: SnapshotPatch, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.SnapshotPatch or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns Snapshot. The Snapshot is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticSnapshot] = kwargs.pop("cls", None)
+ cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._create_or_update_initial(
+ raw_result = self._update_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
@@ -24039,7 +11150,7 @@ def begin_create_or_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticSnapshot, response.json())
+ deserialized = _deserialize(_models.Snapshot, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -24057,31 +11168,16 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ElasticSnapshot].from_continuation_token(
+ return LROPoller[_models.Snapshot].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ElasticSnapshot](
+ return LROPoller[_models.Snapshot](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "snapshot_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def _delete_initial(
self,
resource_group_name: str,
@@ -24104,7 +11200,7 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_elastic_snapshots_delete_request(
+ _request = build_snapshots_delete_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
@@ -24127,7 +11223,7 @@ def _delete_initial(
response = pipeline_response.http_response
- if response.status_code not in [202, 204]:
+ if response.status_code not in [200, 202, 204]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -24152,21 +11248,6 @@ def _delete_initial(
return deserialized # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "snapshot_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def begin_delete(
self,
resource_group_name: str,
@@ -24176,18 +11257,18 @@ def begin_delete(
snapshot_name: str,
**kwargs: Any
) -> LROPoller[None]:
- """Delete a ElasticSnapshot.
+ """Delete snapshot.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :param snapshot_name: The name of the ElasticSnapshot. Required.
+ :param snapshot_name: The name of the snapshot. Required.
:type snapshot_name: str
:return: An instance of LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
@@ -24241,43 +11322,28 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "pool_name",
- "volume_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_elastic_volume(
+ def list(
self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> ItemPaged["_models.ElasticSnapshot"]:
- """List ElasticSnapshot resources by ElasticVolume.
+ ) -> ItemPaged["_models.Snapshot"]:
+ """List all snapshots associated with the volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param pool_name: The name of the ElasticCapacityPool. Required.
+ :param pool_name: The name of the capacity pool. Required.
:type pool_name: str
- :param volume_name: The name of the ElasticVolume. Required.
+ :param volume_name: The name of the volume. Required.
:type volume_name: str
- :return: An iterator like instance of ElasticSnapshot
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticSnapshot]
+ :return: An iterator like instance of Snapshot
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Snapshot]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[List[_models.ElasticSnapshot]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -24290,7 +11356,7 @@ def list_by_elastic_volume(
def prepare_request(next_link=None):
if not next_link:
- _request = build_elastic_snapshots_list_by_elastic_volume_request(
+ _request = build_snapshots_list_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
@@ -24331,7 +11397,7 @@ def prepare_request(next_link=None):
def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticSnapshot], deserialized.get("value", []))
+ list_of_elem = _deserialize(List[_models.Snapshot], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -24353,19 +11419,288 @@ def get_next(next_link=None):
)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- return pipeline_response
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
+ def _restore_files_initial(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ snapshot_name: str,
+ body: Union[_models.SnapshotRestoreFiles, JSON, IO[bytes]],
+ **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = kwargs.pop("params", {}) or {}
+
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _content = None
+ if isinstance(body, (IOBase, bytes)):
+ _content = body
+ else:
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+
+ _request = build_snapshots_restore_files_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ snapshot_name=snapshot_name,
+ subscription_id=self._config.subscription_id,
+ content_type=content_type,
+ api_version=self._config.api_version,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
+
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
+ )
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.iter_bytes()
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def begin_restore_files(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ snapshot_name: str,
+ body: _models.SnapshotRestoreFiles,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Restore the specified files from the specified snapshot to the active filesystem.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param snapshot_name: The name of the snapshot. Required.
+ :type snapshot_name: str
+ :param body: Restore payload supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.SnapshotRestoreFiles
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_restore_files(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ snapshot_name: str,
+ body: JSON,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Restore the specified files from the specified snapshot to the active filesystem.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param snapshot_name: The name of the snapshot. Required.
+ :type snapshot_name: str
+ :param body: Restore payload supplied in the body of the operation. Required.
+ :type body: JSON
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_restore_files(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ snapshot_name: str,
+ body: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Restore the specified files from the specified snapshot to the active filesystem.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param snapshot_name: The name of the snapshot. Required.
+ :type snapshot_name: str
+ :param body: Restore payload supplied in the body of the operation. Required.
+ :type body: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_restore_files(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ snapshot_name: str,
+ body: Union[_models.SnapshotRestoreFiles, JSON, IO[bytes]],
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Restore the specified files from the specified snapshot to the active filesystem.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param snapshot_name: The name of the snapshot. Required.
+ :type snapshot_name: str
+ :param body: Restore payload supplied in the body of the operation. Is one of the following
+ types: SnapshotRestoreFiles, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.SnapshotRestoreFiles or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = kwargs.pop("params", {}) or {}
+
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._restore_files_initial(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ snapshot_name=snapshot_name,
+ body=body,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
- return ItemPaged(get_next, extract_data)
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
-class ElasticSnapshotPoliciesOperations:
+class SnapshotPoliciesOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`elastic_snapshot_policies` attribute.
+ :attr:`snapshot_policies` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -24376,34 +11711,20 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def get(
self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
- ) -> _models.ElasticSnapshotPolicy:
- """Get a ElasticSnapshotPolicy.
+ ) -> _models.SnapshotPolicy:
+ """Get a snapshot Policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
+ :param snapshot_policy_name: The name of the snapshot policy. Required.
:type snapshot_policy_name: str
- :return: ElasticSnapshotPolicy. The ElasticSnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticSnapshotPolicy
+ :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
@@ -24417,9 +11738,9 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.ElasticSnapshotPolicy] = kwargs.pop("cls", None)
+ cls: ClsType[_models.SnapshotPolicy] = kwargs.pop("cls", None)
- _request = build_elastic_snapshot_policies_get_request(
+ _request = build_snapshot_policies_get_request(
resource_group_name=resource_group_name,
account_name=account_name,
snapshot_policy_name=snapshot_policy_name,
@@ -24456,139 +11777,45 @@ def get(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json())
+ deserialized = _deserialize(_models.SnapshotPolicy, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- snapshot_policy_name: str,
- body: Union[_models.ElasticSnapshotPolicy, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
-
- _request = build_elastic_snapshot_policies_create_or_update_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- subscription_id=self._config.subscription_id,
- content_type=content_type,
- api_version=self._config.api_version,
- content=_content,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200, 201]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
-
- return deserialized # type: ignore
-
@overload
- def begin_create_or_update(
+ def create(
self,
resource_group_name: str,
account_name: str,
snapshot_policy_name: str,
- body: _models.ElasticSnapshotPolicy,
+ body: _models.SnapshotPolicy,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticSnapshotPolicy]:
- """Create a ElasticSnapshotPolicy.
+ ) -> _models.SnapshotPolicy:
+ """Create a snapshot policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
+ :param snapshot_policy_name: The name of the snapshot policy. Required.
:type snapshot_policy_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicy
+ :param body: Snapshot policy object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.SnapshotPolicy
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
+ :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def create(
self,
resource_group_name: str,
account_name: str,
@@ -24597,29 +11824,28 @@ def begin_create_or_update(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticSnapshotPolicy]:
- """Create a ElasticSnapshotPolicy.
+ ) -> _models.SnapshotPolicy:
+ """Create a snapshot policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
+ :param snapshot_policy_name: The name of the snapshot policy. Required.
:type snapshot_policy_name: str
- :param body: Resource create parameters. Required.
+ :param body: Snapshot policy object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
+ :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def create(
self,
resource_group_name: str,
account_name: str,
@@ -24628,142 +11854,124 @@ def begin_create_or_update(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticSnapshotPolicy]:
- """Create a ElasticSnapshotPolicy.
+ ) -> _models.SnapshotPolicy:
+ """Create a snapshot policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
+ :param snapshot_policy_name: The name of the snapshot policy. Required.
:type snapshot_policy_name: str
- :param body: Resource create parameters. Required.
+ :param body: Snapshot policy object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
+ :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_create_or_update(
+ def create(
self,
resource_group_name: str,
account_name: str,
snapshot_policy_name: str,
- body: Union[_models.ElasticSnapshotPolicy, JSON, IO[bytes]],
+ body: Union[_models.SnapshotPolicy, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ElasticSnapshotPolicy]:
- """Create a ElasticSnapshotPolicy.
+ ) -> _models.SnapshotPolicy:
+ """Create a snapshot policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
+ :param snapshot_policy_name: The name of the snapshot policy. Required.
:type snapshot_policy_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticSnapshotPolicy,
- JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicy or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
+ :param body: Snapshot policy object supplied in the body of the operation. Is one of the
+ following types: SnapshotPolicy, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.SnapshotPolicy or JSON or IO[bytes]
+ :return: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy
:raises ~azure.core.exceptions.HttpResponseError:
"""
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticSnapshotPolicy] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._create_or_update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
+ cls: ClsType[_models.SnapshotPolicy] = kwargs.pop("cls", None)
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
+ content_type = content_type or "application/json"
+ _content = None
+ if isinstance(body, (IOBase, bytes)):
+ _content = body
+ else:
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ _request = build_snapshot_policies_create_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ snapshot_policy_name=snapshot_policy_name,
+ subscription_id=self._config.subscription_id,
+ content_type=content_type,
+ api_version=self._config.api_version,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
path_format_arguments = {
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
}
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ _stream = kwargs.pop("stream", False)
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ if _stream:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
)
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ if _stream:
+ deserialized = response.iter_bytes()
else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.ElasticSnapshotPolicy].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.ElasticSnapshotPolicy](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
+ deserialized = _deserialize(_models.SnapshotPolicy, response.json())
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def _update_initial(
self,
resource_group_name: str,
account_name: str,
snapshot_policy_name: str,
- body: Union[_models.ElasticSnapshotPolicyUpdate, JSON, IO[bytes]],
+ body: Union[_models.SnapshotPolicyPatch, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -24787,7 +11995,7 @@ def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_elastic_snapshot_policies_update_request(
+ _request = build_snapshot_policies_update_request(
resource_group_name=resource_group_name,
account_name=account_name,
snapshot_policy_name=snapshot_policy_name,
@@ -24824,9 +12032,6 @@ def _update_initial(
response_headers = {}
if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
@@ -24843,28 +12048,28 @@ def begin_update(
resource_group_name: str,
account_name: str,
snapshot_policy_name: str,
- body: _models.ElasticSnapshotPolicyUpdate,
+ body: _models.SnapshotPolicyPatch,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticSnapshotPolicy]:
- """Update a ElasticSnapshotPolicy.
+ ) -> LROPoller[_models.SnapshotPolicy]:
+ """Patch a snapshot policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
+ :param snapshot_policy_name: The name of the snapshot policy. Required.
:type snapshot_policy_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdate
+ :param body: Snapshot policy object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
+ :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -24878,24 +12083,24 @@ def begin_update(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticSnapshotPolicy]:
- """Update a ElasticSnapshotPolicy.
+ ) -> LROPoller[_models.SnapshotPolicy]:
+ """Patch a snapshot policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
+ :param snapshot_policy_name: The name of the snapshot policy. Required.
:type snapshot_policy_name: str
- :param body: The resource properties to be updated. Required.
+ :param body: Snapshot policy object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
+ :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -24909,73 +12114,58 @@ def begin_update(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticSnapshotPolicy]:
- """Update a ElasticSnapshotPolicy.
+ ) -> LROPoller[_models.SnapshotPolicy]:
+ """Patch a snapshot policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
+ :param snapshot_policy_name: The name of the snapshot policy. Required.
:type snapshot_policy_name: str
- :param body: The resource properties to be updated. Required.
+ :param body: Snapshot policy object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
+ :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def begin_update(
self,
resource_group_name: str,
account_name: str,
snapshot_policy_name: str,
- body: Union[_models.ElasticSnapshotPolicyUpdate, JSON, IO[bytes]],
+ body: Union[_models.SnapshotPolicyPatch, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ElasticSnapshotPolicy]:
- """Update a ElasticSnapshotPolicy.
+ ) -> LROPoller[_models.SnapshotPolicy]:
+ """Patch a snapshot policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
+ :param snapshot_policy_name: The name of the snapshot policy. Required.
:type snapshot_policy_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticSnapshotPolicyUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticSnapshotPolicyUpdate or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
+ :param body: Snapshot policy object supplied in the body of the operation. Is one of the
+ following types: SnapshotPolicyPatch, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticSnapshotPolicy] = kwargs.pop("cls", None)
+ cls: ClsType[_models.SnapshotPolicy] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
@@ -24996,7 +12186,7 @@ def begin_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json())
+ deserialized = _deserialize(_models.SnapshotPolicy, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -25014,29 +12204,16 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ElasticSnapshotPolicy].from_continuation_token(
+ return LROPoller[_models.SnapshotPolicy].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ElasticSnapshotPolicy](
+ return LROPoller[_models.SnapshotPolicy](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def _delete_initial(
self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
) -> Iterator[bytes]:
@@ -25053,7 +12230,7 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_elastic_snapshot_policies_delete_request(
+ _request = build_snapshot_policies_delete_request(
resource_group_name=resource_group_name,
account_name=account_name,
snapshot_policy_name=snapshot_policy_name,
@@ -25074,7 +12251,7 @@ def _delete_initial(
response = pipeline_response.http_response
- if response.status_code not in [202, 204]:
+ if response.status_code not in [200, 202, 204]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -25099,30 +12276,17 @@ def _delete_initial(
return deserialized # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def begin_delete(
self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
) -> LROPoller[None]:
- """Delete a ElasticSnapshotPolicy.
+ """Delete snapshot policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
+ :param snapshot_policy_name: The name of the snapshot policy. Required.
:type snapshot_policy_name: str
:return: An instance of LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
@@ -25174,31 +12338,22 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_elastic_account(
- self, resource_group_name: str, account_name: str, **kwargs: Any
- ) -> ItemPaged["_models.ElasticSnapshotPolicy"]:
- """List ElasticSnapshotPolicy resources by ElasticAccount.
+ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.SnapshotPolicy"]:
+ """List snapshot policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :return: An iterator like instance of ElasticSnapshotPolicy
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
+ :return: An iterator like instance of SnapshotPolicy
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.SnapshotPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[List[_models.ElasticSnapshotPolicy]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.SnapshotPolicy]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -25211,7 +12366,7 @@ def list_by_elastic_account(
def prepare_request(next_link=None):
if not next_link:
- _request = build_elastic_snapshot_policies_list_by_elastic_account_request(
+ _request = build_snapshot_policies_list_request(
resource_group_name=resource_group_name,
account_name=account_name,
subscription_id=self._config.subscription_id,
@@ -25250,7 +12405,7 @@ def prepare_request(next_link=None):
def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticSnapshotPolicy], deserialized.get("value", []))
+ list_of_elem = _deserialize(List[_models.SnapshotPolicy], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -25277,41 +12432,23 @@ def get_next(next_link=None):
return ItemPaged(get_next, extract_data)
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "snapshot_policy_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_elastic_volumes(
+ def list_volumes(
self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
- ) -> ItemPaged["_models.ElasticVolume"]:
- """Get elastic volumes associated with Elastic Snapshot Policy.
+ ) -> _models.SnapshotPolicyVolumeList:
+ """Get volumes associated with snapshot policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param snapshot_policy_name: The name of the ElasticSnapshotPolicy. Required.
+ :param snapshot_policy_name: The name of the snapshot policy. Required.
:type snapshot_policy_name: str
- :return: An iterator like instance of ElasticVolume
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticVolume]
+ :return: SnapshotPolicyVolumeList. The SnapshotPolicyVolumeList is compatible with
+ MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.SnapshotPolicyVolumeList
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticVolume]] = kwargs.pop("cls", None)
-
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
@@ -25320,84 +12457,64 @@ def list_elastic_volumes(
}
error_map.update(kwargs.pop("error_map", {}) or {})
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_snapshot_policies_list_elastic_volumes_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
+ cls: ClsType[_models.SnapshotPolicyVolumeList] = kwargs.pop("cls", None)
- return _request
+ _request = build_snapshot_policies_list_volumes_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ snapshot_policy_name=snapshot_policy_name,
+ subscription_id=self._config.subscription_id,
+ api_version=self._config.api_version,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticVolume], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
+ _stream = kwargs.pop("stream", False)
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
- def get_next(next_link=None):
- _request = prepare_request(next_link)
+ response = pipeline_response.http_response
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
+ if response.status_code not in [200]:
+ if _stream:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
)
- response = pipeline_response.http_response
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ if _stream:
+ deserialized = response.iter_bytes()
+ else:
+ deserialized = _deserialize(_models.SnapshotPolicyVolumeList, response.json())
- return pipeline_response
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
- return ItemPaged(get_next, extract_data)
+ return deserialized # type: ignore
-class ElasticBackupVaultsOperations:
+class BackupPoliciesOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`elastic_backup_vaults` attribute.
+ :attr:`backup_policies` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -25408,34 +12525,20 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def get(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
- ) -> _models.ElasticBackupVault:
- """Get the Elastic Backup Vault.
+ self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any
+ ) -> _models.BackupPolicy:
+ """Get a particular backup Policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :return: ElasticBackupVault. The ElasticBackupVault is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticBackupVault
+ :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :type backup_policy_name: str
+ :return: BackupPolicy. The BackupPolicy is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.BackupPolicy
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
@@ -25449,12 +12552,12 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.ElasticBackupVault] = kwargs.pop("cls", None)
+ cls: ClsType[_models.BackupPolicy] = kwargs.pop("cls", None)
- _request = build_elastic_backup_vaults_get_request(
+ _request = build_backup_policies_get_request(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_vault_name=backup_vault_name,
+ backup_policy_name=backup_policy_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -25488,34 +12591,19 @@ def get(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.ElasticBackupVault, response.json())
+ deserialized = _deserialize(_models.BackupPolicy, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _create_or_update_initial(
+ def _create_initial(
self,
resource_group_name: str,
account_name: str,
- backup_vault_name: str,
- body: Union[_models.ElasticBackupVault, JSON, IO[bytes]],
+ backup_policy_name: str,
+ body: Union[_models.BackupPolicy, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -25539,10 +12627,10 @@ def _create_or_update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_elastic_backup_vaults_create_or_update_request(
+ _request = build_backup_policies_create_request(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_vault_name=backup_vault_name,
+ backup_policy_name=backup_policy_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -25562,7 +12650,7 @@ def _create_or_update_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 201]:
+ if response.status_code not in [200, 201, 202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -25581,6 +12669,10 @@ def _create_or_update_initial(
)
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
deserialized = response.iter_bytes()
if cls:
@@ -25589,152 +12681,137 @@ def _create_or_update_initial(
return deserialized # type: ignore
@overload
- def begin_create_or_update(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
- backup_vault_name: str,
- body: _models.ElasticBackupVault,
+ backup_policy_name: str,
+ body: _models.BackupPolicy,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupVault]:
- """Create or update the specified Elastic Backup Vault in the Elastic NetApp account.
+ ) -> LROPoller[_models.BackupPolicy]:
+ """Create a backup policy for Netapp Account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupVault
+ :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :type backup_policy_name: str
+ :param body: Backup policy object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.BackupPolicy
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
+ :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
- backup_vault_name: str,
+ backup_policy_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupVault]:
- """Create or update the specified Elastic Backup Vault in the Elastic NetApp account.
+ ) -> LROPoller[_models.BackupPolicy]:
+ """Create a backup policy for Netapp Account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: Resource create parameters. Required.
+ :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :type backup_policy_name: str
+ :param body: Backup policy object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
+ :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
- backup_vault_name: str,
+ backup_policy_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupVault]:
- """Create or update the specified Elastic Backup Vault in the Elastic NetApp account.
+ ) -> LROPoller[_models.BackupPolicy]:
+ """Create a backup policy for Netapp Account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: Resource create parameters. Required.
+ :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :type backup_policy_name: str
+ :param body: Backup policy object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
+ :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_create_or_update(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
- backup_vault_name: str,
- body: Union[_models.ElasticBackupVault, JSON, IO[bytes]],
+ backup_policy_name: str,
+ body: Union[_models.BackupPolicy, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupVault]:
- """Create or update the specified Elastic Backup Vault in the Elastic NetApp account.
+ ) -> LROPoller[_models.BackupPolicy]:
+ """Create a backup policy for Netapp Account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticBackupVault,
- JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupVault or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
+ :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :type backup_policy_name: str
+ :param body: Backup policy object supplied in the body of the operation. Is one of the
+ following types: BackupPolicy, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.BackupPolicy or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticBackupVault] = kwargs.pop("cls", None)
+ cls: ClsType[_models.BackupPolicy] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._create_or_update_initial(
+ raw_result = self._create_initial(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_vault_name=backup_vault_name,
+ backup_policy_name=backup_policy_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -25747,7 +12824,7 @@ def begin_create_or_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticBackupVault, response.json())
+ deserialized = _deserialize(_models.BackupPolicy, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -25765,37 +12842,22 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ElasticBackupVault].from_continuation_token(
+ return LROPoller[_models.BackupPolicy].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ElasticBackupVault](
+ return LROPoller[_models.BackupPolicy](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def _update_initial(
self,
resource_group_name: str,
account_name: str,
- backup_vault_name: str,
- body: Union[_models.ElasticBackupVaultUpdate, JSON, IO[bytes]],
+ backup_policy_name: str,
+ body: Union[_models.BackupPolicyPatch, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -25819,10 +12881,10 @@ def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_elastic_backup_vaults_update_request(
+ _request = build_backup_policies_update_request(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_vault_name=backup_vault_name,
+ backup_policy_name=backup_policy_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -25859,7 +12921,6 @@ def _update_initial(
response_headers["Azure-AsyncOperation"] = self._deserialize(
"str", response.headers.get("Azure-AsyncOperation")
)
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
deserialized = response.iter_bytes()
@@ -25874,29 +12935,29 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- backup_vault_name: str,
- body: _models.ElasticBackupVaultUpdate,
+ backup_policy_name: str,
+ body: _models.BackupPolicyPatch,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupVault]:
- """Patch the specified NetApp Elastic Backup Vault.
+ ) -> LROPoller[_models.BackupPolicy]:
+ """Patch a backup policy for Netapp Account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupVaultUpdate
+ :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :type backup_policy_name: str
+ :param body: Backup policy object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
+ :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -25905,29 +12966,29 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- backup_vault_name: str,
+ backup_policy_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupVault]:
- """Patch the specified NetApp Elastic Backup Vault.
+ ) -> LROPoller[_models.BackupPolicy]:
+ """Patch a backup policy for Netapp Account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: The resource properties to be updated. Required.
+ :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :type backup_policy_name: str
+ :param body: Backup policy object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
+ :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -25936,78 +12997,63 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- backup_vault_name: str,
+ backup_policy_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupVault]:
- """Patch the specified NetApp Elastic Backup Vault.
+ ) -> LROPoller[_models.BackupPolicy]:
+ """Patch a backup policy for Netapp Account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: The resource properties to be updated. Required.
+ :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :type backup_policy_name: str
+ :param body: Backup policy object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
+ :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def begin_update(
self,
resource_group_name: str,
account_name: str,
- backup_vault_name: str,
- body: Union[_models.ElasticBackupVaultUpdate, JSON, IO[bytes]],
+ backup_policy_name: str,
+ body: Union[_models.BackupPolicyPatch, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupVault]:
- """Patch the specified NetApp Elastic Backup Vault.
+ ) -> LROPoller[_models.BackupPolicy]:
+ """Patch a backup policy for Netapp Account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticBackupVaultUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupVaultUpdate or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
+ :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :type backup_policy_name: str
+ :param body: Backup policy object supplied in the body of the operation. Is one of the
+ following types: BackupPolicyPatch, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.BackupPolicyPatch or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns BackupPolicy. The BackupPolicy is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticBackupVault] = kwargs.pop("cls", None)
+ cls: ClsType[_models.BackupPolicy] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
@@ -26015,7 +13061,7 @@ def begin_update(
raw_result = self._update_initial(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_vault_name=backup_vault_name,
+ backup_policy_name=backup_policy_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -26028,7 +13074,7 @@ def begin_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticBackupVault, response.json())
+ deserialized = _deserialize(_models.BackupPolicy, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -26046,31 +13092,18 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ElasticBackupVault].from_continuation_token(
+ return LROPoller[_models.BackupPolicy].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ElasticBackupVault](
+ return LROPoller[_models.BackupPolicy](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def _delete_initial(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
+ self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -26085,10 +13118,10 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_elastic_backup_vaults_delete_request(
+ _request = build_backup_policies_delete_request(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_vault_name=backup_vault_name,
+ backup_policy_name=backup_policy_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -26106,7 +13139,7 @@ def _delete_initial(
response = pipeline_response.http_response
- if response.status_code not in [202, 204]:
+ if response.status_code not in [200, 202, 204]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -26131,31 +13164,18 @@ def _delete_initial(
return deserialized # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def begin_delete(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
+ self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any
) -> LROPoller[None]:
- """Delete the specified Elastic Backup Vault.
+ """Delete backup policy.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
+ :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :type backup_policy_name: str
:return: An instance of LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
@@ -26171,7 +13191,7 @@ def begin_delete(
raw_result = self._delete_initial(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_vault_name=backup_vault_name,
+ backup_policy_name=backup_policy_name,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -26206,31 +13226,22 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_elastic_account(
- self, resource_group_name: str, account_name: str, **kwargs: Any
- ) -> ItemPaged["_models.ElasticBackupVault"]:
- """List and describe all Elastic Backup Vaults in the elastic account.
+ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.BackupPolicy"]:
+ """List backup policies for Netapp Account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :return: An iterator like instance of ElasticBackupVault
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticBackupVault]
+ :return: An iterator like instance of BackupPolicy
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.BackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[List[_models.ElasticBackupVault]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.BackupPolicy]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -26243,7 +13254,7 @@ def list_by_elastic_account(
def prepare_request(next_link=None):
if not next_link:
- _request = build_elastic_backup_vaults_list_by_elastic_account_request(
+ _request = build_backup_policies_list_request(
resource_group_name=resource_group_name,
account_name=account_name,
subscription_id=self._config.subscription_id,
@@ -26282,7 +13293,7 @@ def prepare_request(next_link=None):
def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticBackupVault], deserialized.get("value", []))
+ list_of_elem = _deserialize(List[_models.BackupPolicy], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -26309,14 +13320,14 @@ def get_next(next_link=None):
return ItemPaged(get_next, extract_data)
-class ElasticBackupPoliciesOperations:
+class VolumeQuotaRulesOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`elastic_backup_policies` attribute.
+ :attr:`volume_quota_rules` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -26327,34 +13338,30 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def get(
- self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any
- ) -> _models.ElasticBackupPolicy:
- """Get the Elastic Backup Policy.
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ volume_quota_rule_name: str,
+ **kwargs: Any
+ ) -> _models.VolumeQuotaRule:
+ """Get details of the specified quota rule.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :return: ElasticBackupPolicy. The ElasticBackupPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticBackupPolicy
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param volume_quota_rule_name: The name of volume quota rule. Required.
+ :type volume_quota_rule_name: str
+ :return: VolumeQuotaRule. The VolumeQuotaRule is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.VolumeQuotaRule
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
@@ -26368,12 +13375,14 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.ElasticBackupPolicy] = kwargs.pop("cls", None)
+ cls: ClsType[_models.VolumeQuotaRule] = kwargs.pop("cls", None)
- _request = build_elastic_backup_policies_get_request(
+ _request = build_volume_quota_rules_get_request(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_policy_name=backup_policy_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ volume_quota_rule_name=volume_quota_rule_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -26407,34 +13416,21 @@ def get(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.ElasticBackupPolicy, response.json())
+ deserialized = _deserialize(_models.VolumeQuotaRule, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _create_or_update_initial(
+ def _create_initial(
self,
resource_group_name: str,
account_name: str,
- backup_policy_name: str,
- body: Union[_models.ElasticBackupPolicy, JSON, IO[bytes]],
+ pool_name: str,
+ volume_name: str,
+ volume_quota_rule_name: str,
+ body: Union[_models.VolumeQuotaRule, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -26458,10 +13454,12 @@ def _create_or_update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_elastic_backup_policies_create_or_update_request(
+ _request = build_volume_quota_rules_create_request(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_policy_name=backup_policy_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ volume_quota_rule_name=volume_quota_rule_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -26495,9 +13493,7 @@ def _create_or_update_initial(
response_headers = {}
if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
deserialized = response.iter_bytes()
@@ -26508,152 +13504,163 @@ def _create_or_update_initial(
return deserialized # type: ignore
@overload
- def begin_create_or_update(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
- backup_policy_name: str,
- body: _models.ElasticBackupPolicy,
+ pool_name: str,
+ volume_name: str,
+ volume_quota_rule_name: str,
+ body: _models.VolumeQuotaRule,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupPolicy]:
- """Create or update the specified Elastic Backup Policy in the NetApp account.
+ ) -> LROPoller[_models.VolumeQuotaRule]:
+ """Create the specified quota rule within the given volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicy
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param volume_quota_rule_name: The name of volume quota rule. Required.
+ :type volume_quota_rule_name: str
+ :param body: Quota rule object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.VolumeQuotaRule
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
- backup_policy_name: str,
+ pool_name: str,
+ volume_name: str,
+ volume_quota_rule_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupPolicy]:
- """Create or update the specified Elastic Backup Policy in the NetApp account.
+ ) -> LROPoller[_models.VolumeQuotaRule]:
+ """Create the specified quota rule within the given volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: Resource create parameters. Required.
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param volume_quota_rule_name: The name of volume quota rule. Required.
+ :type volume_quota_rule_name: str
+ :param body: Quota rule object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
- backup_policy_name: str,
+ pool_name: str,
+ volume_name: str,
+ volume_quota_rule_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupPolicy]:
- """Create or update the specified Elastic Backup Policy in the NetApp account.
+ ) -> LROPoller[_models.VolumeQuotaRule]:
+ """Create the specified quota rule within the given volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: Resource create parameters. Required.
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param volume_quota_rule_name: The name of volume quota rule. Required.
+ :type volume_quota_rule_name: str
+ :param body: Quota rule object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_create_or_update(
+ def begin_create(
self,
resource_group_name: str,
account_name: str,
- backup_policy_name: str,
- body: Union[_models.ElasticBackupPolicy, JSON, IO[bytes]],
+ pool_name: str,
+ volume_name: str,
+ volume_quota_rule_name: str,
+ body: Union[_models.VolumeQuotaRule, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupPolicy]:
- """Create or update the specified Elastic Backup Policy in the NetApp account.
+ ) -> LROPoller[_models.VolumeQuotaRule]:
+ """Create the specified quota rule within the given volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticBackupPolicy,
- JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicy or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param volume_quota_rule_name: The name of volume quota rule. Required.
+ :type volume_quota_rule_name: str
+ :param body: Quota rule object supplied in the body of the operation. Is one of the following
+ types: VolumeQuotaRule, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.VolumeQuotaRule or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticBackupPolicy] = kwargs.pop("cls", None)
+ cls: ClsType[_models.VolumeQuotaRule] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._create_or_update_initial(
+ raw_result = self._create_initial(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_policy_name=backup_policy_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ volume_quota_rule_name=volume_quota_rule_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -26666,7 +13673,7 @@ def begin_create_or_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticBackupPolicy, response.json())
+ deserialized = _deserialize(_models.VolumeQuotaRule, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -26684,37 +13691,24 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ElasticBackupPolicy].from_continuation_token(
+ return LROPoller[_models.VolumeQuotaRule].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ElasticBackupPolicy](
+ return LROPoller[_models.VolumeQuotaRule](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def _update_initial(
self,
resource_group_name: str,
account_name: str,
- backup_policy_name: str,
- body: Union[_models.ElasticBackupPolicyUpdate, JSON, IO[bytes]],
+ pool_name: str,
+ volume_name: str,
+ volume_quota_rule_name: str,
+ body: Union[_models.VolumeQuotaRulePatch, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -26738,10 +13732,12 @@ def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_elastic_backup_policies_update_request(
+ _request = build_volume_quota_rules_update_request(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_policy_name=backup_policy_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ volume_quota_rule_name=volume_quota_rule_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -26790,29 +13786,35 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- backup_policy_name: str,
- body: _models.ElasticBackupPolicyUpdate,
+ pool_name: str,
+ volume_name: str,
+ volume_quota_rule_name: str,
+ body: _models.VolumeQuotaRulePatch,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupPolicy]:
- """Patch the specified NetApp Elastic Backup Policy.
+ ) -> LROPoller[_models.VolumeQuotaRule]:
+ """Patch a quota rule.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicyUpdate
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param volume_quota_rule_name: The name of volume quota rule. Required.
+ :type volume_quota_rule_name: str
+ :param body: Quota rule object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.VolumeQuotaRulePatch
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -26821,29 +13823,35 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- backup_policy_name: str,
+ pool_name: str,
+ volume_name: str,
+ volume_quota_rule_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupPolicy]:
- """Patch the specified NetApp Elastic Backup Policy.
+ ) -> LROPoller[_models.VolumeQuotaRule]:
+ """Patch a quota rule.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: The resource properties to be updated. Required.
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param volume_quota_rule_name: The name of volume quota rule. Required.
+ :type volume_quota_rule_name: str
+ :param body: Quota rule object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -26852,78 +13860,75 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- backup_policy_name: str,
+ pool_name: str,
+ volume_name: str,
+ volume_quota_rule_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupPolicy]:
- """Patch the specified NetApp Elastic Backup Policy.
+ ) -> LROPoller[_models.VolumeQuotaRule]:
+ """Patch a quota rule.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: The resource properties to be updated. Required.
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param volume_quota_rule_name: The name of volume quota rule. Required.
+ :type volume_quota_rule_name: str
+ :param body: Quota rule object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def begin_update(
self,
resource_group_name: str,
account_name: str,
- backup_policy_name: str,
- body: Union[_models.ElasticBackupPolicyUpdate, JSON, IO[bytes]],
+ pool_name: str,
+ volume_name: str,
+ volume_quota_rule_name: str,
+ body: Union[_models.VolumeQuotaRulePatch, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackupPolicy]:
- """Patch the specified NetApp Elastic Backup Policy.
+ ) -> LROPoller[_models.VolumeQuotaRule]:
+ """Patch a quota rule.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticBackupPolicyUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackupPolicyUpdate or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param volume_quota_rule_name: The name of volume quota rule. Required.
+ :type volume_quota_rule_name: str
+ :param body: Quota rule object supplied in the body of the operation. Is one of the following
+ types: VolumeQuotaRulePatch, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.VolumeQuotaRulePatch or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticBackupPolicy] = kwargs.pop("cls", None)
+ cls: ClsType[_models.VolumeQuotaRule] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
@@ -26931,7 +13936,9 @@ def begin_update(
raw_result = self._update_initial(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_policy_name=backup_policy_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ volume_quota_rule_name=volume_quota_rule_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -26944,7 +13951,7 @@ def begin_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticBackupPolicy, response.json())
+ deserialized = _deserialize(_models.VolumeQuotaRule, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -26962,31 +13969,24 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ElasticBackupPolicy].from_continuation_token(
+ return LROPoller[_models.VolumeQuotaRule].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ElasticBackupPolicy](
+ return LROPoller[_models.VolumeQuotaRule](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def _delete_initial(
- self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ volume_quota_rule_name: str,
+ **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -27001,10 +14001,12 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_elastic_backup_policies_delete_request(
+ _request = build_volume_quota_rules_delete_request(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_policy_name=backup_policy_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ volume_quota_rule_name=volume_quota_rule_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -27022,7 +14024,7 @@ def _delete_initial(
response = pipeline_response.http_response
- if response.status_code not in [202, 204]:
+ if response.status_code not in [200, 202, 204]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -27047,31 +14049,28 @@ def _delete_initial(
return deserialized # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_policy_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def begin_delete(
- self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ volume_quota_rule_name: str,
+ **kwargs: Any
) -> LROPoller[None]:
- """Delete the specified Elastic Policy.
+ """Delete quota rule.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
- :type backup_policy_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param volume_quota_rule_name: The name of volume quota rule. Required.
+ :type volume_quota_rule_name: str
:return: An instance of LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
@@ -27087,7 +14086,9 @@ def begin_delete(
raw_result = self._delete_initial(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_policy_name=backup_policy_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ volume_quota_rule_name=volume_quota_rule_name,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -27122,31 +14123,28 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "account_name", "accept"]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_elastic_account(
- self, resource_group_name: str, account_name: str, **kwargs: Any
- ) -> ItemPaged["_models.ElasticBackupPolicy"]:
- """List and describe all Elastic Backup Policies in the elastic account.
+ def list_by_volume(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> ItemPaged["_models.VolumeQuotaRule"]:
+ """List all quota rules associated with the volume.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :return: An iterator like instance of ElasticBackupPolicy
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticBackupPolicy]
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: An iterator like instance of VolumeQuotaRule
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.VolumeQuotaRule]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[List[_models.ElasticBackupPolicy]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.VolumeQuotaRule]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -27159,9 +14157,11 @@ def list_by_elastic_account(
def prepare_request(next_link=None):
if not next_link:
- _request = build_elastic_backup_policies_list_by_elastic_account_request(
+ _request = build_volume_quota_rules_list_by_volume_request(
resource_group_name=resource_group_name,
account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -27198,7 +14198,7 @@ def prepare_request(next_link=None):
def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticBackupPolicy], deserialized.get("value", []))
+ list_of_elem = _deserialize(List[_models.VolumeQuotaRule], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -27225,14 +14225,14 @@ def get_next(next_link=None):
return ItemPaged(get_next, extract_data)
-class ElasticBackupsOperations:
+class RansomwareReportsOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`elastic_backups` attribute.
+ :attr:`ransomware_reports` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -27251,29 +14251,42 @@ def __init__(self, *args, **kwargs) -> None:
"subscription_id",
"resource_group_name",
"account_name",
- "backup_vault_name",
- "backup_name",
+ "pool_name",
+ "volume_name",
+ "ransomware_report_name",
"accept",
]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=["2025-09-01-preview", "2025-12-01"],
)
def get(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
- ) -> _models.ElasticBackup:
- """Get the specified Elastic Backup under Elastic Backup Vault.
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ ransomware_report_name: str,
+ **kwargs: Any
+ ) -> _models.RansomwareReport:
+ """Get details of the specified ransomware report (ARP) ARP reports are created with a list of
+ suspected files when it detects any combination of high data entropy, abnormal volume activity
+ with data encryption, and unusual file extensions. ARP creates snapshots named
+ Anti_ransomware_backup when it detects a potential ransomware threat. You can use one of these
+ ARP snapshots or another snapshot of your volume to restore data.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :return: ElasticBackup. The ElasticBackup is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ElasticBackup
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param ransomware_report_name: The name of the ransomware report. Required.
+ :type ransomware_report_name: str
+ :return: RansomwareReport. The RansomwareReport is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.RansomwareReport
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
@@ -27284,111 +14297,19 @@ def get(
}
error_map.update(kwargs.pop("error_map", {}) or {})
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[_models.ElasticBackup] = kwargs.pop("cls", None)
-
- _request = build_elastic_backups_get_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- if _stream:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ElasticBackup, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "backup_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Union[_models.ElasticBackup, JSON, IO[bytes]],
- **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- content_type = content_type or "application/json"
- _content = None
- if isinstance(body, (IOBase, bytes)):
- _content = body
- else:
- _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
+ cls: ClsType[_models.RansomwareReport] = kwargs.pop("cls", None)
- _request = build_elastic_backups_create_or_update_request(
+ _request = build_ransomware_reports_get_request(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ ransomware_report_name=ransomware_report_name,
subscription_id=self._config.subscription_id,
- content_type=content_type,
api_version=self._config.api_version,
- content=_content,
headers=_headers,
params=_params,
)
@@ -27397,18 +14318,19 @@ def _create_or_update_initial(
}
_request.url = self._client.format_url(_request.url, **path_format_arguments)
- _stream = True
+ _stream = kwargs.pop("stream", False)
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **kwargs
)
response = pipeline_response.http_response
- if response.status_code not in [200, 201]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
+ if response.status_code not in [200]:
+ if _stream:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = _failsafe_deserialize(
_models.ErrorResponse,
@@ -27416,122 +14338,16 @@ def _create_or_update_initial(
)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- response_headers = {}
- if response.status_code == 201:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
+ if _stream:
+ deserialized = response.iter_bytes()
+ else:
+ deserialized = _deserialize(_models.RansomwareReport, response.json())
if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
- @overload
- def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: _models.ElasticBackup,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.ElasticBackup]:
- """Create an elastic backup under the elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackup
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: JSON,
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.ElasticBackup]:
- """Create an elastic backup under the elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: Resource create parameters. Required.
- :type body: JSON
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @overload
- def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.ElasticBackup]:
- """Create an elastic backup under the elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: Resource create parameters. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
@distributed_trace
@api_version_validation(
method_added_on="2025-09-01-preview",
@@ -27541,95 +14357,118 @@ def begin_create_or_update(
"subscription_id",
"resource_group_name",
"account_name",
- "backup_vault_name",
- "backup_name",
- "content_type",
+ "pool_name",
+ "volume_name",
"accept",
]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=["2025-09-01-preview", "2025-12-01"],
)
- def begin_create_or_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Union[_models.ElasticBackup, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.ElasticBackup]:
- """Create an elastic backup under the elastic Backup Vault.
+ def list(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> ItemPaged["_models.RansomwareReport"]:
+ """List all ransomware reports for the volume Returns a list of the Advanced Ransomware Protection
+ (ARP) reports for the volume. ARP reports are created with a list of suspected files when it
+ detects any combination of high data entropy, abnormal volume activity with data encryption,
+ and unusual file extensions. ARP creates snapshots named Anti_ransomware_backup when it detects
+ a potential ransomware threat. You can use one of these ARP snapshots or another snapshot of
+ your volume to restore data".
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: Resource create parameters. Is one of the following types: ElasticBackup, JSON,
- IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackup or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup]
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :return: An iterator like instance of RansomwareReport
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.RansomwareReport]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticBackup] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._create_or_update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
+ cls: ClsType[List[_models.RansomwareReport]] = kwargs.pop("cls", None)
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticBackup, response.json())
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_ransomware_reports_list_request(
+ resource_group_name=resource_group_name,
+ account_name=account_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ subscription_id=self._config.subscription_id,
+ api_version=self._config.api_version,
+ headers=_headers,
+ params=_params,
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url(
+ "self._config.base_url", self._config.base_url, "str", skip_quote=True
+ ),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ path_format_arguments = {
+ "endpoint": self._serialize.url(
+ "self._config.base_url", self._config.base_url, "str", skip_quote=True
+ ),
+ }
+ _request.url = self._client.format_url(_request.url, **path_format_arguments)
+
+ return _request
+
+ def extract_data(pipeline_response):
+ deserialized = pipeline_response.http_response.json()
+ list_of_elem = _deserialize(List[_models.RansomwareReport], deserialized.get("value", []))
if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.get("nextLink") or None, iter(list_of_elem)
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.ElasticBackup].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
)
- return LROPoller[_models.ElasticBackup](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = _failsafe_deserialize(
+ _models.ErrorResponse,
+ response,
+ )
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
@api_version_validation(
method_added_on="2025-09-01-preview",
@@ -27639,21 +14478,22 @@ def get_long_running_output(pipeline_response):
"subscription_id",
"resource_group_name",
"account_name",
- "backup_vault_name",
- "backup_name",
+ "pool_name",
+ "volume_name",
+ "ransomware_report_name",
"content_type",
- "accept",
]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=["2025-09-01-preview", "2025-12-01"],
)
- def _update_initial(
+ def _clear_suspects_initial(
self,
resource_group_name: str,
account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Union[_models.ElasticBackup, JSON, IO[bytes]],
+ pool_name: str,
+ volume_name: str,
+ ransomware_report_name: str,
+ body: Union[_models.RansomwareSuspectsClearRequest, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -27677,11 +14517,12 @@ def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_elastic_backups_update_request(
+ _request = build_ransomware_reports_clear_suspects_request(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ ransomware_report_name=ransomware_report_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -27701,7 +14542,7 @@ def _update_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202]:
+ if response.status_code not in [202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -27714,12 +14555,8 @@ def _update_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
- if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
deserialized = response.iter_bytes()
@@ -27729,281 +14566,124 @@ def _update_initial(
return deserialized # type: ignore
@overload
- def begin_update(
+ def begin_clear_suspects(
self,
resource_group_name: str,
account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: _models.ElasticBackup,
+ pool_name: str,
+ volume_name: str,
+ ransomware_report_name: str,
+ body: _models.RansomwareSuspectsClearRequest,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackup]:
- """Patch an elastic Backup under the Elastic Backup Vault.
+ ) -> LROPoller[None]:
+ """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
+ evaluate the report to determine whether the activity is acceptable (false positive) or whether
+ an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a
+ potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your
+ volume to restore data",.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackup
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param ransomware_report_name: The name of the ransomware report. Required.
+ :type ransomware_report_name: str
+ :param body: Clear suspects request object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.RansomwareSuspectsClearRequest
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_update(
+ def begin_clear_suspects(
self,
resource_group_name: str,
account_name: str,
- backup_vault_name: str,
- backup_name: str,
+ pool_name: str,
+ volume_name: str,
+ ransomware_report_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ElasticBackup]:
- """Patch an elastic Backup under the Elastic Backup Vault.
+ ) -> LROPoller[None]:
+ """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
+ evaluate the report to determine whether the activity is acceptable (false positive) or whether
+ an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a
+ potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your
+ volume to restore data",.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: The resource properties to be updated. Required.
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param ransomware_report_name: The name of the ransomware report. Required.
+ :type ransomware_report_name: str
+ :param body: Clear suspects request object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup]
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_update(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: IO[bytes],
- *,
- content_type: str = "application/json",
- **kwargs: Any
- ) -> LROPoller[_models.ElasticBackup]:
- """Patch an elastic Backup under the Elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: The resource properties to be updated. Required.
- :type body: IO[bytes]
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
- Default value is "application/json".
- :paramtype content_type: str
- :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "backup_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def begin_update(
+ def begin_clear_suspects(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- backup_name: str,
- body: Union[_models.ElasticBackup, JSON, IO[bytes]],
- **kwargs: Any
- ) -> LROPoller[_models.ElasticBackup]:
- """Patch an elastic Backup under the Elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ElasticBackup, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ElasticBackup or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ElasticBackup. The ElasticBackup is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
-
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ElasticBackup] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._update_initial(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- body=body,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- response = pipeline_response.http_response
- deserialized = _deserialize(_models.ElasticBackup, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
-
- if polling is True:
- polling_method: PollingMethod = cast(
- PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
- )
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
- else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.ElasticBackup].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.ElasticBackup](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
- )
-
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "backup_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def _delete_initial(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
-
- _request = build_elastic_backups_delete_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
-
- response = pipeline_response.http_response
-
- if response.status_code not in [202, 204]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
-
- deserialized = response.iter_bytes()
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ ransomware_report_name: str,
+ body: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
+ evaluate the report to determine whether the activity is acceptable (false positive) or whether
+ an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a
+ potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your
+ volume to restore data",.
- return deserialized # type: ignore
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param ransomware_report_name: The name of the ransomware report. Required.
+ :type ransomware_report_name: str
+ :param body: Clear suspects request object supplied in the body of the operation. Required.
+ :type body: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
@distributed_trace
@api_version_validation(
@@ -28014,43 +14694,65 @@ def _delete_initial(
"subscription_id",
"resource_group_name",
"account_name",
- "backup_vault_name",
- "backup_name",
+ "pool_name",
+ "volume_name",
+ "ransomware_report_name",
+ "content_type",
]
},
- api_versions_list=["2025-09-01-preview"],
+ api_versions_list=["2025-09-01-preview", "2025-12-01"],
)
- def begin_delete(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
+ def begin_clear_suspects(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ ransomware_report_name: str,
+ body: Union[_models.RansomwareSuspectsClearRequest, JSON, IO[bytes]],
+ **kwargs: Any
) -> LROPoller[None]:
- """Delete a ElasticBackup.
+ """Clear ransomware suspects for the given Advanced Ransomware Protection report. You should
+ evaluate the report to determine whether the activity is acceptable (false positive) or whether
+ an attack seems malicious. ARP creates snapshots named Anti_ransomware_backup when it detects a
+ potential ransomware threat. You can use one of these ARP snapshots or another snapshot of your
+ volume to restore data",.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
+ :param account_name: The name of the NetApp account. Required.
:type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :param backup_name: The name of the ElasticBackup. Required.
- :type backup_name: str
+ :param pool_name: The name of the capacity pool. Required.
+ :type pool_name: str
+ :param volume_name: The name of the volume. Required.
+ :type volume_name: str
+ :param ransomware_report_name: The name of the ransomware report. Required.
+ :type ransomware_report_name: str
+ :param body: Clear suspects request object supplied in the body of the operation. Is one of the
+ following types: RansomwareSuspectsClearRequest, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.RansomwareSuspectsClearRequest or JSON or IO[bytes]
:return: An instance of LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- _headers = kwargs.pop("headers", {}) or {}
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
- raw_result = self._delete_initial(
+ raw_result = self._clear_suspects_initial(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_vault_name=backup_vault_name,
- backup_name=backup_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ ransomware_report_name=ransomware_report_name,
+ body=body,
+ content_type=content_type,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -28084,128 +14786,15 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
)
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "account_name",
- "backup_vault_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_vault(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
- ) -> ItemPaged["_models.ElasticBackup"]:
- """List all elastic backups Under an elastic Backup Vault.
-
- :param resource_group_name: The name of the resource group. The name is case insensitive.
- Required.
- :type resource_group_name: str
- :param account_name: The name of the ElasticAccount. Required.
- :type account_name: str
- :param backup_vault_name: The name of the ElasticBackupVault. Required.
- :type backup_vault_name: str
- :return: An iterator like instance of ElasticBackup
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticBackup]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ElasticBackup]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_elastic_backups_list_by_vault_request(
- resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ElasticBackup], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
-
- def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(get_next, extract_data)
-
-class ActiveDirectoryConfigsOperations:
+class BackupVaultsOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`active_directory_configs` attribute.
+ :attr:`backup_vaults` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -28216,31 +14805,20 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def get(
- self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any
- ) -> _models.ActiveDirectoryConfig:
- """Get the details of the specified active directory configuration.
+ self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
+ ) -> _models.BackupVault:
+ """Get the Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :return: ActiveDirectoryConfig. The ActiveDirectoryConfig is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ActiveDirectoryConfig
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param backup_vault_name: The name of the Backup Vault. Required.
+ :type backup_vault_name: str
+ :return: BackupVault. The BackupVault is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.BackupVault
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
@@ -28254,11 +14832,12 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.ActiveDirectoryConfig] = kwargs.pop("cls", None)
+ cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None)
- _request = build_active_directory_configs_get_request(
+ _request = build_backup_vaults_get_request(
resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
+ account_name=account_name,
+ backup_vault_name=backup_vault_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -28292,32 +14871,19 @@ def get(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.ActiveDirectoryConfig, response.json())
+ deserialized = _deserialize(_models.BackupVault, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def _create_or_update_initial(
self,
resource_group_name: str,
- active_directory_config_name: str,
- body: Union[_models.ActiveDirectoryConfig, JSON, IO[bytes]],
+ account_name: str,
+ backup_vault_name: str,
+ body: Union[_models.BackupVault, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -28341,9 +14907,10 @@ def _create_or_update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_active_directory_configs_create_or_update_request(
+ _request = build_backup_vaults_create_or_update_request(
resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
+ account_name=account_name,
+ backup_vault_name=backup_vault_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -28393,27 +14960,30 @@ def _create_or_update_initial(
def begin_create_or_update(
self,
resource_group_name: str,
- active_directory_config_name: str,
- body: _models.ActiveDirectoryConfig,
+ account_name: str,
+ backup_vault_name: str,
+ body: _models.BackupVault,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ActiveDirectoryConfig]:
- """Create or update the specified active directory configuration.
+ ) -> LROPoller[_models.BackupVault]:
+ """Create or update the specified Backup Vault in the NetApp account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: Resource create parameters. Required.
- :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfig
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param backup_vault_name: The name of the Backup Vault. Required.
+ :type backup_vault_name: str
+ :param body: BackupVault object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.BackupVault
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -28421,27 +14991,30 @@ def begin_create_or_update(
def begin_create_or_update(
self,
resource_group_name: str,
- active_directory_config_name: str,
+ account_name: str,
+ backup_vault_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ActiveDirectoryConfig]:
- """Create or update the specified active directory configuration.
+ ) -> LROPoller[_models.BackupVault]:
+ """Create or update the specified Backup Vault in the NetApp account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: Resource create parameters. Required.
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param backup_vault_name: The name of the Backup Vault. Required.
+ :type backup_vault_name: str
+ :param body: BackupVault object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -28449,79 +15022,72 @@ def begin_create_or_update(
def begin_create_or_update(
self,
resource_group_name: str,
- active_directory_config_name: str,
+ account_name: str,
+ backup_vault_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ActiveDirectoryConfig]:
- """Create or update the specified active directory configuration.
+ ) -> LROPoller[_models.BackupVault]:
+ """Create or update the specified Backup Vault in the NetApp account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: Resource create parameters. Required.
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param backup_vault_name: The name of the Backup Vault. Required.
+ :type backup_vault_name: str
+ :param body: BackupVault object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def begin_create_or_update(
self,
resource_group_name: str,
- active_directory_config_name: str,
- body: Union[_models.ActiveDirectoryConfig, JSON, IO[bytes]],
+ account_name: str,
+ backup_vault_name: str,
+ body: Union[_models.BackupVault, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ActiveDirectoryConfig]:
- """Create or update the specified active directory configuration.
+ ) -> LROPoller[_models.BackupVault]:
+ """Create or update the specified Backup Vault in the NetApp account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: Resource create parameters. Is one of the following types: ActiveDirectoryConfig,
- JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfig or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param backup_vault_name: The name of the Backup Vault. Required.
+ :type backup_vault_name: str
+ :param body: BackupVault object supplied in the body of the operation. Is one of the following
+ types: BackupVault, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.BackupVault or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ActiveDirectoryConfig] = kwargs.pop("cls", None)
+ cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
raw_result = self._create_or_update_initial(
resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
+ account_name=account_name,
+ backup_vault_name=backup_vault_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -28534,7 +15100,7 @@ def begin_create_or_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.ActiveDirectoryConfig, response.json())
+ deserialized = _deserialize(_models.BackupVault, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -28552,35 +15118,22 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ActiveDirectoryConfig].from_continuation_token(
+ return LROPoller[_models.BackupVault].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ActiveDirectoryConfig](
+ return LROPoller[_models.BackupVault](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def _update_initial(
self,
resource_group_name: str,
- active_directory_config_name: str,
- body: Union[_models.ActiveDirectoryConfigUpdate, JSON, IO[bytes]],
+ account_name: str,
+ backup_vault_name: str,
+ body: Union[_models.BackupVaultPatch, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -28604,9 +15157,10 @@ def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_active_directory_configs_update_request(
+ _request = build_backup_vaults_update_request(
resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
+ account_name=account_name,
+ backup_vault_name=backup_vault_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -28640,9 +15194,6 @@ def _update_initial(
response_headers = {}
if response.status_code == 202:
- response_headers["Azure-AsyncOperation"] = self._deserialize(
- "str", response.headers.get("Azure-AsyncOperation")
- )
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
@@ -28657,27 +15208,30 @@ def _update_initial(
def begin_update(
self,
resource_group_name: str,
- active_directory_config_name: str,
- body: _models.ActiveDirectoryConfigUpdate,
+ account_name: str,
+ backup_vault_name: str,
+ body: _models.BackupVaultPatch,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ActiveDirectoryConfig]:
- """Patch the specified active directory configuration.
+ ) -> LROPoller[_models.BackupVault]:
+ """Patch the specified NetApp Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: The resource properties to be updated. Required.
- :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfigUpdate
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param backup_vault_name: The name of the Backup Vault. Required.
+ :type backup_vault_name: str
+ :param body: Backup Vault object supplied in the body of the operation. Required.
+ :type body: ~azure.mgmt.netapp.models.BackupVaultPatch
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -28685,27 +15239,30 @@ def begin_update(
def begin_update(
self,
resource_group_name: str,
- active_directory_config_name: str,
+ account_name: str,
+ backup_vault_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ActiveDirectoryConfig]:
- """Patch the specified active directory configuration.
+ ) -> LROPoller[_models.BackupVault]:
+ """Patch the specified NetApp Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: The resource properties to be updated. Required.
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param backup_vault_name: The name of the Backup Vault. Required.
+ :type backup_vault_name: str
+ :param body: Backup Vault object supplied in the body of the operation. Required.
:type body: JSON
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -28713,79 +15270,72 @@ def begin_update(
def begin_update(
self,
resource_group_name: str,
- active_directory_config_name: str,
+ account_name: str,
+ backup_vault_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ActiveDirectoryConfig]:
- """Patch the specified active directory configuration.
+ ) -> LROPoller[_models.BackupVault]:
+ """Patch the specified NetApp Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: The resource properties to be updated. Required.
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param backup_vault_name: The name of the Backup Vault. Required.
+ :type backup_vault_name: str
+ :param body: Backup Vault object supplied in the body of the operation. Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- "content_type",
- "accept",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def begin_update(
self,
resource_group_name: str,
- active_directory_config_name: str,
- body: Union[_models.ActiveDirectoryConfigUpdate, JSON, IO[bytes]],
+ account_name: str,
+ backup_vault_name: str,
+ body: Union[_models.BackupVaultPatch, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ActiveDirectoryConfig]:
- """Patch the specified active directory configuration.
+ ) -> LROPoller[_models.BackupVault]:
+ """Patch the specified NetApp Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
- :param body: The resource properties to be updated. Is one of the following types:
- ActiveDirectoryConfigUpdate, JSON, IO[bytes] Required.
- :type body: ~azure.mgmt.netapp.models.ActiveDirectoryConfigUpdate or JSON or IO[bytes]
- :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
- is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param backup_vault_name: The name of the Backup Vault. Required.
+ :type backup_vault_name: str
+ :param body: Backup Vault object supplied in the body of the operation. Is one of the following
+ types: BackupVaultPatch, JSON, IO[bytes] Required.
+ :type body: ~azure.mgmt.netapp.models.BackupVaultPatch or JSON or IO[bytes]
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.ActiveDirectoryConfig] = kwargs.pop("cls", None)
+ cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
raw_result = self._update_initial(
resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
+ account_name=account_name,
+ backup_vault_name=backup_vault_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -28798,7 +15348,7 @@ def begin_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.ActiveDirectoryConfig, response.json())
+ deserialized = _deserialize(_models.BackupVault, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -28816,30 +15366,18 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ActiveDirectoryConfig].from_continuation_token(
+ return LROPoller[_models.BackupVault].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.ActiveDirectoryConfig](
+ return LROPoller[_models.BackupVault](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def _delete_initial(
- self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any
+ self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -28854,9 +15392,10 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_active_directory_configs_delete_request(
+ _request = build_backup_vaults_delete_request(
resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
+ account_name=account_name,
+ backup_vault_name=backup_vault_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -28899,28 +15438,18 @@ def _delete_initial(
return deserialized # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={
- "2025-09-01-preview": [
- "api_version",
- "subscription_id",
- "resource_group_name",
- "active_directory_config_name",
- ]
- },
- api_versions_list=["2025-09-01-preview"],
- )
def begin_delete(
- self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any
+ self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
) -> LROPoller[None]:
- """Delete the specified Active Directory configuration.
+ """Delete the specified Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :param active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
- :type active_directory_config_name: str
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :param backup_vault_name: The name of the Backup Vault. Required.
+ :type backup_vault_name: str
:return: An instance of LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
@@ -28935,7 +15464,8 @@ def begin_delete(
if cont_token is None:
raw_result = self._delete_initial(
resource_group_name=resource_group_name,
- active_directory_config_name=active_directory_config_name,
+ account_name=account_name,
+ backup_vault_name=backup_vault_name,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -28970,27 +15500,24 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
@distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={"2025-09-01-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]},
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_resource_group(
- self, resource_group_name: str, **kwargs: Any
- ) -> ItemPaged["_models.ActiveDirectoryConfig"]:
- """List all active directory configurations within the resource group.
+ def list_by_net_app_account(
+ self, resource_group_name: str, account_name: str, **kwargs: Any
+ ) -> ItemPaged["_models.BackupVault"]:
+ """List and describe all Backup Vaults in the NetApp account.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
- :return: An iterator like instance of ActiveDirectoryConfig
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :return: An iterator like instance of BackupVault
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[List[_models.ActiveDirectoryConfig]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.BackupVault]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -29003,8 +15530,9 @@ def list_by_resource_group(
def prepare_request(next_link=None):
if not next_link:
- _request = build_active_directory_configs_list_by_resource_group_request(
+ _request = build_backup_vaults_list_by_net_app_account_request(
resource_group_name=resource_group_name,
+ account_name=account_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -29041,99 +15569,7 @@ def prepare_request(next_link=None):
def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ActiveDirectoryConfig], deserialized.get("value", []))
- if cls:
- list_of_elem = cls(list_of_elem) # type: ignore
- return deserialized.get("nextLink") or None, iter(list_of_elem)
-
- def get_next(next_link=None):
- _request = prepare_request(next_link)
-
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = _failsafe_deserialize(
- _models.ErrorResponse,
- response,
- )
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(get_next, extract_data)
-
- @distributed_trace
- @api_version_validation(
- method_added_on="2025-09-01-preview",
- params_added_on={"2025-09-01-preview": ["api_version", "subscription_id", "accept"]},
- api_versions_list=["2025-09-01-preview"],
- )
- def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.ActiveDirectoryConfig"]:
- """List all active directory configurations within the subscription.
-
- :return: An iterator like instance of ActiveDirectoryConfig
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
-
- cls: ClsType[List[_models.ActiveDirectoryConfig]] = kwargs.pop("cls", None)
-
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
-
- def prepare_request(next_link=None):
- if not next_link:
-
- _request = build_active_directory_configs_list_by_subscription_request(
- subscription_id=self._config.subscription_id,
- api_version=self._config.api_version,
- headers=_headers,
- params=_params,
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- else:
- # make call to next link with the client's api-version
- _parsed_next_link = urllib.parse.urlparse(next_link)
- _next_request_params = case_insensitive_dict(
- {
- key: [urllib.parse.quote(v) for v in value]
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
- }
- )
- _next_request_params["api-version"] = self._config.api_version
- _request = HttpRequest(
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
- )
- path_format_arguments = {
- "endpoint": self._serialize.url(
- "self._config.base_url", self._config.base_url, "str", skip_quote=True
- ),
- }
- _request.url = self._client.format_url(_request.url, **path_format_arguments)
-
- return _request
-
- def extract_data(pipeline_response):
- deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.ActiveDirectoryConfig], deserialized.get("value", []))
+ list_of_elem = _deserialize(List[_models.BackupVault], deserialized.get("value", []))
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.get("nextLink") or None, iter(list_of_elem)
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py
index c139f1b7f0ad..90f018815f9e 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Accounts_ChangeKeyVault.json
+# x-ms-original-file: 2025-12-01/Accounts_ChangeKeyVault.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py
index 0ae46b2af012..78b9df78cbd1 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Accounts_CreateOrUpdate.json
+# x-ms-original-file: 2025-12-01/Accounts_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py
index 7067a12f0782..57f363810dab 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py
@@ -44,7 +44,7 @@ def main():
"ldapOverTLS": False,
"ldapSigning": False,
"organizationalUnit": "OU=Engineering",
- "password": "",
+ "password": "ad_password",
"site": "SiteName",
"smbServerName": "SMBServer",
"username": "ad_user_name",
@@ -56,6 +56,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Accounts_CreateOrUpdateAD.json
+# x-ms-original-file: 2025-12-01/Accounts_CreateOrUpdateAD.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py
index 699b7ab6bb1e..e659f03bbd40 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Accounts_Delete.json
+# x-ms-original-file: 2025-12-01/Accounts_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py
index 9c5379af8cbb..36d4869f31ee 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Accounts_Get.json
+# x-ms-original-file: 2025-12-01/Accounts_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py
index 52384fef3b76..9fe83d68efff 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Accounts_GetChangeKeyVaultInformation.json
+# x-ms-original-file: 2025-12-01/Accounts_GetChangeKeyVaultInformation.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py
index 425b0da03485..1f60685a8d92 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/Accounts_List.json
+# x-ms-original-file: 2025-12-01/Accounts_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list_by_subscription.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list_by_subscription.py
index 885f93b54195..68456153bd82 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list_by_subscription.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list_by_subscription.py
@@ -35,6 +35,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/Accounts_ListBySubscription.json
+# x-ms-original-file: 2025-12-01/Accounts_ListBySubscription.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py
index d3fecf8da7cb..16db15e451d4 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Accounts_RenewCredentials.json
+# x-ms-original-file: 2025-12-01/Accounts_RenewCredentials.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py
index 3506c4a90f4c..7848c0788852 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Accounts_TransitionEncryptionKey.json
+# x-ms-original-file: 2025-12-01/Accounts_TransitionEncryptionKey.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py
index 30158ef3119d..3c142aa63378 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Accounts_Update.json
+# x-ms-original-file: 2025-12-01/Accounts_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_create_or_update.py
deleted file mode 100644
index 62eefc79b95f..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_create_or_update.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# pylint: disable=line-too-long,useless-suppression
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python active_directory_configs_create_or_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.active_directory_configs.begin_create_or_update(
- resource_group_name="myRG",
- active_directory_config_name="adconfig1",
- body={
- "identity": {
- "type": "UserAssigned",
- "userAssignedIdentities": {
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1": {}
- },
- },
- "location": "eastus",
- "properties": {
- "administrators": ["admin1"],
- "backupOperators": ["backupOp1"],
- "dns": ["10.10.10.4", "10.10.10.5"],
- "domain": "example.net",
- "organizationalUnit": "OU=Computers,DC=corp,DC=contoso,DC=com",
- "secretPassword": {
- "identity": {
- "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1"
- },
- "keyVaultProperties": {
- "keyVaultUri": "https://example.vault.azure.net/",
- "secretName": "activeDirectoryPassword",
- },
- },
- "securityOperators": ["secOp1"],
- "site": "Default-First-Site-Name",
- "smbServerName": "smbServer",
- "userName": "admin1",
- },
- "tags": {"ac-tag1": "activeDirectoryConfig1"},
- },
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_CreateOrUpdate.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_delete.py
deleted file mode 100644
index 3eb94b599c5f..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_delete.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python active_directory_configs_delete.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- client.active_directory_configs.begin_delete(
- resource_group_name="myRG",
- active_directory_config_name="adconfig1",
- ).result()
-
-
-# x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_Delete.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_get.py
deleted file mode 100644
index c2cf2be0eec9..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_get.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python active_directory_configs_get.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.active_directory_configs.get(
- resource_group_name="myRG",
- active_directory_config_name="adconfig1",
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_Get.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_resource_group.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_resource_group.py
deleted file mode 100644
index 2cc675e0db04..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_resource_group.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python active_directory_configs_list_by_resource_group.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.active_directory_configs.list_by_resource_group(
- resource_group_name="myRG",
- )
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_ListByResourceGroup.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_subscription.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_subscription.py
deleted file mode 100644
index 2a27ab7ebb24..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_subscription.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python active_directory_configs_list_by_subscription.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.active_directory_configs.list_by_subscription()
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_ListBySubscription.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_update.py
deleted file mode 100644
index 432a8ee7ab85..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_update.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python active_directory_configs_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.active_directory_configs.begin_update(
- resource_group_name="myRG",
- active_directory_config_name="adconfig1",
- body={"properties": {"smbServerName": "smbServer2"}},
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ActiveDirectoryConfigs_Update.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py
index 3b3a2f7dad37..8162fc17a9ae 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py
@@ -47,6 +47,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/BackupPolicies_Create.json
+# x-ms-original-file: 2025-12-01/BackupPolicies_Create.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py
index 9fa42379d9f2..19eca4267644 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/BackupPolicies_Delete.json
+# x-ms-original-file: 2025-12-01/BackupPolicies_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py
index b7f3335f0f6a..415bce67836f 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/BackupPolicies_Get.json
+# x-ms-original-file: 2025-12-01/BackupPolicies_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py
index fed981bed483..d3f36ce55753 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/BackupPolicies_List.json
+# x-ms-original-file: 2025-12-01/BackupPolicies_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py
index e78f4d96ebe2..95d315419c94 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py
@@ -47,6 +47,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/BackupPolicies_Update.json
+# x-ms-original-file: 2025-12-01/BackupPolicies_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py
index 33d3256a33ad..c0d6cbcc4606 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/BackupVaults_Create.json
+# x-ms-original-file: 2025-12-01/BackupVaults_Create.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py
index 4de19521977c..6621dba1ac85 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/BackupVaults_Delete.json
+# x-ms-original-file: 2025-12-01/BackupVaults_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py
index 650580b6d044..c176c14d44ab 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/BackupVaults_Get.json
+# x-ms-original-file: 2025-12-01/BackupVaults_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py
index 1a5ef3a56221..9a8a3e068afc 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/BackupVaults_List.json
+# x-ms-original-file: 2025-12-01/BackupVaults_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py
index d9a7869fac9d..31de9545477f 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/BackupVaults_Update.json
+# x-ms-original-file: 2025-12-01/BackupVaults_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py
index 29f94c86f102..8592d8284bce 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py
@@ -40,6 +40,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/BackupsUnderAccount_Migrate.json
+# x-ms-original-file: 2025-12-01/BackupsUnderAccount_Migrate.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py
index 5bd671b36110..ada715308aae 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py
@@ -39,13 +39,13 @@ def main():
body={
"properties": {
"label": "myLabel",
- "volumeResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1",
+ "volumeResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1",
}
},
).result()
print(response)
-# x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Create.json
+# x-ms-original-file: 2025-12-01/BackupsUnderBackupVault_Create.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py
index 0966a7f05c0c..9324e0e36734 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Delete.json
+# x-ms-original-file: 2025-12-01/BackupsUnderBackupVault_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py
index e06ea7ccf3e4..f9e86134f80a 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Get.json
+# x-ms-original-file: 2025-12-01/BackupsUnderBackupVault_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_list_by_vault.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py
similarity index 92%
rename from sdk/netapp/azure-mgmt-netapp/generated_samples/backups_list_by_vault.py
rename to sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py
index 72a29844b8e7..040ba1b5a9bb 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_list_by_vault.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py
@@ -15,7 +15,7 @@
pip install azure-identity
pip install azure-mgmt-netapp
# USAGE
- python backups_list_by_vault.py
+ python backups_under_backup_vault_list.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/Backups_ListByVault.json
+# x-ms-original-file: 2025-12-01/BackupsUnderBackupVault_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py
index 775925ab4956..eb414a580f9a 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py
@@ -43,6 +43,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_SingleFileRestore.json
+# x-ms-original-file: 2025-12-01/BackupsUnderBackupVault_SingleFileRestore.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py
index b2f5d28a5c21..e118e684a843 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Update.json
+# x-ms-original-file: 2025-12-01/BackupsUnderBackupVault_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py
index 2547829aa596..92f8535766f7 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py
@@ -42,6 +42,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/BackupsUnderVolume_Migrate.json
+# x-ms-original-file: 2025-12-01/BackupsUnderVolume_Migrate.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_create_or_update.py
deleted file mode 100644
index 971accf3e599..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_create_or_update.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python buckets_create_or_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.buckets.begin_create_or_update(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- volume_name="volume1",
- bucket_name="bucket1",
- body={
- "properties": {
- "fileSystemUser": {"nfsUser": {"groupId": 1000, "userId": 1001}},
- "path": "/path",
- "permissions": "ReadOnly",
- "server": {"certificateObject": "", "fqdn": "fullyqualified.domainname.com"},
- }
- },
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/Buckets_CreateOrUpdate.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_delete.py
deleted file mode 100644
index c9d0f871ea09..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_delete.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python buckets_delete.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- client.buckets.begin_delete(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- volume_name="volume1",
- bucket_name="bucket1",
- ).result()
-
-
-# x-ms-original-file: 2025-09-01-preview/Buckets_Delete.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_generate_credentials.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_generate_credentials.py
deleted file mode 100644
index b780c8ef4290..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_generate_credentials.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python buckets_generate_credentials.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.buckets.generate_credentials(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- volume_name="volume1",
- bucket_name="bucket1",
- body={"keyPairExpiryDays": 3},
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/Buckets_GenerateCredentials.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_get.py
deleted file mode 100644
index f9eb7cd7642a..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_get.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python buckets_get.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.buckets.get(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- volume_name="volume1",
- bucket_name="bucket1",
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/Buckets_Get.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_list.py
deleted file mode 100644
index f5276b53c41e..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_list.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python buckets_list.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.buckets.list(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- volume_name="volume1",
- )
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/Buckets_List.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_create_or_update.py
deleted file mode 100644
index 676674094a6a..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_create_or_update.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# pylint: disable=line-too-long,useless-suppression
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python caches_create_or_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.caches.begin_create_or_update(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- cache_name="cache1",
- body={
- "location": "eastus",
- "properties": {
- "cacheSubnetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/cacheVnet/subnets/cacheSubnet1",
- "encryptionKeySource": "Microsoft.NetApp",
- "filepath": "cache-west-us2-01",
- "ldap": "Enabled",
- "ldapServerType": "OpenLDAP",
- "originClusterInformation": {
- "peerAddresses": ["192.0.2.10", "192.0.2.11"],
- "peerClusterName": "cluster1",
- "peerVolumeName": "originvol1",
- "peerVserverName": "vserver1",
- },
- "peeringSubnetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/icLifVnet/subnets/peeringSubnet1",
- "size": 107374182400,
- },
- },
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/Caches_CreateOrUpdate.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_delete.py
deleted file mode 100644
index 13b34316f15e..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_delete.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python caches_delete.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- client.caches.begin_delete(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- cache_name="cache1",
- ).result()
-
-
-# x-ms-original-file: 2025-09-01-preview/Caches_Delete.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_get.py
deleted file mode 100644
index 9ccdeab2c2e7..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_get.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python caches_get.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.caches.get(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- cache_name="cache1",
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/Caches_Get.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list_by_capacity_pools.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list_by_capacity_pools.py
deleted file mode 100644
index daf6a175ae40..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list_by_capacity_pools.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python caches_list_by_capacity_pools.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.caches.list_by_capacity_pools(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- )
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/Caches_ListByCapacityPools.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list_peering_passphrases.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list_peering_passphrases.py
deleted file mode 100644
index c9bfba6ffaa1..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list_peering_passphrases.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python caches_list_peering_passphrases.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.caches.list_peering_passphrases(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- cache_name="cache-1",
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/Caches_ListPeeringPassphrases.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_pool_change.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_pool_change.py
deleted file mode 100644
index 76813253f463..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_pool_change.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# pylint: disable=line-too-long,useless-suppression
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python caches_pool_change.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- client.caches.begin_pool_change(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- cache_name="cache1",
- body={
- "newPoolResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool2"
- },
- ).result()
-
-
-# x-ms-original-file: 2025-09-01-preview/Caches_PoolChange.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_update.py
deleted file mode 100644
index 08cf6b94f763..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_update.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python caches_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.caches.begin_update(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- cache_name="cache1",
- body={"properties": {"size": 214748364800}},
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/Caches_Update.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/check_file_path_availability.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/check_file_path_availability.py
index b8757d600ff5..38e12ffeaabf 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/check_file_path_availability.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/check_file_path_availability.py
@@ -35,12 +35,12 @@ def main():
location="eastus",
body={
"name": "my-exact-filepth",
- "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
+ "subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
},
)
print(response)
-# x-ms-original-file: 2025-09-01-preview/CheckFilePathAvailability.json
+# x-ms-original-file: 2025-12-01/CheckFilePathAvailability.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/check_name_availability.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/check_name_availability.py
index 992d63f7f488..94c816bb3186 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/check_name_availability.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/check_name_availability.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/CheckNameAvailability.json
+# x-ms-original-file: 2025-12-01/CheckNameAvailability.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/check_quota_availability.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/check_quota_availability.py
index 847101ba1987..4d1b4841abdc 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/check_quota_availability.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/check_quota_availability.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/CheckQuotaAvailability.json
+# x-ms-original-file: 2025-12-01/CheckQuotaAvailability.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_create_or_update.py
deleted file mode 100644
index f163a94e35ad..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_create_or_update.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_accounts_create_or_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_accounts.begin_create_or_update(
- resource_group_name="myRG",
- account_name="account1",
- body={"location": "eastus", "properties": {}, "tags": {"ac-tag1": "account1"}},
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticAccounts_CreateOrUpdate.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_delete.py
deleted file mode 100644
index 40b269b9eb99..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_delete.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_accounts_delete.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- client.elastic_accounts.begin_delete(
- resource_group_name="myRG",
- account_name="account1",
- ).result()
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticAccounts_Delete.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_get.py
deleted file mode 100644
index e5fc60f54545..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_get.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_accounts_get.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_accounts.get(
- resource_group_name="myRG",
- account_name="account1",
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticAccounts_Get.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_resource_group.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_resource_group.py
deleted file mode 100644
index 1d8ff55c839a..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_resource_group.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_accounts_list_by_resource_group.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_accounts.list_by_resource_group(
- resource_group_name="myRG",
- )
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticAccounts_ListByResourceGroup.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_subscription.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_subscription.py
deleted file mode 100644
index d05870872bd8..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_subscription.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_accounts_list_by_subscription.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_accounts.list_by_subscription()
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticAccounts_ListBySubscription.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_update.py
deleted file mode 100644
index 8db215da5aca..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_update.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_accounts_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_accounts.begin_update(
- resource_group_name="myRG",
- account_name="account1",
- body={"tags": {"Tag1": "Value1"}},
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticAccounts_Update.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_create_or_update.py
deleted file mode 100644
index b1d42661ec31..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_create_or_update.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_backup_policies_create_or_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_backup_policies.begin_create_or_update(
- resource_group_name="myRG",
- account_name="account1",
- backup_policy_name="backupPolicyName",
- body={
- "location": "westus",
- "properties": {
- "dailyBackupsToKeep": 10,
- "monthlyBackupsToKeep": 10,
- "policyState": "Enabled",
- "weeklyBackupsToKeep": 10,
- },
- },
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_CreateOrUpdate.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_delete.py
deleted file mode 100644
index 455b5d61754e..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_delete.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_backup_policies_delete.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- client.elastic_backup_policies.begin_delete(
- resource_group_name="resourceGroup",
- account_name="accountName",
- backup_policy_name="backupPolicyName",
- ).result()
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_Delete.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_get.py
deleted file mode 100644
index c634fd78ee37..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_get.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_backup_policies_get.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_backup_policies.get(
- resource_group_name="myRG",
- account_name="account1",
- backup_policy_name="backupPolicyName",
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_Get.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_list.py
deleted file mode 100644
index 564a123210bc..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_list.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_backup_policies_list.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_backup_policies.list_by_elastic_account(
- resource_group_name="myRG",
- account_name="account1",
- )
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_List.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_create.py
deleted file mode 100644
index c31128c7bb1f..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_create.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_backup_vaults_create.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_backup_vaults.begin_create_or_update(
- resource_group_name="myRG",
- account_name="account1",
- backup_vault_name="backupVault1",
- body={"location": "eastus"},
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_Create.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_delete.py
deleted file mode 100644
index 265c3c1d6017..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_delete.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_backup_vaults_delete.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- client.elastic_backup_vaults.begin_delete(
- resource_group_name="resourceGroup",
- account_name="account1",
- backup_vault_name="backupVault1",
- ).result()
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_Delete.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_get.py
deleted file mode 100644
index f7c4deefd806..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_get.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_backup_vaults_get.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_backup_vaults.get(
- resource_group_name="myRG",
- account_name="account1",
- backup_vault_name="backupVault1",
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_Get.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_list_by_elastic_account.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_list_by_elastic_account.py
deleted file mode 100644
index 1b1799756e6e..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_list_by_elastic_account.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_backup_vaults_list_by_elastic_account.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_backup_vaults.list_by_elastic_account(
- resource_group_name="myRG",
- account_name="account1",
- )
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_ListByElasticAccount.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_update.py
deleted file mode 100644
index 19c25c10910f..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_update.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_backup_vaults_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_backup_vaults.begin_update(
- resource_group_name="myRG",
- account_name="account1",
- backup_vault_name="backupVault1",
- body={"tags": {"Tag1": "Value1"}},
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticBackupVaults_Update.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_create_or_update.py
deleted file mode 100644
index c8f0f1b423c6..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_create_or_update.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# pylint: disable=line-too-long,useless-suppression
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_backups_create_or_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_backups.begin_create_or_update(
- resource_group_name="myRG",
- account_name="account1",
- backup_vault_name="backupVault1",
- backup_name="backup1",
- body={
- "properties": {
- "elasticSnapshotResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snap1",
- "elasticVolumeResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1",
- "label": "myLabel",
- "snapshotUsage": "UseExistingSnapshot",
- }
- },
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticBackups_CreateOrUpdate.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_delete.py
deleted file mode 100644
index 4561068193d5..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_delete.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_backups_delete.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- client.elastic_backups.begin_delete(
- resource_group_name="resourceGroup",
- account_name="account1",
- backup_vault_name="backupVault1",
- backup_name="backup1",
- ).result()
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticBackups_Delete.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_get.py
deleted file mode 100644
index 3e2dd0adef62..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_get.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_backups_get.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_backups.get(
- resource_group_name="myRG",
- account_name="account1",
- backup_vault_name="backupVault1",
- backup_name="backup1",
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticBackups_Get.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_list_by_vault.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_list_by_vault.py
deleted file mode 100644
index 0de61c567304..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_list_by_vault.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_backups_list_by_vault.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_backups.list_by_vault(
- resource_group_name="myRG",
- account_name="account1",
- backup_vault_name="backupVault1",
- )
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticBackups_ListByVault.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_change_zone.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_change_zone.py
deleted file mode 100644
index 655b97489428..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_change_zone.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_capacity_pools_change_zone.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_capacity_pools.begin_change_zone(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- body={"newZone": "3"},
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_ChangeZone.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_check_volume_file_path_availability.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_check_volume_file_path_availability.py
deleted file mode 100644
index 63f9cd34b904..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_check_volume_file_path_availability.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_capacity_pools_check_volume_file_path_availability.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_capacity_pools.check_volume_file_path_availability(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- body={"filePath": "my-exact-filepth"},
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_CheckVolumeFilePathAvailability.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update.py
deleted file mode 100644
index 32431c7ad704..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# pylint: disable=line-too-long,useless-suppression
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_capacity_pools_create_or_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_capacity_pools.begin_create_or_update(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- body={
- "location": "eastus",
- "properties": {
- "activeDirectoryConfigResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1",
- "serviceLevel": "ZoneRedundant",
- "size": 4398046511104,
- "subnetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
- },
- "zones": ["1", "2", "3"],
- },
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_CreateOrUpdate.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update_cmk.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update_cmk.py
deleted file mode 100644
index a628450df3da..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update_cmk.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# pylint: disable=line-too-long,useless-suppression
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_capacity_pools_create_or_update_cmk.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_capacity_pools.begin_create_or_update(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- body={
- "location": "eastus",
- "properties": {
- "activeDirectoryConfigResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1",
- "encryption": {
- "elasticPoolEncryptionKeySource": "NetApp",
- "keyVaultPrivateEndpointResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myKeyVault/privateEndpointConnections/myKeyVaultPec",
- },
- "serviceLevel": "ZoneRedundant",
- "size": 4398046511104,
- "subnetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
- },
- "zones": ["1", "2", "3"],
- },
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_CreateOrUpdateCMK.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_delete.py
deleted file mode 100644
index 73705f84d106..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_delete.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_capacity_pools_delete.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- client.elastic_capacity_pools.begin_delete(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- ).result()
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_Delete.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_get.py
deleted file mode 100644
index fcb8fd8d46fe..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_get.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_capacity_pools_get.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_capacity_pools.get(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_Get.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_list_by_elastic_account.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_list_by_elastic_account.py
deleted file mode 100644
index 305953b85e5a..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_list_by_elastic_account.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_capacity_pools_list_by_elastic_account.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_capacity_pools.list_by_elastic_account(
- resource_group_name="myRG",
- account_name="account1",
- )
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_ListByElasticAccount.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_update.py
deleted file mode 100644
index 8cb89ad7cd5c..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_update.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# pylint: disable=line-too-long,useless-suppression
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_capacity_pools_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_capacity_pools.begin_update(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- body={
- "properties": {
- "activeDirectoryConfigResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1",
- "size": 4398046511104,
- }
- },
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticCapacityPools_Update.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_create_or_update.py
deleted file mode 100644
index 35acc79eff1d..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_create_or_update.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_snapshot_policies_create_or_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_snapshot_policies.begin_create_or_update(
- resource_group_name="myRG",
- account_name="account1",
- snapshot_policy_name="snapshotPolicyName",
- body={
- "location": "eastus",
- "properties": {
- "dailySchedule": {"hour": 14, "minute": 30, "snapshotsToKeep": 4},
- "hourlySchedule": {"minute": 50, "snapshotsToKeep": 2},
- "monthlySchedule": {"daysOfMonth": [10, 11, 12], "hour": 14, "minute": 15, "snapshotsToKeep": 5},
- "policyStatus": "Enabled",
- "weeklySchedule": {"days": ["Wednesday"], "hour": 14, "minute": 45, "snapshotsToKeep": 3},
- },
- },
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_CreateOrUpdate.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_delete.py
deleted file mode 100644
index 627fa7e61845..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_delete.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_snapshot_policies_delete.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- client.elastic_snapshot_policies.begin_delete(
- resource_group_name="resourceGroup",
- account_name="accountName",
- snapshot_policy_name="snapshotPolicyName",
- ).result()
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_Delete.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_get.py
deleted file mode 100644
index 4cb09e706f75..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_get.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_snapshot_policies_get.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_snapshot_policies.get(
- resource_group_name="myRG",
- account_name="account1",
- snapshot_policy_name="snapshotPolicyName",
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_Get.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_by_elastic_account.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_by_elastic_account.py
deleted file mode 100644
index 27e829cbf04d..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_by_elastic_account.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_snapshot_policies_list_by_elastic_account.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_snapshot_policies.list_by_elastic_account(
- resource_group_name="myRG",
- account_name="account1",
- )
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_ListByElasticAccount.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_elastic_volumes.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_elastic_volumes.py
deleted file mode 100644
index d0fb124fcb2c..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_elastic_volumes.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_snapshot_policies_list_elastic_volumes.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_snapshot_policies.list_elastic_volumes(
- resource_group_name="myRG",
- account_name="account1",
- snapshot_policy_name="snapshotPolicyName",
- )
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_ListElasticVolumes.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_update.py
deleted file mode 100644
index cfb8160512c1..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_update.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_snapshot_policies_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_snapshot_policies.begin_update(
- resource_group_name="myRG",
- account_name="account1",
- snapshot_policy_name="snapshotPolicyName",
- body={
- "properties": {
- "dailySchedule": {"hour": 14, "minute": 30, "snapshotsToKeep": 4},
- "hourlySchedule": {"minute": 50, "snapshotsToKeep": 2},
- "monthlySchedule": {"daysOfMonth": [10, 11, 12], "hour": 14, "minute": 15, "snapshotsToKeep": 5},
- "policyStatus": "Enabled",
- "weeklySchedule": {"days": ["Wednesday"], "hour": 14, "minute": 45, "snapshotsToKeep": 3},
- }
- },
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_Update.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_delete.py
deleted file mode 100644
index c95c6ccd687c..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_delete.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_snapshots_delete.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- client.elastic_snapshots.begin_delete(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- volume_name="volume1",
- snapshot_name="snapshot1",
- ).result()
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_Delete.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_list_by_elastic_volume.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_list_by_elastic_volume.py
deleted file mode 100644
index 7bdaa705c28c..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_list_by_elastic_volume.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_snapshots_list_by_elastic_volume.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_snapshots.list_by_elastic_volume(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- volume_name="volume1",
- )
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_ListByElasticVolume.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_create_or_update.py
deleted file mode 100644
index d921dac463ba..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_create_or_update.py
+++ /dev/null
@@ -1,75 +0,0 @@
-# pylint: disable=line-too-long,useless-suppression
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_volumes_create_or_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_volumes.begin_create_or_update(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- volume_name="volume1",
- body={
- "location": "eastus",
- "properties": {
- "dataProtection": {
- "backup": {
- "elasticBackupPolicyResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupPolicies/elasticBackupPolicy1",
- "elasticBackupVaultResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupVaults/elasticBackupVault1",
- "policyEnforcement": "Enforced",
- },
- "snapshot": {
- "snapshotPolicyResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1"
- },
- },
- "exportPolicy": {
- "rules": [
- {
- "allowedClients": ["0.0.0.0/0"],
- "nfsv3": "Enabled",
- "nfsv4": "Disabled",
- "rootAccess": "Disabled",
- "ruleIndex": 1,
- "unixAccessRule": "ReadOnly",
- }
- ]
- },
- "filePath": "my-unique-file-path",
- "protocolTypes": ["NFSv3"],
- "size": 107374182400,
- },
- },
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticVolumes_CreateOrUpdate.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_delete.py
deleted file mode 100644
index b278873e6274..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_delete.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_volumes_delete.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- client.elastic_volumes.begin_delete(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- volume_name="volume1",
- ).result()
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Delete.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_get.py
deleted file mode 100644
index 384593c34da6..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_get.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_volumes_get.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_volumes.get(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- volume_name="volume1",
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Get.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_list_by_elastic_pool.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_list_by_elastic_pool.py
deleted file mode 100644
index 543034852b5e..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_list_by_elastic_pool.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_volumes_list_by_elastic_pool.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_volumes.list_by_elastic_pool(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- )
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticVolumes_ListByElasticPool.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_revert.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_revert.py
deleted file mode 100644
index 4cf521e944cd..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_revert.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# pylint: disable=line-too-long,useless-suppression
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_volumes_revert.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_volumes.begin_revert(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- volume_name="volume1",
- body={
- "snapshotResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snapshot1"
- },
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Revert.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_update.py
deleted file mode 100644
index 91bc3d91ef5a..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_update.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# pylint: disable=line-too-long,useless-suppression
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python elastic_volumes_update.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.elastic_volumes.begin_update(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- volume_name="volume1",
- body={
- "properties": {
- "dataProtection": {
- "snapshot": {
- "snapshotPolicyResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1"
- }
- },
- "exportPolicy": {
- "rules": [
- {
- "allowedClients": ["0.0.0.0/0"],
- "nfsv3": "Enabled",
- "nfsv4": "Disabled",
- "rootAccess": "Disabled",
- "ruleIndex": 1,
- "unixAccessRule": "ReadOnly",
- }
- ]
- },
- }
- },
- ).result()
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Update.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py
index c269626a0467..7d4cd406681d 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/GroupIdListForLDAPUser.json
+# x-ms-original-file: 2025-12-01/GroupIdListForLDAPUser.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_get.py
index 24c6786f3f59..452839cc3cd1 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimitsAccount_Get.json
+# x-ms-original-file: 2025-12-01/NetAppResourceQuotaLimitsAccount_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_list.py
index ce8ac09e9123..e4fe6368e0b4 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_account_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimitsAccount_List.json
+# x-ms-original-file: 2025-12-01/NetAppResourceQuotaLimitsAccount_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_get.py
index fca1f2be850e..ae0b10f56729 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimits_Get.json
+# x-ms-original-file: 2025-12-01/NetAppResourceQuotaLimits_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_list.py
index 6622229d3680..4580c1706837 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/net_app_resource_quota_limits_list.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimits_List.json
+# x-ms-original-file: 2025-12-01/NetAppResourceQuotaLimits_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_query.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_query.py
index 33681fdaa114..e07e9bad3bfc 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_query.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_query.py
@@ -35,12 +35,12 @@ def main():
location="eastus",
body={
"networkSiblingSetId": "9760acf5-4638-11e7-9bdb-020073ca3333",
- "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet",
+ "subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet",
},
)
print(response)
-# x-ms-original-file: 2025-09-01-preview/NetworkSiblingSet_Query.json
+# x-ms-original-file: 2025-12-01/NetworkSiblingSet_Query.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_update.py
index 2f3832be30a1..772309c9b5c7 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_update.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/network_sibling_set_update.py
@@ -37,12 +37,12 @@ def main():
"networkFeatures": "Standard",
"networkSiblingSetId": "9760acf5-4638-11e7-9bdb-020073ca3333",
"networkSiblingSetStateId": "12345_44420.8001578125",
- "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet",
+ "subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet",
},
).result()
print(response)
-# x-ms-original-file: 2025-09-01-preview/NetworkSiblingSet_Update.json
+# x-ms-original-file: 2025-12-01/NetworkSiblingSet_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py
index cfa2f3510230..143f98884ffe 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py
@@ -35,6 +35,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/OperationList.json
+# x-ms-original-file: 2025-12-01/OperationList.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py
index 53ba1ca35a85..323f740720f3 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py
@@ -42,6 +42,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Pools_CreateOrUpdate.json
+# x-ms-original-file: 2025-12-01/Pools_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update_custom_throughput.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update_custom_throughput.py
index a2d6418240c4..747972702a10 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update_custom_throughput.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update_custom_throughput.py
@@ -47,6 +47,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Pools_CreateOrUpdate_CustomThroughput.json
+# x-ms-original-file: 2025-12-01/Pools_CreateOrUpdate_CustomThroughput.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py
index fb55ae2bbe3f..877b7717d77b 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Pools_Delete.json
+# x-ms-original-file: 2025-12-01/Pools_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py
index ada745ad4bfa..1bc7178fc560 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Pools_Get.json
+# x-ms-original-file: 2025-12-01/Pools_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get_custom_throughput.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get_custom_throughput.py
index 2ba2d0900db2..92e0137da755 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get_custom_throughput.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get_custom_throughput.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Pools_Get_CustomThroughput.json
+# x-ms-original-file: 2025-12-01/Pools_Get_CustomThroughput.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py
index 0910db332b3a..1a11ea1c635c 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/Pools_List.json
+# x-ms-original-file: 2025-12-01/Pools_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update.py
similarity index 78%
rename from sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_update.py
rename to sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update.py
index 895a2bcecf77..806f30193e50 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_update.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update.py
@@ -15,7 +15,7 @@
pip install azure-identity
pip install azure-mgmt-netapp
# USAGE
- python buckets_update.py
+ python pools_update.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
@@ -30,22 +30,22 @@ def main():
subscription_id="SUBSCRIPTION_ID",
)
- response = client.buckets.begin_update(
+ response = client.pools.begin_update(
resource_group_name="myRG",
account_name="account1",
pool_name="pool1",
- volume_name="volume1",
- bucket_name="bucket1",
body={
- "properties": {
- "permissions": "ReadWrite",
- "server": {"certificateObject": "", "fqdn": "fullyqualified.domainname.com"},
- }
+ "id": "str",
+ "location": "str",
+ "name": "str",
+ "properties": {"coolAccess": bool, "customThroughputMibps": 0, "qosType": "str", "size": 0},
+ "tags": {"str": "str"},
+ "type": "str",
},
).result()
print(response)
-# x-ms-original-file: 2025-09-01-preview/Buckets_Update.json
+# x-ms-original-file: 2025-12-01/Pools_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update_custom_throughput.py
similarity index 75%
rename from sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_update.py
rename to sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update_custom_throughput.py
index bf2293c5e761..7338ac10fa47 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_update.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_update_custom_throughput.py
@@ -15,7 +15,7 @@
pip install azure-identity
pip install azure-mgmt-netapp
# USAGE
- python elastic_backup_policies_update.py
+ python pools_update_custom_throughput.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
@@ -30,22 +30,22 @@ def main():
subscription_id="SUBSCRIPTION_ID",
)
- response = client.elastic_backup_policies.begin_update(
+ response = client.pools.begin_update(
resource_group_name="myRG",
account_name="account1",
- backup_policy_name="backupPolicyName",
+ pool_name="customPool1",
body={
- "properties": {
- "dailyBackupsToKeep": 5,
- "monthlyBackupsToKeep": 10,
- "policyState": "Enabled",
- "weeklyBackupsToKeep": 10,
- }
+ "id": "str",
+ "location": "str",
+ "name": "str",
+ "properties": {"coolAccess": bool, "customThroughputMibps": 0, "qosType": "str", "size": 0},
+ "tags": {"str": "str"},
+ "type": "str",
},
).result()
print(response)
-# x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_Update.json
+# x-ms-original-file: 2025-12-01/Pools_Update_CustomThroughput.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_clear_suspects.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_clear_suspects.py
index 75c2dcc9d0ac..50021814170a 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_clear_suspects.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_clear_suspects.py
@@ -40,6 +40,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/RansomwareReports_ClearSuspects.json
+# x-ms-original-file: 2025-12-01/RansomwareReports_ClearSuspects.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_get.py
index 85f3bdd12830..9840869d5a47 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_get.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/RansomwareReports_Get.json
+# x-ms-original-file: 2025-12-01/RansomwareReports_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_list.py
index 4849a6ea9f20..ac6214b63b2b 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_list.py
@@ -40,6 +40,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/RansomwareReports_List.json
+# x-ms-original-file: 2025-12-01/RansomwareReports_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py
index cb378fb58dfb..08eade175f08 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/RegionInfo.json
+# x-ms-original-file: 2025-12-01/RegionInfo.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py
index 1c7de7d68fb9..2001d930aa34 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/RegionInfos_Get.json
+# x-ms-original-file: 2025-12-01/RegionInfos_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py
index 2bb9ea2e02d1..15516dc7001c 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/RegionInfos_List.json
+# x-ms-original-file: 2025-12-01/RegionInfos_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py
index 7813c15b4286..335e7a4c0a44 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py
@@ -48,6 +48,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Create.json
+# x-ms-original-file: 2025-12-01/SnapshotPolicies_Create.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py
index 0dfd7b3be7e0..1cbd45464597 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Delete.json
+# x-ms-original-file: 2025-12-01/SnapshotPolicies_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py
index c3b12faa46fe..8d579598dae8 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Get.json
+# x-ms-original-file: 2025-12-01/SnapshotPolicies_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py
index 53193473094f..b259da0bec9f 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_List.json
+# x-ms-original-file: 2025-12-01/SnapshotPolicies_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py
index 77fceb003331..96ed8afdb222 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_ListVolumes.json
+# x-ms-original-file: 2025-12-01/SnapshotPolicies_ListVolumes.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py
index b5c2e5c7a4e2..e182d2632d03 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py
@@ -48,6 +48,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Update.json
+# x-ms-original-file: 2025-12-01/SnapshotPolicies_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py
index 779f93944764..aa8fe85d5df4 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py
@@ -41,6 +41,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Snapshots_Create.json
+# x-ms-original-file: 2025-12-01/Snapshots_Create.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py
index ea2ab6054610..11bba125c9b4 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py
@@ -39,6 +39,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Snapshots_Delete.json
+# x-ms-original-file: 2025-12-01/Snapshots_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py
index dc04b2376242..eaf79fba90da 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Snapshots_Get.json
+# x-ms-original-file: 2025-12-01/Snapshots_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py
index 9987c22e8015..06386e5fb2f5 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py
@@ -40,6 +40,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/Snapshots_List.json
+# x-ms-original-file: 2025-12-01/Snapshots_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py
index 76d4cf0a9e3f..b8ad9bfa74c1 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py
@@ -40,6 +40,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Snapshots_SingleFileRestore.json
+# x-ms-original-file: 2025-12-01/Snapshots_SingleFileRestore.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_update.py
similarity index 89%
rename from sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_get.py
rename to sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_update.py
index bec12792c41f..a2000c98f4ac 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_update.py
@@ -15,7 +15,7 @@
pip install azure-identity
pip install azure-mgmt-netapp
# USAGE
- python elastic_snapshots_get.py
+ python snapshots_update.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
@@ -30,16 +30,17 @@ def main():
subscription_id="SUBSCRIPTION_ID",
)
- response = client.elastic_snapshots.get(
+ response = client.snapshots.begin_update(
resource_group_name="myRG",
account_name="account1",
pool_name="pool1",
volume_name="volume1",
snapshot_name="snapshot1",
- )
+ body={},
+ ).result()
print(response)
-# x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_Get.json
+# x-ms-original-file: 2025-12-01/Snapshots_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py
index 65038676c438..ff5821b10abd 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py
@@ -41,6 +41,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Subvolumes_Create.json
+# x-ms-original-file: 2025-12-01/Subvolumes_Create.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py
index 4e544779c185..f34a1f70bc55 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py
@@ -39,6 +39,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Subvolumes_Delete.json
+# x-ms-original-file: 2025-12-01/Subvolumes_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py
index 367d558c327c..f25c1b38fc0f 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Subvolumes_Get.json
+# x-ms-original-file: 2025-12-01/Subvolumes_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py
index 754c0d498e9d..45e8b17e1db6 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py
@@ -40,6 +40,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/Subvolumes_List.json
+# x-ms-original-file: 2025-12-01/Subvolumes_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py
index 6fe9ff1185b5..a5715380bab4 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Subvolumes_Metadata.json
+# x-ms-original-file: 2025-12-01/Subvolumes_Metadata.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py
index cd1e7ba7cef9..db533eb7dc17 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py
@@ -41,6 +41,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Subvolumes_Update.json
+# x-ms-original-file: 2025-12-01/Subvolumes_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_get.py
index af86ac2080db..f32b601b17c4 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Usages_Get.json
+# x-ms-original-file: 2025-12-01/Usages_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_list.py
index 9d74b57228da..8938ae87a76a 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/usages_list.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/Usages_List.json
+# x-ms-original-file: 2025-12-01/Usages_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py
index 1fe789272428..e8e0cd9ceeb4 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py
@@ -459,6 +459,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/VolumeGroups_Create_Oracle.json
+# x-ms-original-file: 2025-12-01/VolumeGroups_Create_Oracle.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py
index d9de87adf455..45d115acb63b 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py
@@ -221,6 +221,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/VolumeGroups_Create_SapHana.json
+# x-ms-original-file: 2025-12-01/VolumeGroups_Create_SapHana.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py
index 0ffea4ed6683..e55e5845ab15 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/VolumeGroups_Delete.json
+# x-ms-original-file: 2025-12-01/VolumeGroups_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py
index f5132ed68c09..cd550721e666 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/VolumeGroups_Get_Oracle.json
+# x-ms-original-file: 2025-12-01/VolumeGroups_Get_Oracle.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py
index cacf27ff9068..8ee189010d9a 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/VolumeGroups_Get_SapHana.json
+# x-ms-original-file: 2025-12-01/VolumeGroups_Get_SapHana.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py
index 830304a3435a..ffe109096c16 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/VolumeGroups_List_Oracle.json
+# x-ms-original-file: 2025-12-01/VolumeGroups_List_Oracle.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py
index e048b14f9c86..1b1ee7262957 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/VolumeGroups_List_SapHana.json
+# x-ms-original-file: 2025-12-01/VolumeGroups_List_SapHana.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py
index 32716712338a..40f41bc91e1f 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py
@@ -44,6 +44,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Create.json
+# x-ms-original-file: 2025-12-01/VolumeQuotaRules_Create.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py
index 02104826ddad..bc33206c69c2 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py
@@ -39,6 +39,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Delete.json
+# x-ms-original-file: 2025-12-01/VolumeQuotaRules_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py
index e57bc6bef0d2..15d7c2814421 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Get.json
+# x-ms-original-file: 2025-12-01/VolumeQuotaRules_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py
index 5f11e4a097e2..3bd63691d9ce 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py
@@ -40,6 +40,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_List.json
+# x-ms-original-file: 2025-12-01/VolumeQuotaRules_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py
index f29f53b3444a..281332b3f4f0 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py
@@ -41,6 +41,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Update.json
+# x-ms-original-file: 2025-12-01/VolumeQuotaRules_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py
index 8c8f71d920f0..363e10edcfe2 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Volumes_AuthorizeExternalReplication.json
+# x-ms-original-file: 2025-12-01/Volumes_AuthorizeExternalReplication.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py
index 598cb148306e..0ecb2f2b6da0 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py
@@ -42,6 +42,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_AuthorizeReplication.json
+# x-ms-original-file: 2025-12-01/Volumes_AuthorizeReplication.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py
index 8af58e09a833..21ac90695999 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_BreakFileLocks.json
+# x-ms-original-file: 2025-12-01/Volumes_BreakFileLocks.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py
index 47cbe061655d..84298bb965a7 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_BreakReplication.json
+# x-ms-original-file: 2025-12-01/Volumes_BreakReplication.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py
index d7dec2b0f52a..29ef1ec71c97 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py
@@ -41,7 +41,7 @@ def main():
"properties": {
"creationToken": "my-unique-file-path",
"serviceLevel": "Premium",
- "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
+ "subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
"usageThreshold": 107374182400,
},
},
@@ -49,6 +49,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Volumes_CreateOrUpdate.json
+# x-ms-original-file: 2025-12-01/Volumes_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py
index 69b41eea7179..d4f9ef19638a 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_Delete.json
+# x-ms-original-file: 2025-12-01/Volumes_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py
index adbd9d1dc00a..8b74aab97d0e 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_DeleteReplication.json
+# x-ms-original-file: 2025-12-01/Volumes_DeleteReplication.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_get.py
deleted file mode 100644
index a0475a909c4a..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_get.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python volumes_extra_large_volumes_get.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.volumes.get(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- volume_name="volume1",
- )
- print(response)
-
-
-# x-ms-original-file: 2025-09-01-preview/Volumes_ExtraLargeVolumes_Get.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_list.py
deleted file mode 100644
index b9f6ac05228e..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_list.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-
-from azure.identity import DefaultAzureCredential
-
-from azure.mgmt.netapp import NetAppManagementClient
-
-"""
-# PREREQUISITES
- pip install azure-identity
- pip install azure-mgmt-netapp
-# USAGE
- python volumes_extra_large_volumes_list.py
-
- Before run the sample, please set the values of the client ID, tenant ID and client secret
- of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
- AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
- https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
-"""
-
-
-def main():
- client = NetAppManagementClient(
- credential=DefaultAzureCredential(),
- subscription_id="SUBSCRIPTION_ID",
- )
-
- response = client.volumes.list(
- resource_group_name="myRG",
- account_name="account1",
- pool_name="pool1",
- )
- for item in response:
- print(item)
-
-
-# x-ms-original-file: 2025-09-01-preview/Volumes_ExtraLargeVolumes_List.json
-if __name__ == "__main__":
- main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py
index dcaef5e7eedf..2a72d84c22ad 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_FinalizeExternalReplication.json
+# x-ms-original-file: 2025-12-01/Volumes_FinalizeExternalReplication.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py
index 64f189808641..9983a4e89e13 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_FinalizeRelocation.json
+# x-ms-original-file: 2025-12-01/Volumes_FinalizeRelocation.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py
index f9dd9b5c9efc..02f70432a2da 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Volumes_Get.json
+# x-ms-original-file: 2025-12-01/Volumes_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py
index a5b6f494f953..07361be5155f 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Volumes_LatestBackupStatus.json
+# x-ms-original-file: 2025-12-01/Volumes_LatestBackupStatus.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py
index ab4e49b4418e..ffcfea313b2e 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Volumes_LatestRestoreStatus.json
+# x-ms-original-file: 2025-12-01/Volumes_LatestRestoreStatus.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py
index 692209ce26b2..f63223fe4e41 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/Volumes_List.json
+# x-ms-original-file: 2025-12-01/Volumes_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py
index 781fe857e92f..bc42b1057d22 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Volumes_ListQuotaReport.json
+# x-ms-original-file: 2025-12-01/Volumes_ListQuotaReport.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py
index e43d14fadec9..eed074851cca 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py
@@ -40,6 +40,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01-preview/Volumes_ListReplications.json
+# x-ms-original-file: 2025-12-01/Volumes_ListReplications.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py
index ff455c5c81c5..692a8fc008f3 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Volumes_PeerExternalCluster.json
+# x-ms-original-file: 2025-12-01/Volumes_PeerExternalCluster.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py
index 9ad365289b09..4fee91fe703c 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_PerformReplicationTransfer.json
+# x-ms-original-file: 2025-12-01/Volumes_PerformReplicationTransfer.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py
index 127bda99c257..f1d29588237e 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py
@@ -42,6 +42,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_PoolChange.json
+# x-ms-original-file: 2025-12-01/Volumes_PoolChange.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py
index 5a4b063aa6e6..5cfd69547286 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Volumes_PopulateAvailabilityZones.json
+# x-ms-original-file: 2025-12-01/Volumes_PopulateAvailabilityZones.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py
index 4820f0790a11..3a6931d7987c 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_ReInitializeReplication.json
+# x-ms-original-file: 2025-12-01/Volumes_ReInitializeReplication.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py
index 24e3f64c0c1f..d56f22b7725b 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py
@@ -42,6 +42,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_ReestablishReplication.json
+# x-ms-original-file: 2025-12-01/Volumes_ReestablishReplication.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py
index a5d399635993..bc42d7e9e04a 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_Relocate.json
+# x-ms-original-file: 2025-12-01/Volumes_Relocate.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py
index 6363f3ab6452..9dcc808a8937 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Volumes_ReplicationStatus.json
+# x-ms-original-file: 2025-12-01/Volumes_ReplicationStatus.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py
index baef8d7f1486..e3f006347ec7 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_ResetCifsPassword.json
+# x-ms-original-file: 2025-12-01/Volumes_ResetCifsPassword.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py
index fda3dc4cffdb..f31387e12915 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_ResyncReplication.json
+# x-ms-original-file: 2025-12-01/Volumes_ResyncReplication.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py
index 21f8ee874958..0727a69164b0 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py
@@ -42,6 +42,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_Revert.json
+# x-ms-original-file: 2025-12-01/Volumes_Revert.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py
index 92fdd87d0bb8..34b9cfe10a4d 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: 2025-09-01-preview/Volumes_RevertRelocation.json
+# x-ms-original-file: 2025-12-01/Volumes_RevertRelocation.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py
index 62edc655e8d0..2f0dbcd1ce0e 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01-preview/Volumes_SplitClone.json
+# x-ms-original-file: 2025-12-01/Volumes_SplitClone.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_update.py
new file mode 100644
index 000000000000..41e618030524
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_update.py
@@ -0,0 +1,94 @@
+# 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) Python Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.netapp import NetAppManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-netapp
+# USAGE
+ python volumes_update.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = NetAppManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="SUBSCRIPTION_ID",
+ )
+
+ response = client.volumes.begin_update(
+ resource_group_name="myRG",
+ account_name="account1",
+ pool_name="pool1",
+ volume_name="volume1",
+ body={
+ "id": "str",
+ "location": "str",
+ "name": "str",
+ "properties": {
+ "coolAccess": bool,
+ "coolAccessRetrievalPolicy": "str",
+ "coolAccessTieringPolicy": "str",
+ "coolnessPeriod": 0,
+ "dataProtection": {
+ "backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool},
+ "ransomwareProtection": {"desiredRansomwareProtectionState": "str"},
+ "snapshot": {"snapshotPolicyId": "str"},
+ },
+ "defaultGroupQuotaInKiBs": 0,
+ "defaultUserQuotaInKiBs": 0,
+ "exportPolicy": {
+ "rules": [
+ {
+ "allowedClients": "str",
+ "chownMode": "str",
+ "cifs": bool,
+ "hasRootAccess": bool,
+ "kerberos5ReadOnly": bool,
+ "kerberos5ReadWrite": bool,
+ "kerberos5iReadOnly": bool,
+ "kerberos5iReadWrite": bool,
+ "kerberos5pReadOnly": bool,
+ "kerberos5pReadWrite": bool,
+ "nfsv3": bool,
+ "nfsv41": bool,
+ "ruleIndex": 0,
+ "unixReadOnly": bool,
+ "unixReadWrite": bool,
+ }
+ ]
+ },
+ "isDefaultQuotaEnabled": bool,
+ "protocolTypes": ["str"],
+ "serviceLevel": "str",
+ "smbAccessBasedEnumeration": "str",
+ "smbNonBrowsable": "str",
+ "snapshotDirectoryVisible": bool,
+ "throughputMibps": 0.0,
+ "unixPermissions": "str",
+ "usageThreshold": 0,
+ },
+ "tags": {"str": "str"},
+ "type": "str",
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: 2025-12-01/Volumes_Update.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py
index d25eaa9a9e1d..cfc07091c547 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py
@@ -86,13 +86,6 @@ def test_accounts_begin_create_or_update(self, resource_group):
"status": "str",
},
},
- "ldapConfiguration": {
- "certificateCNHost": "str",
- "domain": "str",
- "ldapOverTLS": bool,
- "ldapServers": ["str"],
- "serverCACertificate": "str",
- },
"multiAdStatus": "str",
"nfsV4IDDomain": "str",
"provisioningState": "str",
@@ -169,13 +162,6 @@ def test_accounts_begin_update(self, resource_group):
"status": "str",
},
},
- "ldapConfiguration": {
- "certificateCNHost": "str",
- "domain": "str",
- "ldapOverTLS": bool,
- "ldapServers": ["str"],
- "serverCACertificate": "str",
- },
"multiAdStatus": "str",
"nfsV4IDDomain": "str",
"provisioningState": "str",
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py
index 46d0026072d5..2eeec0aab482 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py
@@ -92,13 +92,6 @@ async def test_accounts_begin_create_or_update(self, resource_group):
"status": "str",
},
},
- "ldapConfiguration": {
- "certificateCNHost": "str",
- "domain": "str",
- "ldapOverTLS": bool,
- "ldapServers": ["str"],
- "serverCACertificate": "str",
- },
"multiAdStatus": "str",
"nfsV4IDDomain": "str",
"provisioningState": "str",
@@ -181,13 +174,6 @@ async def test_accounts_begin_update(self, resource_group):
"status": "str",
},
},
- "ldapConfiguration": {
- "certificateCNHost": "str",
- "domain": "str",
- "ldapOverTLS": bool,
- "ldapServers": ["str"],
- "serverCACertificate": "str",
- },
"multiAdStatus": "str",
"nfsV4IDDomain": "str",
"provisioningState": "str",
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations.py
deleted file mode 100644
index 89047675dc8e..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations.py
+++ /dev/null
@@ -1,144 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementActiveDirectoryConfigsOperations(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_active_directory_configs_get(self, resource_group):
- response = self.client.active_directory_configs.get(
- resource_group_name=resource_group.name,
- active_directory_config_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_active_directory_configs_begin_create_or_update(self, resource_group):
- response = self.client.active_directory_configs.begin_create_or_update(
- resource_group_name=resource_group.name,
- active_directory_config_name="str",
- body={
- "location": "str",
- "etag": "str",
- "id": "str",
- "identity": {
- "type": "str",
- "principalId": "str",
- "tenantId": "str",
- "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
- },
- "name": "str",
- "properties": {
- "domain": "str",
- "secretPassword": {
- "identity": {"principalId": "str", "userAssignedIdentity": "str"},
- "keyVaultProperties": {"keyVaultUri": "str", "secretName": "str"},
- },
- "activeDirectoryStatus": "str",
- "administrators": ["str"],
- "backupOperators": ["str"],
- "dns": ["str"],
- "organizationalUnit": "str",
- "provisioningState": "str",
- "securityOperators": ["str"],
- "site": "str",
- "smbServerName": "str",
- "userName": "str",
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_active_directory_configs_begin_update(self, resource_group):
- response = self.client.active_directory_configs.begin_update(
- resource_group_name=resource_group.name,
- active_directory_config_name="str",
- body={
- "identity": {
- "type": "str",
- "principalId": "str",
- "tenantId": "str",
- "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
- },
- "properties": {
- "administrators": ["str"],
- "backupOperators": ["str"],
- "dns": ["str"],
- "domain": "str",
- "organizationalUnit": "str",
- "secretPassword": {
- "identity": {"principalId": "str", "userAssignedIdentity": "str"},
- "keyVaultProperties": {"keyVaultUri": "str", "secretName": "str"},
- },
- "securityOperators": ["str"],
- "site": "str",
- "smbServerName": "str",
- "userName": "str",
- },
- "tags": {"str": "str"},
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_active_directory_configs_begin_delete(self, resource_group):
- response = self.client.active_directory_configs.begin_delete(
- resource_group_name=resource_group.name,
- active_directory_config_name="str",
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_active_directory_configs_list_by_resource_group(self, resource_group):
- response = self.client.active_directory_configs.list_by_resource_group(
- resource_group_name=resource_group.name,
- )
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_active_directory_configs_list_by_subscription(self, resource_group):
- response = self.client.active_directory_configs.list_by_subscription()
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations_async.py
deleted file mode 100644
index 4301312b2fc4..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations_async.py
+++ /dev/null
@@ -1,151 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp.aio import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
-from devtools_testutils.aio import recorded_by_proxy_async
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementActiveDirectoryConfigsOperationsAsync(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_active_directory_configs_get(self, resource_group):
- response = await self.client.active_directory_configs.get(
- resource_group_name=resource_group.name,
- active_directory_config_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_active_directory_configs_begin_create_or_update(self, resource_group):
- response = await (
- await self.client.active_directory_configs.begin_create_or_update(
- resource_group_name=resource_group.name,
- active_directory_config_name="str",
- body={
- "location": "str",
- "etag": "str",
- "id": "str",
- "identity": {
- "type": "str",
- "principalId": "str",
- "tenantId": "str",
- "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
- },
- "name": "str",
- "properties": {
- "domain": "str",
- "secretPassword": {
- "identity": {"principalId": "str", "userAssignedIdentity": "str"},
- "keyVaultProperties": {"keyVaultUri": "str", "secretName": "str"},
- },
- "activeDirectoryStatus": "str",
- "administrators": ["str"],
- "backupOperators": ["str"],
- "dns": ["str"],
- "organizationalUnit": "str",
- "provisioningState": "str",
- "securityOperators": ["str"],
- "site": "str",
- "smbServerName": "str",
- "userName": "str",
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_active_directory_configs_begin_update(self, resource_group):
- response = await (
- await self.client.active_directory_configs.begin_update(
- resource_group_name=resource_group.name,
- active_directory_config_name="str",
- body={
- "identity": {
- "type": "str",
- "principalId": "str",
- "tenantId": "str",
- "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
- },
- "properties": {
- "administrators": ["str"],
- "backupOperators": ["str"],
- "dns": ["str"],
- "domain": "str",
- "organizationalUnit": "str",
- "secretPassword": {
- "identity": {"principalId": "str", "userAssignedIdentity": "str"},
- "keyVaultProperties": {"keyVaultUri": "str", "secretName": "str"},
- },
- "securityOperators": ["str"],
- "site": "str",
- "smbServerName": "str",
- "userName": "str",
- },
- "tags": {"str": "str"},
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_active_directory_configs_begin_delete(self, resource_group):
- response = await (
- await self.client.active_directory_configs.begin_delete(
- resource_group_name=resource_group.name,
- active_directory_config_name="str",
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_active_directory_configs_list_by_resource_group(self, resource_group):
- response = self.client.active_directory_configs.list_by_resource_group(
- resource_group_name=resource_group.name,
- )
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_active_directory_configs_list_by_subscription(self, resource_group):
- response = self.client.active_directory_configs.list_by_subscription()
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations.py
deleted file mode 100644
index a1f9566dc1a7..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations.py
+++ /dev/null
@@ -1,150 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementBucketsOperations(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_buckets_get(self, resource_group):
- response = self.client.buckets.get(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- bucket_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_buckets_begin_create_or_update(self, resource_group):
- response = self.client.buckets.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- bucket_name="str",
- body={
- "id": "str",
- "name": "str",
- "properties": {
- "fileSystemUser": {"cifsUser": {"username": "str"}, "nfsUser": {"groupId": 0, "userId": 0}},
- "path": "str",
- "permissions": "str",
- "provisioningState": "str",
- "server": {
- "certificateCommonName": "str",
- "certificateExpiryDate": "2020-02-20 00:00:00",
- "certificateObject": "str",
- "fqdn": "str",
- "ipAddress": "str",
- },
- "status": "str",
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "type": "str",
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_buckets_begin_update(self, resource_group):
- response = self.client.buckets.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- bucket_name="str",
- body={
- "id": "str",
- "name": "str",
- "properties": {
- "fileSystemUser": {"cifsUser": {"username": "str"}, "nfsUser": {"groupId": 0, "userId": 0}},
- "path": "str",
- "permissions": "str",
- "provisioningState": "str",
- "server": {"certificateObject": "str", "fqdn": "str"},
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "type": "str",
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_buckets_begin_delete(self, resource_group):
- response = self.client.buckets.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- bucket_name="str",
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_buckets_list(self, resource_group):
- response = self.client.buckets.list(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- )
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_buckets_generate_credentials(self, resource_group):
- response = self.client.buckets.generate_credentials(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- bucket_name="str",
- body={"keyPairExpiryDays": 0},
- )
-
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations_async.py
deleted file mode 100644
index eb8429798c20..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations_async.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp.aio import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
-from devtools_testutils.aio import recorded_by_proxy_async
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementBucketsOperationsAsync(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_buckets_get(self, resource_group):
- response = await self.client.buckets.get(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- bucket_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_buckets_begin_create_or_update(self, resource_group):
- response = await (
- await self.client.buckets.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- bucket_name="str",
- body={
- "id": "str",
- "name": "str",
- "properties": {
- "fileSystemUser": {"cifsUser": {"username": "str"}, "nfsUser": {"groupId": 0, "userId": 0}},
- "path": "str",
- "permissions": "str",
- "provisioningState": "str",
- "server": {
- "certificateCommonName": "str",
- "certificateExpiryDate": "2020-02-20 00:00:00",
- "certificateObject": "str",
- "fqdn": "str",
- "ipAddress": "str",
- },
- "status": "str",
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "type": "str",
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_buckets_begin_update(self, resource_group):
- response = await (
- await self.client.buckets.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- bucket_name="str",
- body={
- "id": "str",
- "name": "str",
- "properties": {
- "fileSystemUser": {"cifsUser": {"username": "str"}, "nfsUser": {"groupId": 0, "userId": 0}},
- "path": "str",
- "permissions": "str",
- "provisioningState": "str",
- "server": {"certificateObject": "str", "fqdn": "str"},
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "type": "str",
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_buckets_begin_delete(self, resource_group):
- response = await (
- await self.client.buckets.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- bucket_name="str",
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_buckets_list(self, resource_group):
- response = self.client.buckets.list(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- )
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_buckets_generate_credentials(self, resource_group):
- response = await self.client.buckets.generate_credentials(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- bucket_name="str",
- body={"keyPairExpiryDays": 0},
- )
-
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_caches_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_caches_operations.py
deleted file mode 100644
index 6ef6b7299a85..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_caches_operations.py
+++ /dev/null
@@ -1,219 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementCachesOperations(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_caches_get(self, resource_group):
- response = self.client.caches.get(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- cache_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_caches_begin_create_or_update(self, resource_group):
- response = self.client.caches.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- cache_name="str",
- body={
- "location": "str",
- "properties": {
- "cacheSubnetResourceId": "str",
- "encryptionKeySource": "str",
- "filepath": "str",
- "originClusterInformation": {
- "peerAddresses": ["str"],
- "peerClusterName": "str",
- "peerVolumeName": "str",
- "peerVserverName": "str",
- },
- "peeringSubnetResourceId": "str",
- "size": 0,
- "actualThroughputMibps": 0.0,
- "cacheState": "str",
- "cifsChangeNotifications": "str",
- "encryption": "str",
- "exportPolicy": {
- "rules": [
- {
- "allowedClients": "str",
- "chownMode": "str",
- "cifs": bool,
- "hasRootAccess": bool,
- "kerberos5ReadOnly": bool,
- "kerberos5ReadWrite": bool,
- "kerberos5iReadOnly": bool,
- "kerberos5iReadWrite": bool,
- "kerberos5pReadOnly": bool,
- "kerberos5pReadWrite": bool,
- "nfsv3": bool,
- "nfsv41": bool,
- "ruleIndex": 0,
- "unixReadOnly": bool,
- "unixReadWrite": bool,
- }
- ]
- },
- "globalFileLocking": "str",
- "kerberos": "str",
- "keyVaultPrivateEndpointResourceId": "str",
- "language": "str",
- "ldap": "str",
- "ldapServerType": "str",
- "maximumNumberOfFiles": 0,
- "mountTargets": [{"ipAddress": "str", "mountTargetId": "str", "smbServerFqdn": "str"}],
- "protocolTypes": ["str"],
- "provisioningState": "str",
- "smbSettings": {
- "smbAccessBasedEnumerations": "str",
- "smbEncryption": "str",
- "smbNonBrowsable": "str",
- },
- "throughputMibps": 0.0,
- "writeBack": "str",
- },
- "etag": "str",
- "id": "str",
- "name": "str",
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- "zones": ["str"],
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_caches_begin_update(self, resource_group):
- response = self.client.caches.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- cache_name="str",
- body={
- "properties": {
- "cifsChangeNotifications": "str",
- "exportPolicy": {
- "rules": [
- {
- "allowedClients": "str",
- "chownMode": "str",
- "cifs": bool,
- "hasRootAccess": bool,
- "kerberos5ReadOnly": bool,
- "kerberos5ReadWrite": bool,
- "kerberos5iReadOnly": bool,
- "kerberos5iReadWrite": bool,
- "kerberos5pReadOnly": bool,
- "kerberos5pReadWrite": bool,
- "nfsv3": bool,
- "nfsv41": bool,
- "ruleIndex": 0,
- "unixReadOnly": bool,
- "unixReadWrite": bool,
- }
- ]
- },
- "keyVaultPrivateEndpointResourceId": "str",
- "protocolTypes": ["str"],
- "size": 0,
- "smbSettings": {
- "smbAccessBasedEnumerations": "str",
- "smbEncryption": "str",
- "smbNonBrowsable": "str",
- },
- "throughputMibps": 0.0,
- "writeBack": "str",
- },
- "tags": {"str": "str"},
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_caches_begin_delete(self, resource_group):
- response = self.client.caches.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- cache_name="str",
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_caches_list_by_capacity_pools(self, resource_group):
- response = self.client.caches.list_by_capacity_pools(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- )
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_caches_list_peering_passphrases(self, resource_group):
- response = self.client.caches.list_peering_passphrases(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- cache_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_caches_begin_pool_change(self, resource_group):
- response = self.client.caches.begin_pool_change(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- cache_name="str",
- body={"newPoolResourceId": "str"},
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_caches_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_caches_operations_async.py
deleted file mode 100644
index ee4f338b4ce3..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_caches_operations_async.py
+++ /dev/null
@@ -1,228 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp.aio import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
-from devtools_testutils.aio import recorded_by_proxy_async
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementCachesOperationsAsync(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_caches_get(self, resource_group):
- response = await self.client.caches.get(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- cache_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_caches_begin_create_or_update(self, resource_group):
- response = await (
- await self.client.caches.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- cache_name="str",
- body={
- "location": "str",
- "properties": {
- "cacheSubnetResourceId": "str",
- "encryptionKeySource": "str",
- "filepath": "str",
- "originClusterInformation": {
- "peerAddresses": ["str"],
- "peerClusterName": "str",
- "peerVolumeName": "str",
- "peerVserverName": "str",
- },
- "peeringSubnetResourceId": "str",
- "size": 0,
- "actualThroughputMibps": 0.0,
- "cacheState": "str",
- "cifsChangeNotifications": "str",
- "encryption": "str",
- "exportPolicy": {
- "rules": [
- {
- "allowedClients": "str",
- "chownMode": "str",
- "cifs": bool,
- "hasRootAccess": bool,
- "kerberos5ReadOnly": bool,
- "kerberos5ReadWrite": bool,
- "kerberos5iReadOnly": bool,
- "kerberos5iReadWrite": bool,
- "kerberos5pReadOnly": bool,
- "kerberos5pReadWrite": bool,
- "nfsv3": bool,
- "nfsv41": bool,
- "ruleIndex": 0,
- "unixReadOnly": bool,
- "unixReadWrite": bool,
- }
- ]
- },
- "globalFileLocking": "str",
- "kerberos": "str",
- "keyVaultPrivateEndpointResourceId": "str",
- "language": "str",
- "ldap": "str",
- "ldapServerType": "str",
- "maximumNumberOfFiles": 0,
- "mountTargets": [{"ipAddress": "str", "mountTargetId": "str", "smbServerFqdn": "str"}],
- "protocolTypes": ["str"],
- "provisioningState": "str",
- "smbSettings": {
- "smbAccessBasedEnumerations": "str",
- "smbEncryption": "str",
- "smbNonBrowsable": "str",
- },
- "throughputMibps": 0.0,
- "writeBack": "str",
- },
- "etag": "str",
- "id": "str",
- "name": "str",
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- "zones": ["str"],
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_caches_begin_update(self, resource_group):
- response = await (
- await self.client.caches.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- cache_name="str",
- body={
- "properties": {
- "cifsChangeNotifications": "str",
- "exportPolicy": {
- "rules": [
- {
- "allowedClients": "str",
- "chownMode": "str",
- "cifs": bool,
- "hasRootAccess": bool,
- "kerberos5ReadOnly": bool,
- "kerberos5ReadWrite": bool,
- "kerberos5iReadOnly": bool,
- "kerberos5iReadWrite": bool,
- "kerberos5pReadOnly": bool,
- "kerberos5pReadWrite": bool,
- "nfsv3": bool,
- "nfsv41": bool,
- "ruleIndex": 0,
- "unixReadOnly": bool,
- "unixReadWrite": bool,
- }
- ]
- },
- "keyVaultPrivateEndpointResourceId": "str",
- "protocolTypes": ["str"],
- "size": 0,
- "smbSettings": {
- "smbAccessBasedEnumerations": "str",
- "smbEncryption": "str",
- "smbNonBrowsable": "str",
- },
- "throughputMibps": 0.0,
- "writeBack": "str",
- },
- "tags": {"str": "str"},
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_caches_begin_delete(self, resource_group):
- response = await (
- await self.client.caches.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- cache_name="str",
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_caches_list_by_capacity_pools(self, resource_group):
- response = self.client.caches.list_by_capacity_pools(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- )
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_caches_list_peering_passphrases(self, resource_group):
- response = await self.client.caches.list_peering_passphrases(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- cache_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_caches_begin_pool_change(self, resource_group):
- response = await (
- await self.client.caches.begin_pool_change(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- cache_name="str",
- body={"newPoolResourceId": "str"},
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations.py
deleted file mode 100644
index f1ee61b59b69..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations.py
+++ /dev/null
@@ -1,137 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticAccountsOperations(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_accounts_get(self, resource_group):
- response = self.client.elastic_accounts.get(
- resource_group_name=resource_group.name,
- account_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_accounts_begin_create_or_update(self, resource_group):
- response = self.client.elastic_accounts.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- body={
- "location": "str",
- "eTag": "str",
- "id": "str",
- "identity": {
- "type": "str",
- "principalId": "str",
- "tenantId": "str",
- "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
- },
- "name": "str",
- "properties": {
- "encryption": {
- "identity": {"principalId": "str", "userAssignedIdentity": "str"},
- "keySource": "str",
- "keyVaultProperties": {
- "keyName": "str",
- "keyVaultResourceId": "str",
- "keyVaultUri": "str",
- "status": "str",
- },
- },
- "provisioningState": "str",
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_accounts_begin_update(self, resource_group):
- response = self.client.elastic_accounts.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- body={
- "identity": {
- "type": "str",
- "principalId": "str",
- "tenantId": "str",
- "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
- },
- "properties": {
- "encryption": {
- "identity": {"principalId": "str", "userAssignedIdentity": "str"},
- "keySource": "str",
- "keyVaultProperties": {
- "keyName": "str",
- "keyVaultResourceId": "str",
- "keyVaultUri": "str",
- "status": "str",
- },
- }
- },
- "tags": {"str": "str"},
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_accounts_begin_delete(self, resource_group):
- response = self.client.elastic_accounts.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_accounts_list_by_resource_group(self, resource_group):
- response = self.client.elastic_accounts.list_by_resource_group(
- resource_group_name=resource_group.name,
- )
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_accounts_list_by_subscription(self, resource_group):
- response = self.client.elastic_accounts.list_by_subscription()
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations_async.py
deleted file mode 100644
index b615d728ddcf..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations_async.py
+++ /dev/null
@@ -1,144 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp.aio import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
-from devtools_testutils.aio import recorded_by_proxy_async
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticAccountsOperationsAsync(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_accounts_get(self, resource_group):
- response = await self.client.elastic_accounts.get(
- resource_group_name=resource_group.name,
- account_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_accounts_begin_create_or_update(self, resource_group):
- response = await (
- await self.client.elastic_accounts.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- body={
- "location": "str",
- "eTag": "str",
- "id": "str",
- "identity": {
- "type": "str",
- "principalId": "str",
- "tenantId": "str",
- "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
- },
- "name": "str",
- "properties": {
- "encryption": {
- "identity": {"principalId": "str", "userAssignedIdentity": "str"},
- "keySource": "str",
- "keyVaultProperties": {
- "keyName": "str",
- "keyVaultResourceId": "str",
- "keyVaultUri": "str",
- "status": "str",
- },
- },
- "provisioningState": "str",
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_accounts_begin_update(self, resource_group):
- response = await (
- await self.client.elastic_accounts.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- body={
- "identity": {
- "type": "str",
- "principalId": "str",
- "tenantId": "str",
- "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
- },
- "properties": {
- "encryption": {
- "identity": {"principalId": "str", "userAssignedIdentity": "str"},
- "keySource": "str",
- "keyVaultProperties": {
- "keyName": "str",
- "keyVaultResourceId": "str",
- "keyVaultUri": "str",
- "status": "str",
- },
- }
- },
- "tags": {"str": "str"},
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_accounts_begin_delete(self, resource_group):
- response = await (
- await self.client.elastic_accounts.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_accounts_list_by_resource_group(self, resource_group):
- response = self.client.elastic_accounts.list_by_resource_group(
- resource_group_name=resource_group.name,
- )
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_accounts_list_by_subscription(self, resource_group):
- response = self.client.elastic_accounts.list_by_subscription()
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations.py
deleted file mode 100644
index 2a5975f76da1..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations.py
+++ /dev/null
@@ -1,111 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticBackupPoliciesOperations(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backup_policies_get(self, resource_group):
- response = self.client.elastic_backup_policies.get(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_policy_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backup_policies_begin_create_or_update(self, resource_group):
- response = self.client.elastic_backup_policies.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_policy_name="str",
- body={
- "location": "str",
- "eTag": "str",
- "id": "str",
- "name": "str",
- "properties": {
- "assignedVolumesCount": 0,
- "dailyBackupsToKeep": 0,
- "monthlyBackupsToKeep": 0,
- "policyState": "str",
- "provisioningState": "str",
- "weeklyBackupsToKeep": 0,
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backup_policies_begin_update(self, resource_group):
- response = self.client.elastic_backup_policies.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_policy_name="str",
- body={
- "properties": {
- "dailyBackupsToKeep": 0,
- "monthlyBackupsToKeep": 0,
- "policyState": "str",
- "weeklyBackupsToKeep": 0,
- },
- "tags": {"str": "str"},
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backup_policies_begin_delete(self, resource_group):
- response = self.client.elastic_backup_policies.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_policy_name="str",
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backup_policies_list_by_elastic_account(self, resource_group):
- response = self.client.elastic_backup_policies.list_by_elastic_account(
- resource_group_name=resource_group.name,
- account_name="str",
- )
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations_async.py
deleted file mode 100644
index c3111a40262a..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations_async.py
+++ /dev/null
@@ -1,118 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp.aio import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
-from devtools_testutils.aio import recorded_by_proxy_async
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticBackupPoliciesOperationsAsync(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backup_policies_get(self, resource_group):
- response = await self.client.elastic_backup_policies.get(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_policy_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backup_policies_begin_create_or_update(self, resource_group):
- response = await (
- await self.client.elastic_backup_policies.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_policy_name="str",
- body={
- "location": "str",
- "eTag": "str",
- "id": "str",
- "name": "str",
- "properties": {
- "assignedVolumesCount": 0,
- "dailyBackupsToKeep": 0,
- "monthlyBackupsToKeep": 0,
- "policyState": "str",
- "provisioningState": "str",
- "weeklyBackupsToKeep": 0,
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backup_policies_begin_update(self, resource_group):
- response = await (
- await self.client.elastic_backup_policies.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_policy_name="str",
- body={
- "properties": {
- "dailyBackupsToKeep": 0,
- "monthlyBackupsToKeep": 0,
- "policyState": "str",
- "weeklyBackupsToKeep": 0,
- },
- "tags": {"str": "str"},
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backup_policies_begin_delete(self, resource_group):
- response = await (
- await self.client.elastic_backup_policies.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_policy_name="str",
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backup_policies_list_by_elastic_account(self, resource_group):
- response = self.client.elastic_backup_policies.list_by_elastic_account(
- resource_group_name=resource_group.name,
- account_name="str",
- )
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations.py
deleted file mode 100644
index 89de70ca5ea6..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations.py
+++ /dev/null
@@ -1,96 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticBackupVaultsOperations(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backup_vaults_get(self, resource_group):
- response = self.client.elastic_backup_vaults.get(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backup_vaults_begin_create_or_update(self, resource_group):
- response = self.client.elastic_backup_vaults.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- body={
- "location": "str",
- "eTag": "str",
- "id": "str",
- "name": "str",
- "properties": {"provisioningState": "str"},
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backup_vaults_begin_update(self, resource_group):
- response = self.client.elastic_backup_vaults.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- body={"tags": {"str": "str"}},
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backup_vaults_begin_delete(self, resource_group):
- response = self.client.elastic_backup_vaults.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backup_vaults_list_by_elastic_account(self, resource_group):
- response = self.client.elastic_backup_vaults.list_by_elastic_account(
- resource_group_name=resource_group.name,
- account_name="str",
- )
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations_async.py
deleted file mode 100644
index 432076357ee9..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations_async.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp.aio import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
-from devtools_testutils.aio import recorded_by_proxy_async
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticBackupVaultsOperationsAsync(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backup_vaults_get(self, resource_group):
- response = await self.client.elastic_backup_vaults.get(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backup_vaults_begin_create_or_update(self, resource_group):
- response = await (
- await self.client.elastic_backup_vaults.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- body={
- "location": "str",
- "eTag": "str",
- "id": "str",
- "name": "str",
- "properties": {"provisioningState": "str"},
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backup_vaults_begin_update(self, resource_group):
- response = await (
- await self.client.elastic_backup_vaults.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- body={"tags": {"str": "str"}},
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backup_vaults_begin_delete(self, resource_group):
- response = await (
- await self.client.elastic_backup_vaults.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backup_vaults_list_by_elastic_account(self, resource_group):
- response = self.client.elastic_backup_vaults.list_by_elastic_account(
- resource_group_name=resource_group.name,
- account_name="str",
- )
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations.py
deleted file mode 100644
index aca78bdf7488..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations.py
+++ /dev/null
@@ -1,139 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticBackupsOperations(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backups_get(self, resource_group):
- response = self.client.elastic_backups.get(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- backup_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backups_begin_create_or_update(self, resource_group):
- response = self.client.elastic_backups.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- backup_name="str",
- body={
- "id": "str",
- "name": "str",
- "properties": {
- "elasticVolumeResourceId": "str",
- "backupType": "str",
- "completionDate": "2020-02-20 00:00:00",
- "creationDate": "2020-02-20 00:00:00",
- "elasticBackupPolicyResourceId": "str",
- "elasticSnapshotResourceId": "str",
- "failureReason": "str",
- "label": "str",
- "provisioningState": "str",
- "size": 0,
- "snapshotCreationDate": "2020-02-20 00:00:00",
- "snapshotUsage": "str",
- "volumeSize": "str",
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "type": "str",
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backups_begin_update(self, resource_group):
- response = self.client.elastic_backups.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- backup_name="str",
- body={
- "id": "str",
- "name": "str",
- "properties": {
- "elasticVolumeResourceId": "str",
- "backupType": "str",
- "completionDate": "2020-02-20 00:00:00",
- "creationDate": "2020-02-20 00:00:00",
- "elasticBackupPolicyResourceId": "str",
- "elasticSnapshotResourceId": "str",
- "failureReason": "str",
- "label": "str",
- "provisioningState": "str",
- "size": 0,
- "snapshotCreationDate": "2020-02-20 00:00:00",
- "snapshotUsage": "str",
- "volumeSize": "str",
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "type": "str",
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backups_begin_delete(self, resource_group):
- response = self.client.elastic_backups.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- backup_name="str",
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_backups_list_by_vault(self, resource_group):
- response = self.client.elastic_backups.list_by_vault(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- )
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations_async.py
deleted file mode 100644
index 9449eb50fcc7..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations_async.py
+++ /dev/null
@@ -1,146 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp.aio import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
-from devtools_testutils.aio import recorded_by_proxy_async
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticBackupsOperationsAsync(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backups_get(self, resource_group):
- response = await self.client.elastic_backups.get(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- backup_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backups_begin_create_or_update(self, resource_group):
- response = await (
- await self.client.elastic_backups.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- backup_name="str",
- body={
- "id": "str",
- "name": "str",
- "properties": {
- "elasticVolumeResourceId": "str",
- "backupType": "str",
- "completionDate": "2020-02-20 00:00:00",
- "creationDate": "2020-02-20 00:00:00",
- "elasticBackupPolicyResourceId": "str",
- "elasticSnapshotResourceId": "str",
- "failureReason": "str",
- "label": "str",
- "provisioningState": "str",
- "size": 0,
- "snapshotCreationDate": "2020-02-20 00:00:00",
- "snapshotUsage": "str",
- "volumeSize": "str",
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "type": "str",
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backups_begin_update(self, resource_group):
- response = await (
- await self.client.elastic_backups.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- backup_name="str",
- body={
- "id": "str",
- "name": "str",
- "properties": {
- "elasticVolumeResourceId": "str",
- "backupType": "str",
- "completionDate": "2020-02-20 00:00:00",
- "creationDate": "2020-02-20 00:00:00",
- "elasticBackupPolicyResourceId": "str",
- "elasticSnapshotResourceId": "str",
- "failureReason": "str",
- "label": "str",
- "provisioningState": "str",
- "size": 0,
- "snapshotCreationDate": "2020-02-20 00:00:00",
- "snapshotUsage": "str",
- "volumeSize": "str",
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "type": "str",
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backups_begin_delete(self, resource_group):
- response = await (
- await self.client.elastic_backups.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- backup_name="str",
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_backups_list_by_vault(self, resource_group):
- response = self.client.elastic_backups.list_by_vault(
- resource_group_name=resource_group.name,
- account_name="str",
- backup_vault_name="str",
- )
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations.py
deleted file mode 100644
index e07a93fc8f9d..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations.py
+++ /dev/null
@@ -1,140 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticCapacityPoolsOperations(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_capacity_pools_get(self, resource_group):
- response = self.client.elastic_capacity_pools.get(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_capacity_pools_begin_create_or_update(self, resource_group):
- response = self.client.elastic_capacity_pools.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- body={
- "location": "str",
- "eTag": "str",
- "id": "str",
- "name": "str",
- "properties": {
- "serviceLevel": "str",
- "size": 0,
- "subnetResourceId": "str",
- "activeDirectoryConfigResourceId": "str",
- "availabilityStatus": "str",
- "currentZone": "str",
- "encryption": {"elasticPoolEncryptionKeySource": "str", "keyVaultPrivateEndpointResourceId": "str"},
- "provisioningState": "str",
- "totalThroughputMibps": 0.0,
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- "zones": ["str"],
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_capacity_pools_begin_update(self, resource_group):
- response = self.client.elastic_capacity_pools.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- body={
- "properties": {
- "activeDirectoryConfigResourceId": "str",
- "encryption": {"elasticPoolEncryptionKeySource": "str", "keyVaultPrivateEndpointResourceId": "str"},
- "size": 0,
- },
- "tags": {"str": "str"},
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_capacity_pools_begin_delete(self, resource_group):
- response = self.client.elastic_capacity_pools.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_capacity_pools_list_by_elastic_account(self, resource_group):
- response = self.client.elastic_capacity_pools.list_by_elastic_account(
- resource_group_name=resource_group.name,
- account_name="str",
- )
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_capacity_pools_begin_change_zone(self, resource_group):
- response = self.client.elastic_capacity_pools.begin_change_zone(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- body={"newZone": "str"},
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_capacity_pools_check_volume_file_path_availability(self, resource_group):
- response = self.client.elastic_capacity_pools.check_volume_file_path_availability(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- body={"filePath": "str"},
- )
-
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations_async.py
deleted file mode 100644
index 464803929ce1..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations_async.py
+++ /dev/null
@@ -1,155 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp.aio import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
-from devtools_testutils.aio import recorded_by_proxy_async
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticCapacityPoolsOperationsAsync(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_capacity_pools_get(self, resource_group):
- response = await self.client.elastic_capacity_pools.get(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_capacity_pools_begin_create_or_update(self, resource_group):
- response = await (
- await self.client.elastic_capacity_pools.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- body={
- "location": "str",
- "eTag": "str",
- "id": "str",
- "name": "str",
- "properties": {
- "serviceLevel": "str",
- "size": 0,
- "subnetResourceId": "str",
- "activeDirectoryConfigResourceId": "str",
- "availabilityStatus": "str",
- "currentZone": "str",
- "encryption": {
- "elasticPoolEncryptionKeySource": "str",
- "keyVaultPrivateEndpointResourceId": "str",
- },
- "provisioningState": "str",
- "totalThroughputMibps": 0.0,
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- "zones": ["str"],
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_capacity_pools_begin_update(self, resource_group):
- response = await (
- await self.client.elastic_capacity_pools.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- body={
- "properties": {
- "activeDirectoryConfigResourceId": "str",
- "encryption": {
- "elasticPoolEncryptionKeySource": "str",
- "keyVaultPrivateEndpointResourceId": "str",
- },
- "size": 0,
- },
- "tags": {"str": "str"},
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_capacity_pools_begin_delete(self, resource_group):
- response = await (
- await self.client.elastic_capacity_pools.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_capacity_pools_list_by_elastic_account(self, resource_group):
- response = self.client.elastic_capacity_pools.list_by_elastic_account(
- resource_group_name=resource_group.name,
- account_name="str",
- )
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_capacity_pools_begin_change_zone(self, resource_group):
- response = await (
- await self.client.elastic_capacity_pools.begin_change_zone(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- body={"newZone": "str"},
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_capacity_pools_check_volume_file_path_availability(self, resource_group):
- response = await self.client.elastic_capacity_pools.check_volume_file_path_availability(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- body={"filePath": "str"},
- )
-
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations.py
deleted file mode 100644
index 786cf72f5f52..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations.py
+++ /dev/null
@@ -1,124 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticSnapshotPoliciesOperations(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_snapshot_policies_get(self, resource_group):
- response = self.client.elastic_snapshot_policies.get(
- resource_group_name=resource_group.name,
- account_name="str",
- snapshot_policy_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_snapshot_policies_begin_create_or_update(self, resource_group):
- response = self.client.elastic_snapshot_policies.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- snapshot_policy_name="str",
- body={
- "location": "str",
- "eTag": "str",
- "id": "str",
- "name": "str",
- "properties": {
- "dailySchedule": {"hour": 0, "minute": 0, "snapshotsToKeep": 0},
- "hourlySchedule": {"minute": 0, "snapshotsToKeep": 0},
- "monthlySchedule": {"daysOfMonth": [0], "hour": 0, "minute": 0, "snapshotsToKeep": 0},
- "policyStatus": "str",
- "provisioningState": "str",
- "weeklySchedule": {"days": ["str"], "hour": 0, "minute": 0, "snapshotsToKeep": 0},
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_snapshot_policies_begin_update(self, resource_group):
- response = self.client.elastic_snapshot_policies.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- snapshot_policy_name="str",
- body={
- "properties": {
- "dailySchedule": {"hour": 0, "minute": 0, "snapshotsToKeep": 0},
- "hourlySchedule": {"minute": 0, "snapshotsToKeep": 0},
- "monthlySchedule": {"daysOfMonth": [0], "hour": 0, "minute": 0, "snapshotsToKeep": 0},
- "policyStatus": "str",
- "weeklySchedule": {"days": ["str"], "hour": 0, "minute": 0, "snapshotsToKeep": 0},
- },
- "tags": {"str": "str"},
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_snapshot_policies_begin_delete(self, resource_group):
- response = self.client.elastic_snapshot_policies.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- snapshot_policy_name="str",
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_snapshot_policies_list_by_elastic_account(self, resource_group):
- response = self.client.elastic_snapshot_policies.list_by_elastic_account(
- resource_group_name=resource_group.name,
- account_name="str",
- )
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_snapshot_policies_list_elastic_volumes(self, resource_group):
- response = self.client.elastic_snapshot_policies.list_elastic_volumes(
- resource_group_name=resource_group.name,
- account_name="str",
- snapshot_policy_name="str",
- )
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations_async.py
deleted file mode 100644
index c891e271a4be..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations_async.py
+++ /dev/null
@@ -1,131 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp.aio import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
-from devtools_testutils.aio import recorded_by_proxy_async
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticSnapshotPoliciesOperationsAsync(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_snapshot_policies_get(self, resource_group):
- response = await self.client.elastic_snapshot_policies.get(
- resource_group_name=resource_group.name,
- account_name="str",
- snapshot_policy_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_snapshot_policies_begin_create_or_update(self, resource_group):
- response = await (
- await self.client.elastic_snapshot_policies.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- snapshot_policy_name="str",
- body={
- "location": "str",
- "eTag": "str",
- "id": "str",
- "name": "str",
- "properties": {
- "dailySchedule": {"hour": 0, "minute": 0, "snapshotsToKeep": 0},
- "hourlySchedule": {"minute": 0, "snapshotsToKeep": 0},
- "monthlySchedule": {"daysOfMonth": [0], "hour": 0, "minute": 0, "snapshotsToKeep": 0},
- "policyStatus": "str",
- "provisioningState": "str",
- "weeklySchedule": {"days": ["str"], "hour": 0, "minute": 0, "snapshotsToKeep": 0},
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_snapshot_policies_begin_update(self, resource_group):
- response = await (
- await self.client.elastic_snapshot_policies.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- snapshot_policy_name="str",
- body={
- "properties": {
- "dailySchedule": {"hour": 0, "minute": 0, "snapshotsToKeep": 0},
- "hourlySchedule": {"minute": 0, "snapshotsToKeep": 0},
- "monthlySchedule": {"daysOfMonth": [0], "hour": 0, "minute": 0, "snapshotsToKeep": 0},
- "policyStatus": "str",
- "weeklySchedule": {"days": ["str"], "hour": 0, "minute": 0, "snapshotsToKeep": 0},
- },
- "tags": {"str": "str"},
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_snapshot_policies_begin_delete(self, resource_group):
- response = await (
- await self.client.elastic_snapshot_policies.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- snapshot_policy_name="str",
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_snapshot_policies_list_by_elastic_account(self, resource_group):
- response = self.client.elastic_snapshot_policies.list_by_elastic_account(
- resource_group_name=resource_group.name,
- account_name="str",
- )
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_snapshot_policies_list_elastic_volumes(self, resource_group):
- response = self.client.elastic_snapshot_policies.list_elastic_volumes(
- resource_group_name=resource_group.name,
- account_name="str",
- snapshot_policy_name="str",
- )
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations.py
deleted file mode 100644
index 9ec309a1ac18..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations.py
+++ /dev/null
@@ -1,88 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticSnapshotsOperations(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_snapshots_get(self, resource_group):
- response = self.client.elastic_snapshots.get(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- snapshot_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_snapshots_begin_create_or_update(self, resource_group):
- response = self.client.elastic_snapshots.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- snapshot_name="str",
- body={
- "id": "str",
- "name": "str",
- "properties": {"provisioningState": "str"},
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "type": "str",
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_snapshots_begin_delete(self, resource_group):
- response = self.client.elastic_snapshots.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- snapshot_name="str",
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_snapshots_list_by_elastic_volume(self, resource_group):
- response = self.client.elastic_snapshots.list_by_elastic_volume(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- )
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations_async.py
deleted file mode 100644
index b191f7f9e9c9..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations_async.py
+++ /dev/null
@@ -1,93 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp.aio import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
-from devtools_testutils.aio import recorded_by_proxy_async
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticSnapshotsOperationsAsync(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_snapshots_get(self, resource_group):
- response = await self.client.elastic_snapshots.get(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- snapshot_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_snapshots_begin_create_or_update(self, resource_group):
- response = await (
- await self.client.elastic_snapshots.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- snapshot_name="str",
- body={
- "id": "str",
- "name": "str",
- "properties": {"provisioningState": "str"},
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "type": "str",
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_snapshots_begin_delete(self, resource_group):
- response = await (
- await self.client.elastic_snapshots.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- snapshot_name="str",
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_snapshots_list_by_elastic_volume(self, resource_group):
- response = self.client.elastic_snapshots.list_by_elastic_volume(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- )
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations.py
deleted file mode 100644
index 89d83270afc8..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations.py
+++ /dev/null
@@ -1,175 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticVolumesOperations(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_volumes_get(self, resource_group):
- response = self.client.elastic_volumes.get(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_volumes_begin_create_or_update(self, resource_group):
- response = self.client.elastic_volumes.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- body={
- "location": "str",
- "eTag": "str",
- "id": "str",
- "name": "str",
- "properties": {
- "filePath": "str",
- "protocolTypes": ["str"],
- "size": 0,
- "availabilityStatus": "str",
- "backupResourceId": "str",
- "dataProtection": {
- "backup": {
- "elasticBackupPolicyResourceId": "str",
- "elasticBackupVaultResourceId": "str",
- "policyEnforcement": "str",
- },
- "snapshot": {"snapshotPolicyResourceId": "str"},
- },
- "exportPolicy": {
- "rules": [
- {
- "allowedClients": ["str"],
- "nfsv3": "str",
- "nfsv4": "str",
- "rootAccess": "str",
- "ruleIndex": 0,
- "unixAccessRule": "str",
- }
- ]
- },
- "mountTargets": [{"ipAddress": "str", "smbServerFqdn": "str"}],
- "provisioningState": "str",
- "restorationState": "str",
- "smbProperties": {"smbEncryption": "str"},
- "snapshotDirectoryVisibility": "str",
- "snapshotResourceId": "str",
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- "zones": ["str"],
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_volumes_begin_update(self, resource_group):
- response = self.client.elastic_volumes.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- body={
- "properties": {
- "dataProtection": {
- "backup": {
- "elasticBackupPolicyResourceId": "str",
- "elasticBackupVaultResourceId": "str",
- "policyEnforcement": "str",
- },
- "snapshot": {"snapshotPolicyResourceId": "str"},
- },
- "exportPolicy": {
- "rules": [
- {
- "allowedClients": ["str"],
- "nfsv3": "str",
- "nfsv4": "str",
- "rootAccess": "str",
- "ruleIndex": 0,
- "unixAccessRule": "str",
- }
- ]
- },
- "size": 0,
- "smbProperties": {"smbEncryption": "str"},
- "snapshotDirectoryVisibility": "str",
- },
- "tags": {"str": "str"},
- },
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_volumes_begin_delete(self, resource_group):
- response = self.client.elastic_volumes.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_volumes_list_by_elastic_pool(self, resource_group):
- response = self.client.elastic_volumes.list_by_elastic_pool(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- )
- result = [r for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy
- def test_elastic_volumes_begin_revert(self, resource_group):
- response = self.client.elastic_volumes.begin_revert(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- body={"snapshotResourceId": "str"},
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations_async.py
deleted file mode 100644
index 0e7a23ba2dde..000000000000
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations_async.py
+++ /dev/null
@@ -1,184 +0,0 @@
-# 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) Python Code Generator.
-# Changes may cause incorrect behavior and will be lost if the code is regenerated.
-# --------------------------------------------------------------------------
-import pytest
-from azure.mgmt.netapp.aio import NetAppManagementClient
-
-from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
-from devtools_testutils.aio import recorded_by_proxy_async
-
-AZURE_LOCATION = "eastus"
-
-
-@pytest.mark.skip("you may need to update the auto-generated test case before run it")
-class TestNetAppManagementElasticVolumesOperationsAsync(AzureMgmtRecordedTestCase):
- def setup_method(self, method):
- self.client = self.create_mgmt_client(NetAppManagementClient, is_async=True)
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_volumes_get(self, resource_group):
- response = await self.client.elastic_volumes.get(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- )
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_volumes_begin_create_or_update(self, resource_group):
- response = await (
- await self.client.elastic_volumes.begin_create_or_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- body={
- "location": "str",
- "eTag": "str",
- "id": "str",
- "name": "str",
- "properties": {
- "filePath": "str",
- "protocolTypes": ["str"],
- "size": 0,
- "availabilityStatus": "str",
- "backupResourceId": "str",
- "dataProtection": {
- "backup": {
- "elasticBackupPolicyResourceId": "str",
- "elasticBackupVaultResourceId": "str",
- "policyEnforcement": "str",
- },
- "snapshot": {"snapshotPolicyResourceId": "str"},
- },
- "exportPolicy": {
- "rules": [
- {
- "allowedClients": ["str"],
- "nfsv3": "str",
- "nfsv4": "str",
- "rootAccess": "str",
- "ruleIndex": 0,
- "unixAccessRule": "str",
- }
- ]
- },
- "mountTargets": [{"ipAddress": "str", "smbServerFqdn": "str"}],
- "provisioningState": "str",
- "restorationState": "str",
- "smbProperties": {"smbEncryption": "str"},
- "snapshotDirectoryVisibility": "str",
- "snapshotResourceId": "str",
- },
- "systemData": {
- "createdAt": "2020-02-20 00:00:00",
- "createdBy": "str",
- "createdByType": "str",
- "lastModifiedAt": "2020-02-20 00:00:00",
- "lastModifiedBy": "str",
- "lastModifiedByType": "str",
- },
- "tags": {"str": "str"},
- "type": "str",
- "zones": ["str"],
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_volumes_begin_update(self, resource_group):
- response = await (
- await self.client.elastic_volumes.begin_update(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- body={
- "properties": {
- "dataProtection": {
- "backup": {
- "elasticBackupPolicyResourceId": "str",
- "elasticBackupVaultResourceId": "str",
- "policyEnforcement": "str",
- },
- "snapshot": {"snapshotPolicyResourceId": "str"},
- },
- "exportPolicy": {
- "rules": [
- {
- "allowedClients": ["str"],
- "nfsv3": "str",
- "nfsv4": "str",
- "rootAccess": "str",
- "ruleIndex": 0,
- "unixAccessRule": "str",
- }
- ]
- },
- "size": 0,
- "smbProperties": {"smbEncryption": "str"},
- "snapshotDirectoryVisibility": "str",
- },
- "tags": {"str": "str"},
- },
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_volumes_begin_delete(self, resource_group):
- response = await (
- await self.client.elastic_volumes.begin_delete(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_volumes_list_by_elastic_pool(self, resource_group):
- response = self.client.elastic_volumes.list_by_elastic_pool(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- )
- result = [r async for r in response]
- # please add some check logic here by yourself
- # ...
-
- @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
- @recorded_by_proxy_async
- async def test_elastic_volumes_begin_revert(self, resource_group):
- response = await (
- await self.client.elastic_volumes.begin_revert(
- resource_group_name=resource_group.name,
- account_name="str",
- pool_name="str",
- volume_name="str",
- body={"snapshotResourceId": "str"},
- )
- ).result() # call '.result()' to poll until service return final result
-
- # please add some check logic here by yourself
- # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py
index fa7b11b561e5..035e582424a6 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py
@@ -61,7 +61,6 @@ def test_volume_groups_begin_create(self, resource_group):
"avsDataStore": "str",
"backupId": "str",
"baremetalTenantId": "str",
- "breakthroughMode": "str",
"capacityPoolResourceId": "str",
"cloneProgress": 0,
"coolAccess": bool,
@@ -84,10 +83,6 @@ def test_volume_groups_begin_create(self, resource_group):
}
],
"endpointType": "str",
- "externalReplicationSetupInfo": "str",
- "externalReplicationSetupStatus": "str",
- "mirrorState": "str",
- "relationshipStatus": "str",
"remotePath": {
"externalHostName": "str",
"serverName": "str",
@@ -138,10 +133,7 @@ def test_volume_groups_begin_create(self, resource_group):
"isRestoring": bool,
"kerberosEnabled": bool,
"keyVaultPrivateEndpointResourceId": "str",
- "language": "str",
- "largeVolumeType": "str",
"ldapEnabled": bool,
- "ldapServerType": "str",
"maximumNumberOfFiles": 0,
"mountTargets": [
{
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py
index e9c6c1e9013e..3393573c90e4 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py
@@ -63,7 +63,6 @@ async def test_volume_groups_begin_create(self, resource_group):
"avsDataStore": "str",
"backupId": "str",
"baremetalTenantId": "str",
- "breakthroughMode": "str",
"capacityPoolResourceId": "str",
"cloneProgress": 0,
"coolAccess": bool,
@@ -90,10 +89,6 @@ async def test_volume_groups_begin_create(self, resource_group):
}
],
"endpointType": "str",
- "externalReplicationSetupInfo": "str",
- "externalReplicationSetupStatus": "str",
- "mirrorState": "str",
- "relationshipStatus": "str",
"remotePath": {
"externalHostName": "str",
"serverName": "str",
@@ -144,10 +139,7 @@ async def test_volume_groups_begin_create(self, resource_group):
"isRestoring": bool,
"kerberosEnabled": bool,
"keyVaultPrivateEndpointResourceId": "str",
- "language": "str",
- "largeVolumeType": "str",
"ldapEnabled": bool,
- "ldapServerType": "str",
"maximumNumberOfFiles": 0,
"mountTargets": [
{
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py
index c246e210b195..b7795f93499a 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py
@@ -50,7 +50,6 @@ def test_volumes_begin_create_or_update(self, resource_group):
"avsDataStore": "str",
"backupId": "str",
"baremetalTenantId": "str",
- "breakthroughMode": "str",
"capacityPoolResourceId": "str",
"cloneProgress": 0,
"coolAccess": bool,
@@ -68,10 +67,6 @@ def test_volumes_begin_create_or_update(self, resource_group):
{"region": "str", "replicationType": "str", "resourceId": "str", "zone": "str"}
],
"endpointType": "str",
- "externalReplicationSetupInfo": "str",
- "externalReplicationSetupStatus": "str",
- "mirrorState": "str",
- "relationshipStatus": "str",
"remotePath": {"externalHostName": "str", "serverName": "str", "volumeName": "str"},
"remoteVolumeRegion": "str",
"remoteVolumeResourceId": "str",
@@ -118,10 +113,7 @@ def test_volumes_begin_create_or_update(self, resource_group):
"isRestoring": bool,
"kerberosEnabled": bool,
"keyVaultPrivateEndpointResourceId": "str",
- "language": "str",
- "largeVolumeType": "str",
"ldapEnabled": bool,
- "ldapServerType": "str",
"maximumNumberOfFiles": 0,
"mountTargets": [
{"fileSystemId": "str", "ipAddress": "str", "mountTargetId": "str", "smbServerFqdn": "str"}
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py
index 4ff5a7f6cc0a..9a92a4a97faa 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py
@@ -52,7 +52,6 @@ async def test_volumes_begin_create_or_update(self, resource_group):
"avsDataStore": "str",
"backupId": "str",
"baremetalTenantId": "str",
- "breakthroughMode": "str",
"capacityPoolResourceId": "str",
"cloneProgress": 0,
"coolAccess": bool,
@@ -70,10 +69,6 @@ async def test_volumes_begin_create_or_update(self, resource_group):
{"region": "str", "replicationType": "str", "resourceId": "str", "zone": "str"}
],
"endpointType": "str",
- "externalReplicationSetupInfo": "str",
- "externalReplicationSetupStatus": "str",
- "mirrorState": "str",
- "relationshipStatus": "str",
"remotePath": {"externalHostName": "str", "serverName": "str", "volumeName": "str"},
"remoteVolumeRegion": "str",
"remoteVolumeResourceId": "str",
@@ -120,10 +115,7 @@ async def test_volumes_begin_create_or_update(self, resource_group):
"isRestoring": bool,
"kerberosEnabled": bool,
"keyVaultPrivateEndpointResourceId": "str",
- "language": "str",
- "largeVolumeType": "str",
"ldapEnabled": bool,
- "ldapServerType": "str",
"maximumNumberOfFiles": 0,
"mountTargets": [
{"fileSystemId": "str", "ipAddress": "str", "mountTargetId": "str", "smbServerFqdn": "str"}
diff --git a/sdk/netapp/azure-mgmt-netapp/pyproject.toml b/sdk/netapp/azure-mgmt-netapp/pyproject.toml
index 2e9e64e7e52a..99f21c0f46cb 100644
--- a/sdk/netapp/azure-mgmt-netapp/pyproject.toml
+++ b/sdk/netapp/azure-mgmt-netapp/pyproject.toml
@@ -13,7 +13,7 @@ authors = [
description = "Microsoft Azure Netapp Management Client Library for Python"
license = "MIT"
classifiers = [
- "Development Status :: 4 - Beta",
+ "Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
@@ -78,7 +78,7 @@ verifytypes = false
package_name = "azure-mgmt-netapp"
package_pprint_name = "NetApp Files Management"
package_doc_id = ""
-is_stable = false
+is_stable = true
is_arm = true
title = "NetAppManagementClient"
package_nspkg = "azure-mgmt-nspkg"
diff --git a/sdk/netapp/azure-mgmt-netapp/tsp-location.yaml b/sdk/netapp/azure-mgmt-netapp/tsp-location.yaml
index 3e55ae304604..bff6de48dffd 100644
--- a/sdk/netapp/azure-mgmt-netapp/tsp-location.yaml
+++ b/sdk/netapp/azure-mgmt-netapp/tsp-location.yaml
@@ -1,4 +1,4 @@
directory: specification/netapp/resource-manager/Microsoft.NetApp/NetApp
-commit: fa4de8af2faa4a809027619c6ec8ed45b1e0a761
+commit: 52b0e717060c167a12d21cb96932bec72bc5cd0c
repo: Azure/azure-rest-api-specs
additionalDirectories: