diff --git a/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md b/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md
index 8151b49bb9f6..b16c31cb90d3 100644
--- a/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md
+++ b/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md
@@ -1,5 +1,169 @@
# Release History
+## 14.1.0b1 (2025-11-19)
+
+### Features Added
+
+ - Client `NetAppManagementClient` added operation group `ransomware_reports`
+ - Client `NetAppManagementClient` added operation group `buckets`
+ - Client `NetAppManagementClient` added operation group `caches`
+ - Client `NetAppManagementClient` added operation group `elastic_accounts`
+ - Client `NetAppManagementClient` added operation group `elastic_capacity_pools`
+ - Client `NetAppManagementClient` added operation group `elastic_volumes`
+ - Client `NetAppManagementClient` added operation group `elastic_snapshots`
+ - Client `NetAppManagementClient` added operation group `elastic_snapshot_policies`
+ - Client `NetAppManagementClient` added operation group `elastic_backup_vaults`
+ - Client `NetAppManagementClient` added operation group `elastic_backup_policies`
+ - Client `NetAppManagementClient` added operation group `elastic_backups`
+ - Client `NetAppManagementClient` added operation group `active_directory_configs`
+ - Model `AccountProperties` added property `ldap_configuration`
+ - Model `ReplicationObject` added property `external_replication_setup_status`
+ - Model `ReplicationObject` added property `external_replication_setup_info`
+ - Model `ReplicationObject` added property `mirror_state`
+ - Model `ReplicationObject` added property `relationship_status`
+ - Model `VolumePatchPropertiesDataProtection` added property `ransomware_protection`
+ - Model `VolumeProperties` added property `ldap_server_type`
+ - Model `VolumeProperties` added property `large_volume_type`
+ - Model `VolumeProperties` added property `language`
+ - Model `VolumeProperties` added property `breakthrough_mode`
+ - Model `VolumePropertiesDataProtection` added property `ransomware_protection`
+ - Added model `ActiveDirectoryConfig`
+ - Added model `ActiveDirectoryConfigProperties`
+ - Added model `ActiveDirectoryConfigUpdate`
+ - Added model `ActiveDirectoryConfigUpdateProperties`
+ - Added enum `ActualRansomwareProtectionState`
+ - Added enum `BreakthroughMode`
+ - Added model `Bucket`
+ - Added model `BucketCredentialsExpiry`
+ - Added model `BucketGenerateCredentials`
+ - Added model `BucketPatch`
+ - Added enum `BucketPatchPermissions`
+ - Added model `BucketPatchProperties`
+ - Added enum `BucketPermissions`
+ - Added model `BucketProperties`
+ - Added model `BucketServerPatchProperties`
+ - Added model `BucketServerProperties`
+ - Added model `Cache`
+ - Added enum `CacheLifeCycleState`
+ - Added model `CacheMountTargetProperties`
+ - Added model `CacheProperties`
+ - Added enum `CacheProvisioningState`
+ - Added model `CacheUpdate`
+ - Added model `CacheUpdateProperties`
+ - Added model `ChangeZoneRequest`
+ - Added enum `CheckElasticResourceAvailabilityReason`
+ - Added model `CheckElasticResourceAvailabilityResponse`
+ - Added enum `CheckElasticResourceAvailabilityStatus`
+ - Added model `CheckElasticVolumeFilePathAvailabilityRequest`
+ - Added enum `CifsChangeNotifyState`
+ - Added model `CifsUser`
+ - Added enum `CredentialsStatus`
+ - Added enum `DayOfWeek`
+ - Added enum `DesiredRansomwareProtectionState`
+ - Added model `ElasticAccount`
+ - Added model `ElasticAccountProperties`
+ - Added model `ElasticAccountUpdate`
+ - Added model `ElasticAccountUpdateProperties`
+ - Added model `ElasticBackup`
+ - Added model `ElasticBackupPolicy`
+ - Added model `ElasticBackupPolicyProperties`
+ - Added enum `ElasticBackupPolicyState`
+ - Added model `ElasticBackupProperties`
+ - Added enum `ElasticBackupType`
+ - Added model `ElasticBackupVault`
+ - Added model `ElasticBackupVaultProperties`
+ - Added model `ElasticCapacityPool`
+ - Added model `ElasticCapacityPoolProperties`
+ - Added model `ElasticCapacityPoolUpdate`
+ - Added model `ElasticCapacityPoolUpdateProperties`
+ - Added model `ElasticEncryption`
+ - Added model `ElasticEncryptionConfiguration`
+ - Added model `ElasticEncryptionIdentity`
+ - Added model `ElasticExportPolicy`
+ - Added model `ElasticExportPolicyRule`
+ - Added model `ElasticKeyVaultProperties`
+ - Added enum `ElasticKeyVaultStatus`
+ - Added model `ElasticMountTargetProperties`
+ - Added enum `ElasticNfsv3Access`
+ - Added enum `ElasticNfsv4Access`
+ - Added enum `ElasticPoolEncryptionKeySource`
+ - Added enum `ElasticProtocolType`
+ - Added enum `ElasticResourceAvailabilityStatus`
+ - Added enum `ElasticRootAccess`
+ - Added enum `ElasticServiceLevel`
+ - Added enum `ElasticSmbEncryption`
+ - Added model `ElasticSmbPatchProperties`
+ - Added model `ElasticSmbProperties`
+ - Added model `ElasticSnapshot`
+ - Added model `ElasticSnapshotPolicy`
+ - Added model `ElasticSnapshotPolicyDailySchedule`
+ - Added model `ElasticSnapshotPolicyHourlySchedule`
+ - Added model `ElasticSnapshotPolicyMonthlySchedule`
+ - Added model `ElasticSnapshotPolicyProperties`
+ - Added model `ElasticSnapshotPolicyWeeklySchedule`
+ - Added model `ElasticSnapshotProperties`
+ - Added enum `ElasticUnixAccessRule`
+ - Added model `ElasticVolume`
+ - Added model `ElasticVolumeBackupProperties`
+ - Added model `ElasticVolumeDataProtectionPatchProperties`
+ - Added model `ElasticVolumeDataProtectionProperties`
+ - Added enum `ElasticVolumePolicyEnforcement`
+ - Added model `ElasticVolumeProperties`
+ - Added enum `ElasticVolumeRestorationState`
+ - Added model `ElasticVolumeRevert`
+ - Added model `ElasticVolumeSnapshotProperties`
+ - Added model `ElasticVolumeUpdate`
+ - Added model `ElasticVolumeUpdateProperties`
+ - Added enum `EnableWriteBackState`
+ - Added enum `EncryptionState`
+ - Added enum `ExternalReplicationSetupStatus`
+ - Added model `FileSystemUser`
+ - Added enum `GlobalFileLockingState`
+ - Added enum `KerberosState`
+ - Added enum `LargeVolumeType`
+ - Added model `LdapConfiguration`
+ - Added enum `LdapServerType`
+ - Added enum `LdapState`
+ - Added model `ListQuotaReportResponse`
+ - Added model `NfsUser`
+ - Added model `OriginClusterInformation`
+ - Added model `PeeringPassphrases`
+ - Added enum `PolicyStatus`
+ - Added enum `ProtocolTypes`
+ - Added model `QuotaReport`
+ - 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 `SecretPassword`
+ - Added model `SecretPasswordIdentity`
+ - Added model `SecretPasswordKeyVaultProperties`
+ - Added enum `SmbEncryptionState`
+ - Added model `SmbSettings`
+ - Added enum `SnapshotDirectoryVisibility`
+ - Added enum `SnapshotUsage`
+ - Added model `SuspectFile`
+ - Added enum `VolumeLanguage`
+ - Added enum `VolumeSize`
+ - Model `VolumesOperations` added method `begin_list_quota_report`
+ - Added model `ActiveDirectoryConfigsOperations`
+ - Added model `BucketsOperations`
+ - Added model `CachesOperations`
+ - Added model `ElasticAccountsOperations`
+ - Added model `ElasticBackupPoliciesOperations`
+ - Added model `ElasticBackupVaultsOperations`
+ - Added model `ElasticBackupsOperations`
+ - Added model `ElasticCapacityPoolsOperations`
+ - Added model `ElasticSnapshotPoliciesOperations`
+ - Added model `ElasticSnapshotsOperations`
+ - Added model `ElasticVolumesOperations`
+ - Added model `RansomwareReportsOperations`
+
## 14.0.1 (2025-11-17)
### Bugs Fixed
diff --git a/sdk/netapp/azure-mgmt-netapp/_metadata.json b/sdk/netapp/azure-mgmt-netapp/_metadata.json
index 839adc7cacec..66e4e5bba431 100644
--- a/sdk/netapp/azure-mgmt-netapp/_metadata.json
+++ b/sdk/netapp/azure-mgmt-netapp/_metadata.json
@@ -1,6 +1,6 @@
{
- "apiVersion": "2025-09-01",
- "commit": "9cd47a976054f57864cf7cc7dd33941eaa977951",
+ "apiVersion": "2025-09-01-preview",
+ "commit": "44a12ed5a9045bb04ad3759bd96c32fe970a935c",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/netapp/resource-manager/Microsoft.NetApp/NetApp",
"emitterVersion": "0.53.2"
diff --git a/sdk/netapp/azure-mgmt-netapp/apiview-properties.json b/sdk/netapp/azure-mgmt-netapp/apiview-properties.json
index b02dbf99ceeb..2ec41837f82e 100644
--- a/sdk/netapp/azure-mgmt-netapp/apiview-properties.json
+++ b/sdk/netapp/azure-mgmt-netapp/apiview-properties.json
@@ -4,13 +4,17 @@
"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.AuthorizeRequest": "Microsoft.NetApp.AuthorizeRequest",
"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.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",
@@ -23,14 +27,71 @@
"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.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.ElasticBackupProperties": "Microsoft.NetApp.ElasticBackupProperties",
+ "azure.mgmt.netapp.models.ElasticBackupVault": "Microsoft.NetApp.ElasticBackupVault",
+ "azure.mgmt.netapp.models.ElasticBackupVaultProperties": "Microsoft.NetApp.ElasticBackupVaultProperties",
+ "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.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",
@@ -38,6 +99,7 @@
"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",
@@ -45,7 +107,9 @@
"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",
"azure.mgmt.netapp.models.LogSpecification": "Microsoft.NetApp.LogSpecification",
"azure.mgmt.netapp.models.ManagedServiceIdentity": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity",
@@ -55,11 +119,14 @@
"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",
@@ -68,6 +135,13 @@
"azure.mgmt.netapp.models.QuotaAvailabilityRequest": "Microsoft.NetApp.QuotaAvailabilityRequest",
"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.RansomwareProtectionPatchSettings": "Microsoft.NetApp.RansomwareProtectionPatchSettings",
+ "azure.mgmt.netapp.models.RansomwareProtectionSettings": "Microsoft.NetApp.RansomwareProtectionSettings",
+ "azure.mgmt.netapp.models.RansomwareReport": "Microsoft.NetApp.RansomwareReport",
+ "azure.mgmt.netapp.models.RansomwareReportProperties": "Microsoft.NetApp.RansomwareReportProperties",
+ "azure.mgmt.netapp.models.RansomwareSuspects": "Microsoft.NetApp.RansomwareSuspects",
+ "azure.mgmt.netapp.models.RansomwareSuspectsClearRequest": "Microsoft.NetApp.RansomwareSuspectsClearRequest",
"azure.mgmt.netapp.models.ReestablishReplicationRequest": "Microsoft.NetApp.ReestablishReplicationRequest",
"azure.mgmt.netapp.models.RegionInfo": "Microsoft.NetApp.RegionInfo",
"azure.mgmt.netapp.models.RegionInfoAvailabilityZoneMappingsItem": "Microsoft.NetApp.RegionInfoAvailabilityZoneMappingsItem",
@@ -79,7 +153,11 @@
"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",
@@ -94,6 +172,7 @@
"azure.mgmt.netapp.models.SubvolumePatchParams": "Microsoft.NetApp.SubvolumePatchParams",
"azure.mgmt.netapp.models.SubvolumePatchRequest": "Microsoft.NetApp.SubvolumePatchRequest",
"azure.mgmt.netapp.models.SubvolumeProperties": "Microsoft.NetApp.SubvolumeProperties",
+ "azure.mgmt.netapp.models.SuspectFile": "Microsoft.NetApp.SuspectFile",
"azure.mgmt.netapp.models.SvmPeerCommandResponse": "Microsoft.NetApp.SvmPeerCommandResponse",
"azure.mgmt.netapp.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
"azure.mgmt.netapp.models.UpdateNetworkSiblingSetRequest": "Microsoft.NetApp.UpdateNetworkSiblingSetRequest",
@@ -134,31 +213,75 @@
"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",
"azure.mgmt.netapp.models.SecurityStyle": "Microsoft.NetApp.SecurityStyle",
"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.NetAppProvisioningState": "Microsoft.NetApp.NetAppProvisioningState",
"azure.mgmt.netapp.models.Type": "Microsoft.NetApp.Type",
- "azure.mgmt.netapp.models.RegionStorageToNetworkProximity": "Microsoft.NetApp.RegionStorageToNetworkProximity",
- "azure.mgmt.netapp.models.ActiveDirectoryStatus": "Microsoft.NetApp.ActiveDirectoryStatus",
+ "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.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",
@@ -247,6 +370,8 @@
"azure.mgmt.netapp.aio.operations.VolumesOperations.begin_finalize_relocation": "Microsoft.NetApp.Volumes.finalizeRelocation",
"azure.mgmt.netapp.operations.VolumesOperations.begin_revert_relocation": "Microsoft.NetApp.Volumes.revertRelocation",
"azure.mgmt.netapp.aio.operations.VolumesOperations.begin_revert_relocation": "Microsoft.NetApp.Volumes.revertRelocation",
+ "azure.mgmt.netapp.operations.VolumesOperations.begin_list_quota_report": "Microsoft.NetApp.Volumes.listQuotaReport",
+ "azure.mgmt.netapp.aio.operations.VolumesOperations.begin_list_quota_report": "Microsoft.NetApp.Volumes.listQuotaReport",
"azure.mgmt.netapp.operations.SnapshotsOperations.get": "Microsoft.NetApp.Snapshots.get",
"azure.mgmt.netapp.aio.operations.SnapshotsOperations.get": "Microsoft.NetApp.Snapshots.get",
"azure.mgmt.netapp.operations.SnapshotsOperations.begin_create": "Microsoft.NetApp.Snapshots.create",
@@ -291,6 +416,12 @@
"azure.mgmt.netapp.aio.operations.VolumeQuotaRulesOperations.begin_delete": "Microsoft.NetApp.VolumeQuotaRules.delete",
"azure.mgmt.netapp.operations.VolumeQuotaRulesOperations.list_by_volume": "Microsoft.NetApp.VolumeQuotaRules.listByVolume",
"azure.mgmt.netapp.aio.operations.VolumeQuotaRulesOperations.list_by_volume": "Microsoft.NetApp.VolumeQuotaRules.listByVolume",
+ "azure.mgmt.netapp.operations.RansomwareReportsOperations.get": "Microsoft.NetApp.RansomwareReports.get",
+ "azure.mgmt.netapp.aio.operations.RansomwareReportsOperations.get": "Microsoft.NetApp.RansomwareReports.get",
+ "azure.mgmt.netapp.operations.RansomwareReportsOperations.list": "Microsoft.NetApp.RansomwareReports.list",
+ "azure.mgmt.netapp.aio.operations.RansomwareReportsOperations.list": "Microsoft.NetApp.RansomwareReports.list",
+ "azure.mgmt.netapp.operations.RansomwareReportsOperations.begin_clear_suspects": "Microsoft.NetApp.RansomwareReports.clearSuspects",
+ "azure.mgmt.netapp.aio.operations.RansomwareReportsOperations.begin_clear_suspects": "Microsoft.NetApp.RansomwareReports.clearSuspects",
"azure.mgmt.netapp.operations.BackupVaultsOperations.get": "Microsoft.NetApp.BackupVaults.get",
"azure.mgmt.netapp.aio.operations.BackupVaultsOperations.get": "Microsoft.NetApp.BackupVaults.get",
"azure.mgmt.netapp.operations.BackupVaultsOperations.begin_create_or_update": "Microsoft.NetApp.BackupVaults.createOrUpdate",
@@ -301,6 +432,132 @@
"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/assets.json b/sdk/netapp/azure-mgmt-netapp/assets.json
index 577b1e7c9818..e745f4635afd 100644
--- a/sdk/netapp/azure-mgmt-netapp/assets.json
+++ b/sdk/netapp/azure-mgmt-netapp/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/netapp/azure-mgmt-netapp",
- "Tag": "python/netapp/azure-mgmt-netapp_95a1872e86"
+ "Tag": "python/netapp/azure-mgmt-netapp_511660652d"
}
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 9bab1e4f1bfa..9c7b593989cf 100644
--- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_client.py
+++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_client.py
@@ -21,12 +21,23 @@
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,
@@ -34,6 +45,7 @@
NetAppResourceUsagesOperations,
Operations,
PoolsOperations,
+ RansomwareReportsOperations,
SnapshotPoliciesOperations,
SnapshotsOperations,
SubvolumesOperations,
@@ -70,8 +82,34 @@ class NetAppManagementClient: # pylint: disable=too-many-instance-attributes
:vartype backup_policies: azure.mgmt.netapp.operations.BackupPoliciesOperations
:ivar volume_quota_rules: VolumeQuotaRulesOperations operations
:vartype volume_quota_rules: azure.mgmt.netapp.operations.VolumeQuotaRulesOperations
+ :ivar ransomware_reports: RansomwareReportsOperations operations
+ :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
@@ -104,8 +142,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".
- Note that overriding this default value may result in unsupported behavior.
+ :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.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
@@ -173,7 +212,35 @@ def __init__(
self.volume_quota_rules = VolumeQuotaRulesOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.ransomware_reports = RansomwareReportsOperations(
+ 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 527df54759d7..f75137c501cc 100644
--- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py
+++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py
@@ -33,8 +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".
- Note that overriding this default value may result in unsupported behavior.
+ :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.
:paramtype api_version: str
"""
@@ -46,7 +47,7 @@ def __init__(
cloud_setting: Optional["AzureClouds"] = None,
**kwargs: Any
) -> None:
- api_version: str = kwargs.pop("api_version", "2025-09-01")
+ api_version: str = kwargs.pop("api_version", "2025-09-01-preview")
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
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 2b32414d408d..26c472edd480 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.0.1"
+VERSION = "14.1.0b1"
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 e7e2f59ac5fc..843da9f373bd 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,12 +21,23 @@
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,
@@ -34,6 +45,7 @@
NetAppResourceUsagesOperations,
Operations,
PoolsOperations,
+ RansomwareReportsOperations,
SnapshotPoliciesOperations,
SnapshotsOperations,
SubvolumesOperations,
@@ -70,8 +82,36 @@ class NetAppManagementClient: # pylint: disable=too-many-instance-attributes
:vartype backup_policies: azure.mgmt.netapp.aio.operations.BackupPoliciesOperations
:ivar volume_quota_rules: VolumeQuotaRulesOperations operations
:vartype volume_quota_rules: azure.mgmt.netapp.aio.operations.VolumeQuotaRulesOperations
+ :ivar ransomware_reports: RansomwareReportsOperations operations
+ :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
@@ -105,8 +145,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".
- Note that overriding this default value may result in unsupported behavior.
+ :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.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
@@ -176,7 +217,35 @@ def __init__(
self.volume_quota_rules = VolumeQuotaRulesOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.ransomware_reports = RansomwareReportsOperations(
+ 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 1b93f84c8c53..7ebe73e9eada 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,8 +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".
- Note that overriding this default value may result in unsupported behavior.
+ :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.
:paramtype api_version: str
"""
@@ -46,7 +47,7 @@ def __init__(
cloud_setting: Optional["AzureClouds"] = None,
**kwargs: Any
) -> None:
- api_version: str = kwargs.pop("api_version", "2025-09-01")
+ api_version: str = kwargs.pop("api_version", "2025-09-01-preview")
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 35c12577bc79..dc8916780c55 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
@@ -21,7 +21,19 @@
from ._operations import SnapshotPoliciesOperations # type: ignore
from ._operations import BackupPoliciesOperations # type: ignore
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
@@ -47,7 +59,19 @@
"SnapshotPoliciesOperations",
"BackupPoliciesOperations",
"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 fec71b46c31f..6ad34a5e4964 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,6 +48,12 @@
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,
@@ -68,6 +74,63 @@
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,
@@ -88,6 +151,9 @@
build_pools_get_request,
build_pools_list_request,
build_pools_update_request,
+ build_ransomware_reports_clear_suspects_request,
+ build_ransomware_reports_get_request,
+ build_ransomware_reports_list_request,
build_snapshot_policies_create_request,
build_snapshot_policies_delete_request,
build_snapshot_policies_get_request,
@@ -126,6 +192,7 @@
build_volumes_finalize_relocation_request,
build_volumes_get_request,
build_volumes_list_get_group_id_list_for_ldap_user_request,
+ build_volumes_list_quota_report_request,
build_volumes_list_replications_request,
build_volumes_list_request,
build_volumes_peer_external_cluster_request,
@@ -285,7 +352,13 @@ def __init__(self, *args, **kwargs) -> None:
"accept",
]
},
- api_versions_list=["2025-07-01-preview", "2025-08-01", "2025-08-01-preview", "2025-09-01"],
+ api_versions_list=[
+ "2025-07-01-preview",
+ "2025-08-01",
+ "2025-08-01-preview",
+ "2025-09-01",
+ "2025-09-01-preview",
+ ],
)
async def get(
self, resource_group_name: str, account_name: str, quota_limit_name: str, **kwargs: Any
@@ -366,7 +439,13 @@ async def get(
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"],
+ 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) -> AsyncItemPaged["_models.QuotaItem"]:
"""Gets a list of quota limits for all quotas that are under account. Currently PoolsPerAccount is
@@ -3844,7 +3923,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"],
+ api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
)
async def _list_get_group_id_list_for_ldap_user_initial( # pylint: disable=name-too-long
self,
@@ -4047,7 +4126,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"],
+ api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
)
async def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
self,
@@ -4846,7 +4925,7 @@ def list_replications(
"accept",
]
},
- api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01"],
+ api_versions_list=["2025-08-01", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
)
def list_replications(
self,
@@ -7038,6 +7117,179 @@ 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",
+ 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"],
+ )
+ async def _list_quota_report_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_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 = 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
+
+ @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",
+ "accept",
+ ]
+ },
+ api_versions_list=["2025-07-01-preview", "2025-08-01-preview", "2025-09-01", "2025-09-01-preview"],
+ )
+ async def begin_list_quota_report(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> AsyncLROPoller[_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 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 {}
+ _params = kwargs.pop("params", {}) or {}
+
+ 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)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await 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
+ )
+ 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["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: 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.ListQuotaReportResponse].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.ListQuotaReportResponse](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
class SnapshotsOperations:
"""
@@ -10752,14 +11004,14 @@ async def get_next(next_link=None):
return AsyncItemPaged(get_next, extract_data)
-class BackupVaultsOperations:
+class RansomwareReportsOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s
- :attr:`backup_vaults` attribute.
+ :attr:`ransomware_reports` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -10770,20 +11022,51 @@ def __init__(self, *args, **kwargs) -> None:
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",
+ "ransomware_report_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.BackupVault:
- """Get the 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 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
+ :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 = {
@@ -10797,12 +11080,14 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None)
+ cls: ClsType[_models.RansomwareReport] = kwargs.pop("cls", None)
- _request = build_backup_vaults_get_request(
+ _request = build_ransomware_reports_get_request(
resource_group_name=resource_group_name,
account_name=account_name,
- backup_vault_name=backup_vault_name,
+ pool_name=pool_name,
+ volume_name=volume_name,
+ ransomware_report_name=ransomware_report_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -10836,21 +11121,58 @@ async def get(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.BackupVault, response.json())
+ deserialized = _deserialize(_models.RansomwareReport, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
- async def _create_or_update_initial(
- self,
- resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: Union[_models.BackupVault, JSON, IO[bytes]],
- **kwargs: Any
- ) -> AsyncIterator[bytes]:
+ @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(
+ 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".
+
+ :param resource_group_name: 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.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.RansomwareReport]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[List[_models.RansomwareReport]] = kwargs.pop("cls", None)
+
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
@@ -10859,23 +11181,12138 @@ async def _create_or_update_initial(
}
error_map.update(kwargs.pop("error_map", {}) or {})
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
+ def prepare_request(next_link=None):
+ if not next_link:
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+ _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)
- content_type = content_type or "application/json"
+ 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.RansomwareReport], 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",
+ "ransomware_report_name",
+ "content_type",
+ ]
+ },
+ api_versions_list=["2025-09-01-preview"],
+ )
+ async def _clear_suspects_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]],
+ **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_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,
+ 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 [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 = {}
+ 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_clear_suspects(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ ransomware_report_name: str,
+ body: _models.RansomwareSuspectsClearRequest,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[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 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
+ :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_clear_suspects(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ ransomware_report_name: str,
+ body: JSON,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[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 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: 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_clear_suspects(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ ransomware_report_name: str,
+ body: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[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 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 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",
+ "volume_name",
+ "ransomware_report_name",
+ "content_type",
+ ]
+ },
+ api_versions_list=["2025-09-01-preview"],
+ )
+ async 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
+ ) -> AsyncLROPoller[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 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]
+ :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._clear_suspects_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,
+ 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 BackupVaultsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.netapp.aio.NetAppManagementClient`'s
+ :attr:`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
+ async def get(
+ 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 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 = {
+ 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.BackupVault] = kwargs.pop("cls", None)
+
+ _request = build_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.BackupVault, response.json())
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ async def _create_or_update_initial(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ backup_vault_name: str,
+ body: Union[_models.BackupVault, 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_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.BackupVault,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_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 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 AsyncLROPoller that returns BackupVault. The BackupVault is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :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.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 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 AsyncLROPoller that returns BackupVault. The BackupVault is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :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.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 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 AsyncLROPoller that returns BackupVault. The BackupVault is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ backup_vault_name: str,
+ body: Union[_models.BackupVault, JSON, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncLROPoller[_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 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 AsyncLROPoller that returns BackupVault. The BackupVault is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.AsyncLROPoller[~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.BackupVault] = 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.BackupVault, 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.BackupVault].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.BackupVault](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ async def _update_initial(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ backup_vault_name: str,
+ body: Union[_models.BackupVaultPatch, 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_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["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.BackupVaultPatch,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_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 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 AsyncLROPoller that returns BackupVault. The BackupVault is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :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.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 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 AsyncLROPoller that returns BackupVault. The BackupVault is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :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.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 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 AsyncLROPoller that returns BackupVault. The BackupVault is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_update(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ backup_vault_name: str,
+ body: Union[_models.BackupVaultPatch, JSON, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncLROPoller[_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 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 AsyncLROPoller that returns BackupVault. The BackupVault is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.AsyncLROPoller[~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.BackupVault] = 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.BackupVault, 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.BackupVault].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.BackupVault](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ 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_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
+ async def begin_delete(
+ self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """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 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 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
+ def list_by_net_app_account(
+ self, resource_group_name: str, account_name: str, **kwargs: Any
+ ) -> AsyncItemPaged["_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
+ :param account_name: The name of the NetApp account. Required.
+ :type account_name: str
+ :return: An iterator like instance of BackupVault
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.BackupVault]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[List[_models.BackupVault]] = 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_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,
+ 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.BackupVault], 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 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["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[None]:
+ """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 None
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :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[None]:
+ """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 None
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :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[None]:
+ """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 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_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[None]:
+ """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 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._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): # 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
+
+ @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["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["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.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_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["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.ElasticSnapshotPolicy,
+ *,
+ 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.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_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.ElasticSnapshotPolicy, 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:
+ 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._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.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_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["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.ElasticBackupVault,
+ *,
+ 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.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_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.ElasticBackupVault, 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:
+ 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._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.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_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.ElasticBackupPolicy,
+ *,
+ 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.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_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.ElasticBackupPolicy, 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:
+ 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._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["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_backup_vaults_create_or_update_request(
+ _request = build_active_directory_configs_create_or_update_request(
resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_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,
@@ -10925,30 +23362,27 @@ async def _create_or_update_initial(
async def begin_create_or_update(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: _models.BackupVault,
+ active_directory_config_name: str,
+ body: _models.ActiveDirectoryConfig,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> AsyncLROPoller[_models.BackupVault]:
- """Create or update the specified Backup Vault in the NetApp account.
+ ) -> 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 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
+ :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 BackupVault. The BackupVault is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :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:
"""
@@ -10956,30 +23390,27 @@ async def begin_create_or_update(
async def begin_create_or_update(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
+ active_directory_config_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> AsyncLROPoller[_models.BackupVault]:
- """Create or update the specified Backup Vault in the NetApp account.
+ ) -> 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 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.
+ :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 BackupVault. The BackupVault is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :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:
"""
@@ -10987,72 +23418,79 @@ async def begin_create_or_update(
async def begin_create_or_update(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
+ active_directory_config_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> AsyncLROPoller[_models.BackupVault]:
- """Create or update the specified Backup Vault in the NetApp account.
+ ) -> 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 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.
+ :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 BackupVault. The BackupVault is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :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,
- account_name: str,
- backup_vault_name: str,
- body: Union[_models.BackupVault, JSON, IO[bytes]],
+ active_directory_config_name: str,
+ body: Union[_models.ActiveDirectoryConfig, JSON, IO[bytes]],
**kwargs: Any
- ) -> AsyncLROPoller[_models.BackupVault]:
- """Create or update the specified Backup Vault in the NetApp account.
+ ) -> 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 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 AsyncLROPoller that returns BackupVault. The BackupVault is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :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.BackupVault] = kwargs.pop("cls", 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,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
+ active_directory_config_name=active_directory_config_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -11065,7 +23503,7 @@ async 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.ActiveDirectoryConfig, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -11083,22 +23521,35 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return AsyncLROPoller[_models.BackupVault].from_continuation_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.BackupVault](
+ 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,
- account_name: str,
- backup_vault_name: str,
- body: Union[_models.BackupVaultPatch, JSON, IO[bytes]],
+ active_directory_config_name: str,
+ body: Union[_models.ActiveDirectoryConfigUpdate, JSON, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping = {
@@ -11122,10 +23573,9 @@ async def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_backup_vaults_update_request(
+ _request = build_active_directory_configs_update_request(
resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_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,
@@ -11173,30 +23623,27 @@ async def _update_initial(
async def begin_update(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: _models.BackupVaultPatch,
+ active_directory_config_name: str,
+ body: _models.ActiveDirectoryConfigUpdate,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> AsyncLROPoller[_models.BackupVault]:
- """Patch the specified NetApp Backup Vault.
+ ) -> 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 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
+ :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 BackupVault. The BackupVault is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :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:
"""
@@ -11204,30 +23651,27 @@ async def begin_update(
async def begin_update(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
+ active_directory_config_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> AsyncLROPoller[_models.BackupVault]:
- """Patch the specified NetApp Backup Vault.
+ ) -> 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 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.
+ :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 BackupVault. The BackupVault is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :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:
"""
@@ -11235,72 +23679,79 @@ async def begin_update(
async def begin_update(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
+ active_directory_config_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> AsyncLROPoller[_models.BackupVault]:
- """Patch the specified NetApp Backup Vault.
+ ) -> 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 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.
+ :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 BackupVault. The BackupVault is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :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,
- account_name: str,
- backup_vault_name: str,
- body: Union[_models.BackupVaultPatch, JSON, IO[bytes]],
+ active_directory_config_name: str,
+ body: Union[_models.ActiveDirectoryConfigUpdate, JSON, IO[bytes]],
**kwargs: Any
- ) -> AsyncLROPoller[_models.BackupVault]:
- """Patch the specified NetApp Backup Vault.
+ ) -> 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 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 AsyncLROPoller that returns BackupVault. The BackupVault is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :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.BackupVault] = kwargs.pop("cls", 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,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
+ active_directory_config_name=active_directory_config_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -11313,7 +23764,7 @@ async def begin_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.BackupVault, response.json())
+ deserialized = _deserialize(_models.ActiveDirectoryConfig, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -11331,18 +23782,30 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return AsyncLROPoller[_models.BackupVault].from_continuation_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.BackupVault](
+ 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, account_name: str, backup_vault_name: str, **kwargs: Any
+ self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -11357,10 +23820,9 @@ async def _delete_initial(
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
- _request = build_backup_vaults_delete_request(
+ _request = build_active_directory_configs_delete_request(
resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
+ active_directory_config_name=active_directory_config_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -11403,18 +23865,28 @@ async def _delete_initial(
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, account_name: str, backup_vault_name: str, **kwargs: Any
+ self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any
) -> AsyncLROPoller[None]:
- """Delete the specified Backup Vault.
+ """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 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 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:
@@ -11429,8 +23901,7 @@ async def begin_delete(
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,
+ active_directory_config_name=active_directory_config_name,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -11465,24 +23936,28 @@ 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
@distributed_trace
- def list_by_net_app_account(
- self, resource_group_name: str, account_name: str, **kwargs: Any
- ) -> AsyncItemPaged["_models.BackupVault"]:
- """List and describe all Backup Vaults in the NetApp account.
+ @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
- :param account_name: The name of the NetApp account. Required.
- :type account_name: str
- :return: An iterator like instance of BackupVault
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.BackupVault]
+ :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.BackupVault]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.ActiveDirectoryConfig]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -11495,9 +23970,8 @@ 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_active_directory_configs_list_by_resource_group_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,
@@ -11534,7 +24008,100 @@ def prepare_request(next_link=None):
async def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.BackupVault], deserialized.get("value", []))
+ 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)
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 250bef9692fb..d9606f29a468 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,6 +17,10 @@
AccountEncryption,
AccountProperties,
ActiveDirectory,
+ ActiveDirectoryConfig,
+ ActiveDirectoryConfigProperties,
+ ActiveDirectoryConfigUpdate,
+ ActiveDirectoryConfigUpdateProperties,
AuthorizeRequest,
Backup,
BackupPatch,
@@ -33,14 +37,71 @@
BackupsMigrationRequest,
BreakFileLocksRequest,
BreakReplicationRequest,
+ Bucket,
+ BucketCredentialsExpiry,
+ BucketGenerateCredentials,
+ BucketPatch,
+ BucketPatchProperties,
+ BucketProperties,
+ BucketServerPatchProperties,
+ BucketServerProperties,
+ Cache,
+ CacheMountTargetProperties,
+ CacheProperties,
+ CacheUpdate,
+ CacheUpdateProperties,
CapacityPool,
CapacityPoolPatch,
ChangeKeyVault,
+ ChangeZoneRequest,
CheckAvailabilityResponse,
+ CheckElasticResourceAvailabilityResponse,
+ CheckElasticVolumeFilePathAvailabilityRequest,
+ CifsUser,
ClusterPeerCommandResponse,
DailySchedule,
DestinationReplication,
Dimension,
+ ElasticAccount,
+ ElasticAccountProperties,
+ ElasticAccountUpdate,
+ ElasticAccountUpdateProperties,
+ ElasticBackup,
+ ElasticBackupPolicy,
+ ElasticBackupPolicyProperties,
+ ElasticBackupProperties,
+ ElasticBackupVault,
+ ElasticBackupVaultProperties,
+ ElasticCapacityPool,
+ ElasticCapacityPoolProperties,
+ ElasticCapacityPoolUpdate,
+ ElasticCapacityPoolUpdateProperties,
+ ElasticEncryption,
+ ElasticEncryptionConfiguration,
+ ElasticEncryptionIdentity,
+ ElasticExportPolicy,
+ ElasticExportPolicyRule,
+ ElasticKeyVaultProperties,
+ ElasticMountTargetProperties,
+ ElasticSmbPatchProperties,
+ ElasticSmbProperties,
+ ElasticSnapshot,
+ ElasticSnapshotPolicy,
+ ElasticSnapshotPolicyDailySchedule,
+ ElasticSnapshotPolicyHourlySchedule,
+ ElasticSnapshotPolicyMonthlySchedule,
+ ElasticSnapshotPolicyProperties,
+ ElasticSnapshotPolicyWeeklySchedule,
+ ElasticSnapshotProperties,
+ ElasticVolume,
+ ElasticVolumeBackupProperties,
+ ElasticVolumeDataProtectionPatchProperties,
+ ElasticVolumeDataProtectionProperties,
+ ElasticVolumeProperties,
+ ElasticVolumeRevert,
+ ElasticVolumeSnapshotProperties,
+ ElasticVolumeUpdate,
+ ElasticVolumeUpdateProperties,
EncryptionIdentity,
EncryptionTransitionRequest,
ErrorAdditionalInfo,
@@ -48,6 +109,7 @@
ErrorResponse,
ExportPolicyRule,
FilePathAvailabilityRequest,
+ FileSystemUser,
GetGroupIdListForLDAPUserRequest,
GetGroupIdListForLDAPUserResponse,
GetKeyVaultStatusResponse,
@@ -55,7 +117,9 @@
HourlySchedule,
KeyVaultPrivateEndpoint,
KeyVaultProperties,
+ LdapConfiguration,
LdapSearchScopeOpt,
+ ListQuotaReportResponse,
ListReplicationsRequest,
LogSpecification,
ManagedServiceIdentity,
@@ -65,11 +129,14 @@
NetAppAccount,
NetAppAccountPatch,
NetworkSiblingSet,
+ NfsUser,
NicInfo,
Operation,
OperationDisplay,
OperationProperties,
+ OriginClusterInformation,
PeerClusterForVolumeMigrationRequest,
+ PeeringPassphrases,
PlacementKeyValuePairs,
PoolChangeRequest,
PoolPatchProperties,
@@ -79,6 +146,13 @@
QuotaAvailabilityRequest,
QuotaItem,
QuotaItemProperties,
+ QuotaReport,
+ RansomwareProtectionPatchSettings,
+ RansomwareProtectionSettings,
+ RansomwareReport,
+ RansomwareReportProperties,
+ RansomwareSuspects,
+ RansomwareSuspectsClearRequest,
ReestablishReplicationRequest,
RegionInfo,
RegionInfoAvailabilityZoneMappingsItem,
@@ -91,7 +165,11 @@
Resource,
ResourceNameAvailabilityRequest,
RestoreStatus,
+ SecretPassword,
+ SecretPasswordIdentity,
+ SecretPasswordKeyVaultProperties,
ServiceSpecification,
+ SmbSettings,
Snapshot,
SnapshotPatch,
SnapshotPolicy,
@@ -106,6 +184,7 @@
SubvolumePatchParams,
SubvolumePatchRequest,
SubvolumeProperties,
+ SuspectFile,
SvmPeerCommandResponse,
SystemData,
TrackedResource,
@@ -142,24 +221,58 @@
from ._enums import ( # type: ignore
AcceptGrowCapacityPoolForShortTermCloneSplit,
ActiveDirectoryStatus,
+ ActualRansomwareProtectionState,
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,
@@ -167,7 +280,12 @@
NetAppProvisioningState,
NetworkFeatures,
NetworkSiblingSetProvisioningState,
+ PolicyStatus,
+ ProtocolTypes,
QosType,
+ RansomwareReportSeverity,
+ RansomwareReportState,
+ RansomwareSuspectResolution,
RegionStorageToNetworkProximity,
ReplicationMirrorState,
ReplicationSchedule,
@@ -175,11 +293,16 @@
SecurityStyle,
ServiceLevel,
SmbAccessBasedEnumeration,
+ SmbEncryptionState,
SmbNonBrowsable,
+ SnapshotDirectoryVisibility,
+ SnapshotUsage,
Type,
VolumeBackupRelationshipStatus,
+ VolumeLanguage,
VolumeReplicationRelationshipStatus,
VolumeRestoreRelationshipStatus,
+ VolumeSize,
VolumeStorageToNetworkProximity,
)
from ._patch import __all__ as _patch_all
@@ -190,6 +313,10 @@
"AccountEncryption",
"AccountProperties",
"ActiveDirectory",
+ "ActiveDirectoryConfig",
+ "ActiveDirectoryConfigProperties",
+ "ActiveDirectoryConfigUpdate",
+ "ActiveDirectoryConfigUpdateProperties",
"AuthorizeRequest",
"Backup",
"BackupPatch",
@@ -206,14 +333,71 @@
"BackupsMigrationRequest",
"BreakFileLocksRequest",
"BreakReplicationRequest",
+ "Bucket",
+ "BucketCredentialsExpiry",
+ "BucketGenerateCredentials",
+ "BucketPatch",
+ "BucketPatchProperties",
+ "BucketProperties",
+ "BucketServerPatchProperties",
+ "BucketServerProperties",
+ "Cache",
+ "CacheMountTargetProperties",
+ "CacheProperties",
+ "CacheUpdate",
+ "CacheUpdateProperties",
"CapacityPool",
"CapacityPoolPatch",
"ChangeKeyVault",
+ "ChangeZoneRequest",
"CheckAvailabilityResponse",
+ "CheckElasticResourceAvailabilityResponse",
+ "CheckElasticVolumeFilePathAvailabilityRequest",
+ "CifsUser",
"ClusterPeerCommandResponse",
"DailySchedule",
"DestinationReplication",
"Dimension",
+ "ElasticAccount",
+ "ElasticAccountProperties",
+ "ElasticAccountUpdate",
+ "ElasticAccountUpdateProperties",
+ "ElasticBackup",
+ "ElasticBackupPolicy",
+ "ElasticBackupPolicyProperties",
+ "ElasticBackupProperties",
+ "ElasticBackupVault",
+ "ElasticBackupVaultProperties",
+ "ElasticCapacityPool",
+ "ElasticCapacityPoolProperties",
+ "ElasticCapacityPoolUpdate",
+ "ElasticCapacityPoolUpdateProperties",
+ "ElasticEncryption",
+ "ElasticEncryptionConfiguration",
+ "ElasticEncryptionIdentity",
+ "ElasticExportPolicy",
+ "ElasticExportPolicyRule",
+ "ElasticKeyVaultProperties",
+ "ElasticMountTargetProperties",
+ "ElasticSmbPatchProperties",
+ "ElasticSmbProperties",
+ "ElasticSnapshot",
+ "ElasticSnapshotPolicy",
+ "ElasticSnapshotPolicyDailySchedule",
+ "ElasticSnapshotPolicyHourlySchedule",
+ "ElasticSnapshotPolicyMonthlySchedule",
+ "ElasticSnapshotPolicyProperties",
+ "ElasticSnapshotPolicyWeeklySchedule",
+ "ElasticSnapshotProperties",
+ "ElasticVolume",
+ "ElasticVolumeBackupProperties",
+ "ElasticVolumeDataProtectionPatchProperties",
+ "ElasticVolumeDataProtectionProperties",
+ "ElasticVolumeProperties",
+ "ElasticVolumeRevert",
+ "ElasticVolumeSnapshotProperties",
+ "ElasticVolumeUpdate",
+ "ElasticVolumeUpdateProperties",
"EncryptionIdentity",
"EncryptionTransitionRequest",
"ErrorAdditionalInfo",
@@ -221,6 +405,7 @@
"ErrorResponse",
"ExportPolicyRule",
"FilePathAvailabilityRequest",
+ "FileSystemUser",
"GetGroupIdListForLDAPUserRequest",
"GetGroupIdListForLDAPUserResponse",
"GetKeyVaultStatusResponse",
@@ -228,7 +413,9 @@
"HourlySchedule",
"KeyVaultPrivateEndpoint",
"KeyVaultProperties",
+ "LdapConfiguration",
"LdapSearchScopeOpt",
+ "ListQuotaReportResponse",
"ListReplicationsRequest",
"LogSpecification",
"ManagedServiceIdentity",
@@ -238,11 +425,14 @@
"NetAppAccount",
"NetAppAccountPatch",
"NetworkSiblingSet",
+ "NfsUser",
"NicInfo",
"Operation",
"OperationDisplay",
"OperationProperties",
+ "OriginClusterInformation",
"PeerClusterForVolumeMigrationRequest",
+ "PeeringPassphrases",
"PlacementKeyValuePairs",
"PoolChangeRequest",
"PoolPatchProperties",
@@ -252,6 +442,13 @@
"QuotaAvailabilityRequest",
"QuotaItem",
"QuotaItemProperties",
+ "QuotaReport",
+ "RansomwareProtectionPatchSettings",
+ "RansomwareProtectionSettings",
+ "RansomwareReport",
+ "RansomwareReportProperties",
+ "RansomwareSuspects",
+ "RansomwareSuspectsClearRequest",
"ReestablishReplicationRequest",
"RegionInfo",
"RegionInfoAvailabilityZoneMappingsItem",
@@ -264,7 +461,11 @@
"Resource",
"ResourceNameAvailabilityRequest",
"RestoreStatus",
+ "SecretPassword",
+ "SecretPasswordIdentity",
+ "SecretPasswordKeyVaultProperties",
"ServiceSpecification",
+ "SmbSettings",
"Snapshot",
"SnapshotPatch",
"SnapshotPolicy",
@@ -279,6 +480,7 @@
"SubvolumePatchParams",
"SubvolumePatchRequest",
"SubvolumeProperties",
+ "SuspectFile",
"SvmPeerCommandResponse",
"SystemData",
"TrackedResource",
@@ -312,24 +514,58 @@
"WeeklySchedule",
"AcceptGrowCapacityPoolForShortTermCloneSplit",
"ActiveDirectoryStatus",
+ "ActualRansomwareProtectionState",
"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",
@@ -337,7 +573,12 @@
"NetAppProvisioningState",
"NetworkFeatures",
"NetworkSiblingSetProvisioningState",
+ "PolicyStatus",
+ "ProtocolTypes",
"QosType",
+ "RansomwareReportSeverity",
+ "RansomwareReportState",
+ "RansomwareSuspectResolution",
"RegionStorageToNetworkProximity",
"ReplicationMirrorState",
"ReplicationSchedule",
@@ -345,11 +586,16 @@
"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 203999a3ef05..9fbff32fabd2 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,3 +1,4 @@
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -39,6 +40,19 @@ class ActiveDirectoryStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""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"""
+ ENABLED = "Enabled"
+ """Advanced Ransomware Protection is enabled"""
+ LEARNING = "Learning"
+ """Advanced Ransomware Protection is in learning mode"""
+ PAUSED = "Paused"
+ """Advanced Ransomware Protection is in paused state"""
+
+
class ApplicationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Application Type."""
@@ -64,6 +78,92 @@ class BackupType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""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."""
+
+
class CheckNameResourceTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Resource type used for verification."""
@@ -110,6 +210,15 @@ class ChownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
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"""
+
+
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
@@ -151,6 +260,187 @@ 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."""
+
+ 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."""
+
+
class EnableSubvolumes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Flag indicating whether subvolume operations are enabled on the volume."""
@@ -160,6 +450,15 @@ class EnableSubvolumes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""subvolumes are not enabled"""
+class EnableWriteBackState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Flag indicating whether writeback is enabled for the cache."""
+
+ DISABLED = "Disabled"
+ """Writeback cache is disabled"""
+ ENABLED = "Enabled"
+ """Writeback cache is enabled"""
+
+
class EncryptionKeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Source of key used to encrypt data in volume. Applicable if NetApp account has
encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are:
@@ -172,6 +471,15 @@ class EncryptionKeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""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"""
+
+
class EncryptionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Encryption type of the capacity pool, set encryption type for data at rest for this pool and
all volumes in it. This value can only be set when creating new pool.
@@ -201,6 +509,25 @@ class Exclude(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""'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"""
+
+
class FileAccessLogs(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Flag indicating whether file access logs are enabled for the volume, based on active diagnostic
settings present on the volume.
@@ -212,6 +539,15 @@ class FileAccessLogs(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""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"""
+
+
class InAvailabilityReasonType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Invalid indicates the name provided does not match Azure App Service naming
requirements. AlreadyExists indicates that the name is already in use and is
@@ -222,6 +558,15 @@ class InAvailabilityReasonType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
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"""
+
+
class KeySource(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp,
Microsoft.KeyVault.
@@ -248,6 +593,40 @@ class KeyVaultStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""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"""
+
+
class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Type of managed service identity (where both SystemAssigned and UserAssigned types are
allowed).
@@ -329,6 +708,26 @@ class NetworkSiblingSetProvisioningState(str, Enum, metaclass=CaseInsensitiveEnu
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):
+ """Export policy rule."""
+
+ NF_SV3 = "NFSv3"
+ """NFSv3 protocol type"""
+ NF_SV4 = "NFSv4"
+ """NFSv4 protocol type"""
+ SMB = "SMB"
+ """SMB protocol type"""
+
+
class QosType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The qos type of the pool."""
@@ -338,6 +737,39 @@ class QosType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""qos type Manual"""
+class RansomwareReportSeverity(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Severity of the Advanced Ransomware Protection (ARP) report."""
+
+ NONE = "None"
+ """No data is suspected for ransomware activity"""
+ LOW = "Low"
+ """Low attack probability"""
+ MODERATE = "Moderate"
+ """Moderate attack probability"""
+ HIGH = "High"
+ """High amount of data is suspected for ransomware activity"""
+
+
+class RansomwareReportState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """State of the Advanced Ransomware Protection (ARP) report."""
+
+ ACTIVE = "Active"
+ """The ARP report has been created. Take action by running clearsuspects marking suspects as
+ FalsePositive or PotentialThreats"""
+ RESOLVED = "Resolved"
+ """The ARP Report has been resolved"""
+
+
+class RansomwareSuspectResolution(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """ARP report suspect resolution."""
+
+ POTENTIAL_THREAT = "PotentialThreat"
+ """The identified file type is unexpected in your workload and should be treated as a potential
+ attack"""
+ FALSE_POSITIVE = "FalsePositive"
+ """The identified file type is expected in your workload and can be ignored"""
+
+
class RegionStorageToNetworkProximity(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Provides storage to network proximity information in the region."""
@@ -422,6 +854,15 @@ class SmbAccessBasedEnumeration(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""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"""
+ ENABLED = "Enabled"
+ """SMB encryption is enabled"""
+
+
class SmbNonBrowsable(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume."""
@@ -431,6 +872,26 @@ class SmbNonBrowsable(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""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."""
@@ -453,6 +914,149 @@ class VolumeBackupRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMet
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"""
+
+
class VolumeReplicationRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Status of the volume replication relationship."""
@@ -469,6 +1073,15 @@ class VolumeRestoreRelationshipStatus(str, Enum, metaclass=CaseInsensitiveEnumMe
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"""
+
+
class VolumeStorageToNetworkProximity(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Provides storage to network proximity information for the volume."""
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 0781b738c451..c9ac7e00393d 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,6 +84,8 @@ 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"])
@@ -107,6 +109,10 @@ 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__(
@@ -115,6 +121,7 @@ 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
@@ -316,36 +323,6 @@ 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.
@@ -374,25 +351,8 @@ class Resource(_Model):
"""Azure Resource Manager metadata containing createdBy and modifiedBy information."""
-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 TrackedResource(Resource):
+ """Tracked Resource.
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
@@ -405,35 +365,23 @@ 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
"""
- 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",
- ]
+ 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."""
@overload
def __init__(
self,
*,
- properties: "_models.BackupProperties",
+ location: str,
+ tags: Optional[dict[str, str]] = None,
) -> None: ...
@overload
@@ -444,46 +392,60 @@ 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 BackupPatch(_Model):
- """Backup patch.
+class ActiveDirectoryConfig(TrackedResource):
+ """Active Directory Configuration resource.
- :ivar properties: Backup Patch Properties.
- :vartype properties: ~azure.mgmt.netapp.models.BackupPatchProperties
+ :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
"""
- properties: Optional["_models.BackupPatchProperties"] = rest_field(
+ properties: Optional["_models.ActiveDirectoryConfigProperties"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
- """Backup Patch Properties."""
-
- __flattened_items = ["label"]
+ """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(
+ visibility=["read", "create", "update", "delete", "query"]
+ )
+ """The managed service identities assigned to this resource."""
@overload
def __init__(
self,
*,
- properties: Optional["_models.BackupPatchProperties"] = None,
+ location: str,
+ tags: Optional[dict[str, str]] = None,
+ properties: Optional["_models.ActiveDirectoryConfigProperties"] = None,
+ identity: Optional["_models.ManagedServiceIdentity"] = None,
) -> None: ...
@overload
@@ -494,42 +456,105 @@ 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 BackupPatchProperties(_Model):
- """Backup patch properties.
+class ActiveDirectoryConfigProperties(_Model):
+ """Active Directory Configuration properties.
- :ivar label: Label for backup.
- :vartype label: str
+ :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
"""
- label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Label for backup."""
+ 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."""
@overload
def __init__(
self,
*,
- label: Optional[str] = None,
+ 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,
) -> None: ...
@overload
@@ -543,37 +568,35 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class TrackedResource(Resource):
- """Tracked Resource.
+class ActiveDirectoryConfigUpdate(_Model):
+ """The type used for update operations of the ActiveDirectoryConfig.
- :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 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 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.ActiveDirectoryConfigUpdateProperties
"""
+ 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."""
- location: str = rest_field(visibility=["read", "create"])
- """The geo-location where the resource lives. Required."""
+ properties: Optional["_models.ActiveDirectoryConfigUpdateProperties"] = rest_field(
+ visibility=["read", "create", "update", "delete", "query"]
+ )
+ """The resource-specific properties for this resource."""
@overload
def __init__(
self,
*,
- location: str,
+ identity: Optional["_models.ManagedServiceIdentity"] = None,
tags: Optional[dict[str, str]] = None,
+ properties: Optional["_models.ActiveDirectoryConfigUpdateProperties"] = None,
) -> None: ...
@overload
@@ -587,10 +610,132 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class BackupPolicy(TrackedResource):
- """Backup policy information.
+class ActiveDirectoryConfigUpdateProperties(_Model):
+ """The updatable properties of the ActiveDirectoryConfig.
- :ivar id: Fully qualified resource ID for the resource. Ex -
+ :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.
@@ -601,47 +746,52 @@ class BackupPolicy(TrackedResource):
: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.\")."""
+
+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_policy_id",
+ "backup_id",
+ "creation_date",
+ "snapshot_creation_date",
+ "completion_date",
"provisioning_state",
- "daily_backups_to_keep",
- "weekly_backups_to_keep",
- "monthly_backups_to_keep",
- "volumes_assigned",
- "enabled",
- "volume_backups",
+ "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,
- properties: "_models.BackupPolicyProperties",
- tags: Optional[dict[str, str]] = None,
+ properties: "_models.BackupProperties",
) -> None: ...
@overload
@@ -673,56 +823,25 @@ def __setattr__(self, key: str, value: Any) -> None:
super().__setattr__(key, value)
-class BackupPolicyPatch(_Model):
- """Backup policy Details for create and update.
+class BackupPatch(_Model):
+ """Backup patch.
- :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
+ :ivar properties: Backup Patch Properties.
+ :vartype properties: ~azure.mgmt.netapp.models.BackupPatchProperties
"""
- 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(
+ properties: Optional["_models.BackupPatchProperties"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
- """Backup policy Properties."""
+ """Backup Patch 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",
- ]
+ __flattened_items = ["label"]
@overload
def __init__(
self,
*,
- location: Optional[str] = None,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.BackupPolicyProperties"] = None,
+ properties: Optional["_models.BackupPatchProperties"] = None,
) -> None: ...
@overload
@@ -754,43 +873,238 @@ def __setattr__(self, key: str, value: Any) -> None:
super().__setattr__(key, value)
-class BackupPolicyProperties(_Model):
- """Backup policy properties.
+class BackupPatchProperties(_Model):
+ """Backup patch 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 label: Label for backup.
+ :vartype label: str
"""
- backup_policy_id: Optional[str] = rest_field(name="backupPolicyId", visibility=["read"])
- """Backup Policy GUID ID."""
- provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
- """Azure lifecycle management."""
- 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."""
+ 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]
+ """
+
+ backup_policy_id: Optional[str] = rest_field(name="backupPolicyId", visibility=["read"])
+ """Backup Policy GUID ID."""
+ provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
+ """Azure lifecycle management."""
+ 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."""
volumes_assigned: Optional[int] = rest_field(name="volumesAssigned", visibility=["read"])
"""Volumes using current backup policy."""
enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
@@ -854,48 +1168,2775 @@ class BackupProperties(_Model):
:vartype is_large_volume: bool
"""
- backup_id: Optional[str] = rest_field(name="backupId", visibility=["read"])
- """UUID v4 used to identify the Backup."""
- 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"
+ backup_id: Optional[str] = rest_field(name="backupId", visibility=["read"])
+ """UUID v4 used to identify the Backup."""
+ 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[str] = rest_field(name="provisioningState", visibility=["read"])
+ """Azure lifecycle management."""
+ 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.BackupType"]] = 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."""
+ volume_resource_id: str = rest_field(name="volumeResourceId", visibility=["read", "create"])
+ """ResourceId used to identify the Volume. Required."""
+ use_existing_snapshot: Optional[bool] = rest_field(name="useExistingSnapshot", visibility=["read", "create"])
+ """Manual backup an already existing snapshot. This will always be false for scheduled backups and
+ true/false for manual backups."""
+ snapshot_name: Optional[str] = rest_field(name="snapshotName", visibility=["read", "create"])
+ """The name of the snapshot."""
+ backup_policy_resource_id: Optional[str] = rest_field(name="backupPolicyResourceId", visibility=["read"])
+ """ResourceId used to identify the backup policy."""
+ is_large_volume: Optional[bool] = rest_field(name="isLargeVolume", visibility=["read"])
+ """Specifies if the backup is for a large volume."""
+
+ @overload
+ def __init__(
+ self,
+ *,
+ volume_resource_id: str,
+ label: Optional[str] = None,
+ use_existing_snapshot: Optional[bool] = None,
+ snapshot_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 BackupRestoreFiles(_Model):
+ """Restore payload for Single File Backup Restore.
+
+ :ivar file_list: List of files to be restored. Required.
+ :vartype file_list: list[str]
+ :ivar restore_file_path: Destination folder where the files will be restored. The path name
+ should start with a forward slash. If it is omitted from request then restore is done at the
+ root folder of the destination volume by default.
+ :vartype restore_file_path: str
+ :ivar destination_volume_id: Resource Id of the destination volume on which the files need to
+ be restored. Required.
+ :vartype destination_volume_id: str
+ """
+
+ file_list: list[str] = rest_field(name="fileList", visibility=["read", "create", "update", "delete", "query"])
+ """List of files to be restored. Required."""
+ restore_file_path: Optional[str] = rest_field(
+ name="restoreFilePath", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Destination folder where the files will be restored. The path name should start with a forward
+ slash. If it is omitted from request then restore is done at the root folder of the destination
+ volume by default."""
+ destination_volume_id: str = rest_field(
+ name="destinationVolumeId", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Resource Id of the destination volume on which the files need to be restored. Required."""
+
+ @overload
+ def __init__(
+ self,
+ *,
+ file_list: list[str],
+ destination_volume_id: str,
+ restore_file_path: 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 BackupsMigrationRequest(_Model):
+ """Migrate Backups Request.
+
+ :ivar backup_vault_id: The ResourceId of the Backup Vault. Required.
+ :vartype backup_vault_id: str
+ """
+
+ backup_vault_id: str = rest_field(name="backupVaultId", visibility=["read", "create", "update", "delete", "query"])
+ """The ResourceId of the Backup Vault. Required."""
+
+ @overload
+ def __init__(
+ self,
+ *,
+ backup_vault_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 BackupStatus(_Model):
+ """Backup status.
+
+ :ivar healthy: Backup health status.
+ :vartype healthy: bool
+ :ivar relationship_status: Status of the backup mirror relationship. Known values are: "Idle",
+ "Transferring", "Failed", and "Unknown".
+ :vartype relationship_status: str or ~azure.mgmt.netapp.models.VolumeBackupRelationshipStatus
+ :ivar mirror_state: The status of the backup. Known values are: "Uninitialized", "Mirrored",
+ and "Broken".
+ :vartype mirror_state: str or ~azure.mgmt.netapp.models.MirrorState
+ :ivar unhealthy_reason: Reason for the unhealthy backup relationship.
+ :vartype unhealthy_reason: str
+ :ivar error_message: Displays error message if the backup is in an error state.
+ :vartype error_message: str
+ :ivar last_transfer_size: Displays the last transfer size.
+ :vartype last_transfer_size: int
+ :ivar last_transfer_type: Displays the last transfer type.
+ :vartype last_transfer_type: str
+ :ivar total_transfer_bytes: Displays the total bytes transferred.
+ :vartype total_transfer_bytes: int
+ :ivar transfer_progress_bytes: Displays the total number of bytes transferred for the ongoing
+ operation.
+ :vartype transfer_progress_bytes: int
+ """
+
+ healthy: Optional[bool] = rest_field(visibility=["read"])
+ """Backup health status."""
+ relationship_status: Optional[Union[str, "_models.VolumeBackupRelationshipStatus"]] = rest_field(
+ name="relationshipStatus", visibility=["read"]
+ )
+ """Status of the backup mirror relationship. Known values are: \"Idle\", \"Transferring\",
+ \"Failed\", and \"Unknown\"."""
+ mirror_state: Optional[Union[str, "_models.MirrorState"]] = rest_field(name="mirrorState", visibility=["read"])
+ """The status of the backup. Known values are: \"Uninitialized\", \"Mirrored\", and \"Broken\"."""
+ unhealthy_reason: Optional[str] = rest_field(name="unhealthyReason", visibility=["read"])
+ """Reason for the unhealthy backup relationship."""
+ error_message: Optional[str] = rest_field(name="errorMessage", visibility=["read"])
+ """Displays error message if the backup is in an error state."""
+ last_transfer_size: Optional[int] = rest_field(name="lastTransferSize", visibility=["read"])
+ """Displays the last transfer size."""
+ 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: list[~azure.mgmt.netapp.models.ExportPolicyRule]
+ :ivar protocol_types: Set of protocol types, default NFSv3, CIFS for 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[list["_models.ExportPolicyRule"]] = 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 protocol types, default NFSv3, CIFS for 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[list["_models.ExportPolicyRule"]] = 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 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: list[~azure.mgmt.netapp.models.ExportPolicyRule]
+ :ivar protocol_types: Set of protocol types, default NFSv3, CIFS for 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[list["_models.ExportPolicyRule"]] = 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 protocol types, default NFSv3, CIFS for 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[list["_models.ExportPolicyRule"]] = 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 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 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 snapshot creation date of the backup."""
- completion_date: Optional[datetime.datetime] = rest_field(
- name="completionDate", visibility=["read"], format="rfc3339"
+ """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 completion date of the backup."""
- provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
- """Azure lifecycle management."""
- 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.BackupType"]] = 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."""
- volume_resource_id: str = rest_field(name="volumeResourceId", visibility=["read", "create"])
- """ResourceId used to identify the Volume. Required."""
- use_existing_snapshot: Optional[bool] = rest_field(name="useExistingSnapshot", visibility=["read", "create"])
- """Manual backup an already existing snapshot. This will always be false for scheduled backups and
- true/false for manual backups."""
- snapshot_name: Optional[str] = rest_field(name="snapshotName", visibility=["read", "create"])
- """The name of the snapshot."""
- backup_policy_resource_id: Optional[str] = rest_field(name="backupPolicyResourceId", visibility=["read"])
- """ResourceId used to identify the backup policy."""
- is_large_volume: Optional[bool] = rest_field(name="isLargeVolume", visibility=["read"])
- """Specifies if the backup is for a large volume."""
+ """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,
*,
- volume_resource_id: str,
- label: Optional[str] = None,
- use_existing_snapshot: Optional[bool] = None,
- snapshot_name: Optional[str] = None,
+ key_vault_uri: Optional[str] = None,
+ key_name: Optional[str] = None,
+ key_vault_resource_id: Optional[str] = None,
) -> None: ...
@overload
@@ -909,40 +3950,42 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class BackupRestoreFiles(_Model):
- """Restore payload for Single File Backup Restore.
+class ElasticMountTargetProperties(_Model):
+ """Contains all the information needed to mount an elastic volume.
- :ivar file_list: List of files to be restored. Required.
- :vartype file_list: list[str]
- :ivar restore_file_path: Destination folder where the files will be restored. The path name
- should start with a forward slash. If it is omitted from request then restore is done at the
- root folder of the destination volume by default.
- :vartype restore_file_path: str
- :ivar destination_volume_id: Resource Id of the destination volume on which the files need to
- be restored. Required.
- :vartype destination_volume_id: str
+ :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
"""
- file_list: list[str] = rest_field(name="fileList", visibility=["read", "create", "update", "delete", "query"])
- """List of files to be restored. Required."""
- restore_file_path: Optional[str] = rest_field(
- name="restoreFilePath", visibility=["read", "create", "update", "delete", "query"]
- )
- """Destination folder where the files will be restored. The path name should start with a forward
- slash. If it is omitted from request then restore is done at the root folder of the destination
- volume by default."""
- destination_volume_id: str = rest_field(
- name="destinationVolumeId", visibility=["read", "create", "update", "delete", "query"]
+ 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"]
)
- """Resource Id of the destination volume on which the files need to be restored. Required."""
+ """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,
*,
- file_list: list[str],
- destination_volume_id: str,
- restore_file_path: Optional[str] = None,
+ smb_encryption: Optional[Union[str, "_models.ElasticSmbEncryption"]] = None,
) -> None: ...
@overload
@@ -956,21 +3999,27 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class BackupsMigrationRequest(_Model):
- """Migrate Backups Request.
+class ElasticSmbProperties(_Model):
+ """SMB Properties.
- :ivar backup_vault_id: The ResourceId of the Backup Vault. Required.
- :vartype backup_vault_id: str
+ :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
"""
- backup_vault_id: str = rest_field(name="backupVaultId", visibility=["read", "create", "update", "delete", "query"])
- """The ResourceId of the Backup Vault. Required."""
+ 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,
*,
- backup_vault_id: str,
+ smb_encryption: Optional[Union[str, "_models.ElasticSmbEncryption"]] = None,
) -> None: ...
@overload
@@ -984,57 +4033,49 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class BackupStatus(_Model):
- """Backup status.
+class ElasticSnapshot(ProxyResource):
+ """NetApp Elastic Snapshot under an Elastic Volume.
- :ivar healthy: Backup health status.
- :vartype healthy: bool
- :ivar relationship_status: Status of the backup mirror relationship. Known values are: "Idle",
- "Transferring", "Failed", and "Unknown".
- :vartype relationship_status: str or ~azure.mgmt.netapp.models.VolumeBackupRelationshipStatus
- :ivar mirror_state: The status of the backup. Known values are: "Uninitialized", "Mirrored",
- and "Broken".
- :vartype mirror_state: str or ~azure.mgmt.netapp.models.MirrorState
- :ivar unhealthy_reason: Reason for the unhealthy backup relationship.
- :vartype unhealthy_reason: str
- :ivar error_message: Displays error message if the backup is in an error state.
- :vartype error_message: str
- :ivar last_transfer_size: Displays the last transfer size.
- :vartype last_transfer_size: int
- :ivar last_transfer_type: Displays the last transfer type.
- :vartype last_transfer_type: str
- :ivar total_transfer_bytes: Displays the total bytes transferred.
- :vartype total_transfer_bytes: int
- :ivar transfer_progress_bytes: Displays the total number of bytes transferred for the ongoing
- operation.
- :vartype transfer_progress_bytes: int
+ :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
"""
- healthy: Optional[bool] = rest_field(visibility=["read"])
- """Backup health status."""
- relationship_status: Optional[Union[str, "_models.VolumeBackupRelationshipStatus"]] = rest_field(
- name="relationshipStatus", visibility=["read"]
+ properties: Optional["_models.ElasticSnapshotProperties"] = rest_field(
+ visibility=["read", "create", "update", "delete", "query"]
)
- """Status of the backup mirror relationship. Known values are: \"Idle\", \"Transferring\",
- \"Failed\", and \"Unknown\"."""
- mirror_state: Optional[Union[str, "_models.MirrorState"]] = rest_field(name="mirrorState", visibility=["read"])
- """The status of the backup. Known values are: \"Uninitialized\", \"Mirrored\", and \"Broken\"."""
- unhealthy_reason: Optional[str] = rest_field(name="unhealthyReason", visibility=["read"])
- """Reason for the unhealthy backup relationship."""
- error_message: Optional[str] = rest_field(name="errorMessage", visibility=["read"])
- """Displays error message if the backup is in an error state."""
- last_transfer_size: Optional[int] = rest_field(name="lastTransferSize", visibility=["read"])
- """Displays the last transfer size."""
- 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."""
+ """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 BackupVault(TrackedResource):
- """Backup Vault information.
+
+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}.
@@ -1051,16 +4092,24 @@ class BackupVault(TrackedResource):
: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
+ :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.BackupVaultProperties"] = rest_field(
+ properties: Optional["_models.ElasticSnapshotPolicyProperties"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
- """Backup Vault Properties."""
-
- __flattened_items = ["provisioning_state"]
+ """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__(
@@ -1068,7 +4117,7 @@ def __init__(
*,
location: str,
tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.BackupVaultProperties"] = None,
+ properties: Optional["_models.ElasticSnapshotPolicyProperties"] = None,
) -> None: ...
@overload
@@ -1079,42 +4128,119 @@ 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 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 BackupVaultPatch(_Model):
- """Backup Vault information.
+class ElasticSnapshotPolicyMonthlySchedule(_Model):
+ """Monthly Schedule properties used to create NetApp snapshot policy.
- :ivar tags: Resource tags.
- :vartype tags: dict[str, str]
+ :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
"""
- tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Resource tags."""
+ 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,
*,
- tags: Optional[dict[str, str]] = None,
+ snapshots_to_keep: Optional[int] = None,
+ days_of_month: Optional[list[int]] = None,
+ hour: Optional[int] = None,
+ minute: Optional[int] = None,
) -> None: ...
@overload
@@ -1128,41 +4254,61 @@ 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.
+class ElasticSnapshotPolicyProperties(_Model):
+ """Elastic Snapshot policy properties.
- :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
+ :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
"""
- 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"]
+ hourly_schedule: Optional["_models.ElasticSnapshotPolicyHourlySchedule"] = rest_field(
+ name="hourlySchedule", 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."""
+ """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"]
+ )
+ """Azure lifecycle management. Known values are: \"Accepted\", \"Creating\", \"Patching\",
+ \"Updating\", \"Deleting\", \"Moving\", \"Failed\", and \"Succeeded\"."""
@overload
def __init__(
self,
*,
- client_ip: Optional[str] = None,
- confirm_running_disruptive_operation: Optional[bool] = None,
+ 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,
) -> None: ...
@overload
@@ -1176,25 +4322,42 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class BreakReplicationRequest(_Model):
- """Break replication request.
+class ElasticSnapshotPolicyWeeklySchedule(_Model):
+ """Weekly Schedule properties used to create NetApp snapshot policy.
- :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
+ :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
"""
- force_break_replication: Optional[bool] = rest_field(
- name="forceBreakReplication", visibility=["read", "create", "update", "delete", "query"]
+ snapshots_to_keep: Optional[int] = rest_field(
+ name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"]
)
- """If replication is in status transferring and you want to force break the replication, set to
- true."""
+ """Weekly snapshot count to keep."""
+ days: Optional[list[Union[str, "_models.DayOfWeek"]]] = rest_field(
+ 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."""
@overload
def __init__(
self,
*,
- force_break_replication: Optional[bool] = None,
+ snapshots_to_keep: Optional[int] = None,
+ days: Optional[list[Union[str, "_models.DayOfWeek"]]] = None,
+ hour: Optional[int] = None,
+ minute: Optional[int] = None,
) -> None: ...
@overload
@@ -1208,8 +4371,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class CapacityPool(TrackedResource):
- """Capacity pool resource.
+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.
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
@@ -1226,43 +4404,37 @@ class CapacityPool(TrackedResource):
: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
+ :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
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
+ (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: "_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
+ 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
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",
- ]
+ 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.PoolProperties",
tags: Optional[dict[str, str]] = None,
+ properties: Optional["_models.ElasticVolumeProperties"] = None,
+ zones: Optional[list[str]] = None,
) -> None: ...
@overload
@@ -1273,68 +4445,80 @@ 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 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
+ """
-class CapacityPoolPatch(_Model):
- """Capacity pool patch resource.
+ 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."""
- :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
+ @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)
+
+
+class ElasticVolumeDataProtectionPatchProperties(_Model): # pylint: disable=name-too-long
+ """Data protection configuration option for updating the volume, including snapshot policies and
+ backup.
+
+ :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
"""
- 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(
+ snapshot: Optional["_models.ElasticVolumeSnapshotProperties"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
- """Capacity pool properties."""
-
- __flattened_items = ["size", "qos_type", "cool_access", "custom_throughput_mibps"]
+ """Used to apply a snapshot policy to a volume."""
+ backup: Optional["_models.ElasticVolumeBackupProperties"] = rest_field(
+ visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Used to configure backups on an elastic volume."""
@overload
def __init__(
self,
*,
- location: Optional[str] = None,
- tags: Optional[dict[str, str]] = None,
- properties: Optional["_models.PoolPatchProperties"] = None,
+ snapshot: Optional["_models.ElasticVolumeSnapshotProperties"] = None,
+ backup: Optional["_models.ElasticVolumeBackupProperties"] = None,
) -> None: ...
@overload
@@ -1345,66 +4529,33 @@ 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 ChangeKeyVault(_Model):
- """Change key vault request.
+class ElasticVolumeDataProtectionProperties(_Model):
+ """Data protection configuration option for the volume, including snapshot policies and backup.
- :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]
+ :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
"""
- 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"]
+ snapshot: Optional["_models.ElasticVolumeSnapshotProperties"] = 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 apply a snapshot policy to a volume."""
+ backup: Optional["_models.ElasticVolumeBackupProperties"] = rest_field(
+ 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."""
+ """Used to configure backups on an elastic volume."""
@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,
+ snapshot: Optional["_models.ElasticVolumeSnapshotProperties"] = None,
+ backup: Optional["_models.ElasticVolumeBackupProperties"] = None,
) -> None: ...
@overload
@@ -1418,47 +4569,110 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class CheckAvailabilityResponse(_Model):
- """Information regarding availability of a resource.
+class ElasticVolumeProperties(_Model):
+ """Elastic Volume properties.
- :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
+ :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
"""
- is_available: Optional[bool] = rest_field(
- name="isAvailable", visibility=["read", "create", "update", "delete", "query"]
+ 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"]
)
- """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"]
+ """Set of export policy rules."""
+ protocol_types: list[Union[str, "_models.ElasticProtocolType"]] = rest_field(
+ name="protocolTypes", 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."""
+ """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"]
+ )
+ """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"]
+ )
+ """The current state of the restoration process. Known values are: \"Restoring\", \"Restored\",
+ and \"Failed\"."""
@overload
def __init__(
self,
*,
- is_available: Optional[bool] = None,
- reason: Optional[Union[str, "_models.InAvailabilityReasonType"]] = None,
- message: Optional[str] = None,
+ 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,
) -> None: ...
@overload
@@ -1472,26 +4686,21 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class ClusterPeerCommandResponse(_Model):
- """Information about cluster peering process.
+class ElasticVolumeRevert(_Model):
+ """Reverts the elastic volume to the specified snapshot.
- :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
+ :ivar snapshot_resource_id: Resource identifier used to identify the Elastic Snapshot.
+ :vartype snapshot_resource_id: 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."""
+ snapshot_resource_id: Optional[str] = rest_field(name="snapshotResourceId", visibility=["read", "create"])
+ """Resource identifier used to identify the Elastic Snapshot."""
@overload
def __init__(
self,
*,
- peer_accept_command: Optional[str] = None,
+ snapshot_resource_id: Optional[str] = None,
) -> None: ...
@overload
@@ -1505,38 +4714,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class DailySchedule(_Model):
- """Daily Schedule properties.
+class ElasticVolumeSnapshotProperties(_Model):
+ """Elastic Volume Snapshot 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
+ :ivar snapshot_policy_resource_id: Snapshot Policy ResourceId.
+ :vartype snapshot_policy_resource_id: str
"""
- snapshots_to_keep: Optional[int] = rest_field(
- name="snapshotsToKeep", visibility=["read", "create", "update", "delete", "query"]
+ snapshot_policy_resource_id: Optional[str] = rest_field(
+ name="snapshotPolicyResourceId", 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."""
+ """Snapshot Policy ResourceId."""
@overload
def __init__(
self,
*,
- snapshots_to_keep: Optional[int] = None,
- hour: Optional[int] = None,
- minute: Optional[int] = None,
- used_bytes: Optional[int] = None,
+ snapshot_policy_resource_id: Optional[str] = None,
) -> None: ...
@overload
@@ -1550,42 +4744,28 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class DestinationReplication(_Model):
- """Destination replication properties.
+class ElasticVolumeUpdate(_Model):
+ """The type used for update operations of the ElasticVolume.
- :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
+ :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
"""
- 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"]
+ 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"]
)
- """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."""
+ """The resource-specific properties for this resource."""
@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,
+ tags: Optional[dict[str, str]] = None,
+ properties: Optional["_models.ElasticVolumeUpdateProperties"] = None,
) -> None: ...
@overload
@@ -1599,28 +4779,56 @@ 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.
+class ElasticVolumeUpdateProperties(_Model):
+ """The updatable properties of the ElasticVolume.
- :ivar name: Display name of dimension.
- :vartype name: str
- :ivar display_name: Display name of dimension.
- :vartype display_name: 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.
+ :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
"""
- 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"]
+ 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"]
)
- """Display name of dimension."""
+ """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"]
+ )
+ """SMB Properties."""
@overload
def __init__(
self,
*,
- name: Optional[str] = None,
- display_name: Optional[str] = None,
+ 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,
) -> None: ...
@overload
@@ -1968,6 +5176,45 @@ 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.
@@ -2258,6 +5505,66 @@ 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"]
+ )
+ """The CN host name used while generating the certificate, LDAP Over TLS requires the CN host name
+ to create DNS host entry."""
+
+ @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,
+ ) -> 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 LdapSearchScopeOpt(_Model):
"""LDAP search scope.
@@ -2300,6 +5607,36 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
+class ListQuotaReportResponse(_Model):
+ """Quota Report for volume.
+
+ :ivar value: List of quota reports.
+ :vartype value: list[~azure.mgmt.netapp.models.QuotaReport]
+ """
+
+ value: Optional[list["_models.QuotaReport"]] = rest_field(
+ visibility=["read", "create", "update", "delete", "query"]
+ )
+ """List of quota reports."""
+
+ @overload
+ def __init__(
+ self,
+ *,
+ value: Optional[list["_models.QuotaReport"]] = 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 ListReplicationsRequest(_Model):
"""Body for the list replications endpoint. If supplied, the body will be used as a filter for
example to exclude deleted replications. If omitted, the endpoint returns all replications.
@@ -2695,6 +6032,7 @@ class NetAppAccount(TrackedResource):
"disable_showmount",
"nfs_v4_id_domain",
"multi_ad_status",
+ "ldap_configuration",
]
@overload
@@ -2781,6 +6119,7 @@ class NetAppAccountPatch(_Model):
"disable_showmount",
"nfs_v4_id_domain",
"multi_ad_status",
+ "ldap_configuration",
]
@overload
@@ -2895,6 +6234,39 @@ 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.
@@ -3069,6 +6441,60 @@ 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.
@@ -3100,6 +6526,50 @@ 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.
@@ -3325,20 +6795,256 @@ class QueryNetworkSiblingSetRequest(_Model):
network_sibling_set_id: str = rest_field(
name="networkSiblingSetId", visibility=["read", "create", "update", "delete", "query"]
)
- """Network Sibling Set ID for a group of volumes sharing networking resources in a subnet.
- Required."""
- subnet_id: str = rest_field(name="subnetId", visibility=["read", "create"])
- """The Azure Resource URI for a delegated subnet. Must have the delegation
- Microsoft.NetApp/volumes. Example
- /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}.
- Required."""
+ """Network Sibling Set ID for a group of volumes sharing networking resources in a subnet.
+ Required."""
+ subnet_id: str = rest_field(name="subnetId", visibility=["read", "create"])
+ """The Azure Resource URI for a delegated subnet. Must have the delegation
+ Microsoft.NetApp/volumes. Example
+ /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}.
+ Required."""
+
+ @overload
+ def __init__(
+ self,
+ *,
+ network_sibling_set_id: str,
+ subnet_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 QuotaAvailabilityRequest(_Model):
+ """Quota availability request content.
+
+ :ivar name: Name of the resource to verify. Required.
+ :vartype name: str
+ :ivar type: Resource type used for verification. Required. Known values are:
+ "Microsoft.NetApp/netAppAccounts", "Microsoft.NetApp/netAppAccounts/capacityPools",
+ "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
+ "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots",
+ "Microsoft.NetApp/netAppAccounts/backupVaults/backups", and
+ "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups".
+ :vartype type: str or ~azure.mgmt.netapp.models.CheckQuotaNameResourceTypes
+ :ivar resource_group: Resource group name. Required.
+ :vartype resource_group: str
+ """
+
+ name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """Name of the resource to verify. Required."""
+ type: Union[str, "_models.CheckQuotaNameResourceTypes"] = rest_field(
+ visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Resource type used for verification. Required. Known values are:
+ \"Microsoft.NetApp/netAppAccounts\", \"Microsoft.NetApp/netAppAccounts/capacityPools\",
+ \"Microsoft.NetApp/netAppAccounts/capacityPools/volumes\",
+ \"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\",
+ \"Microsoft.NetApp/netAppAccounts/backupVaults/backups\", and
+ \"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups\"."""
+ resource_group: str = rest_field(name="resourceGroup", visibility=["read", "create", "update", "delete", "query"])
+ """Resource group name. Required."""
+
+ @overload
+ def __init__(
+ self,
+ *,
+ name: str,
+ type: Union[str, "_models.CheckQuotaNameResourceTypes"],
+ resource_group: 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 QuotaItem(ProxyResource):
+ """Information regarding Quota Item.
+
+ :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: QuotaItem properties.
+ :vartype properties: ~azure.mgmt.netapp.models.QuotaItemProperties
+ """
+
+ properties: Optional["_models.QuotaItemProperties"] = rest_field(
+ visibility=["read", "create", "update", "delete", "query"]
+ )
+ """QuotaItem properties."""
+
+ __flattened_items = ["current", "default", "usage"]
+
+ @overload
+ def __init__(
+ self,
+ *,
+ properties: Optional["_models.QuotaItemProperties"] = 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 QuotaItemProperties(_Model):
+ """QuotaItem Properties.
+
+ :ivar current: The current quota value.
+ :vartype current: int
+ :ivar default: The default quota value.
+ :vartype default: int
+ :ivar usage: The usage quota value.
+ :vartype usage: int
+ """
+
+ current: Optional[int] = rest_field(visibility=["read"])
+ """The current quota value."""
+ default: Optional[int] = rest_field(visibility=["read"])
+ """The default quota value."""
+ usage: Optional[int] = rest_field(visibility=["read"])
+ """The usage quota value."""
+
+
+class QuotaReport(_Model):
+ """Quota report record properties.
+
+ :ivar quota_type: Type of quota. Known values are: "DefaultUserQuota", "DefaultGroupQuota",
+ "IndividualUserQuota", and "IndividualGroupQuota".
+ :vartype quota_type: str or ~azure.mgmt.netapp.models.Type
+ :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 .
+ :vartype quota_target: str
+ :ivar quota_limit_used_in_ki_bs: Specifies the current usage in kibibytes for the user/group
+ quota.
+ :vartype quota_limit_used_in_ki_bs: int
+ :ivar quota_limit_total_in_ki_bs: Specifies the total size limit in kibibytes for the
+ user/group quota.
+ :vartype quota_limit_total_in_ki_bs: int
+ :ivar percentage_used: Percentage of used size compared to total size.
+ :vartype percentage_used: float
+ :ivar is_derived_quota: Flag to indicate whether the quota is derived from default quota.
+ :vartype is_derived_quota: bool
+ """
+
+ quota_type: Optional[Union[str, "_models.Type"]] = rest_field(
+ name="quotaType", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Type of quota. 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 ."""
+ quota_limit_used_in_ki_bs: Optional[int] = rest_field(
+ name="quotaLimitUsedInKiBs", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Specifies the current usage in kibibytes for the user/group quota."""
+ quota_limit_total_in_ki_bs: Optional[int] = rest_field(
+ name="quotaLimitTotalInKiBs", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Specifies the total size limit in kibibytes for the user/group quota."""
+ percentage_used: Optional[float] = rest_field(
+ name="percentageUsed", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Percentage of used size compared to total size."""
+ is_derived_quota: Optional[bool] = rest_field(
+ name="isDerivedQuota", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Flag to indicate whether the quota is derived from default quota."""
+
+ @overload
+ def __init__(
+ self,
+ *,
+ quota_type: Optional[Union[str, "_models.Type"]] = None,
+ quota_target: Optional[str] = None,
+ quota_limit_used_in_ki_bs: Optional[int] = None,
+ quota_limit_total_in_ki_bs: Optional[int] = None,
+ percentage_used: Optional[float] = None,
+ is_derived_quota: 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 RansomwareProtectionPatchSettings(_Model):
+ """Advanced Ransomware Protection reports (ARP) updatable settings.
+
+ :ivar desired_ransomware_protection_state: The desired value of the ARP feature state available
+ to the volume. Known values are: "Disabled" and "Enabled".
+ :vartype desired_ransomware_protection_state: str or
+ ~azure.mgmt.netapp.models.DesiredRansomwareProtectionState
+ """
+
+ desired_ransomware_protection_state: Optional[Union[str, "_models.DesiredRansomwareProtectionState"]] = rest_field(
+ name="desiredRansomwareProtectionState", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """The desired value of the ARP feature state available to the volume. Known values are:
+ \"Disabled\" and \"Enabled\"."""
@overload
def __init__(
self,
*,
- network_sibling_set_id: str,
- subnet_id: str,
+ desired_ransomware_protection_state: Optional[Union[str, "_models.DesiredRansomwareProtectionState"]] = None,
) -> None: ...
@overload
@@ -3352,43 +7058,36 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class QuotaAvailabilityRequest(_Model):
- """Quota availability request content.
+class RansomwareProtectionSettings(_Model):
+ """Advanced Ransomware Protection reports (ARP) settings.
- :ivar name: Name of the resource to verify. Required.
- :vartype name: str
- :ivar type: Resource type used for verification. Required. Known values are:
- "Microsoft.NetApp/netAppAccounts", "Microsoft.NetApp/netAppAccounts/capacityPools",
- "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
- "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots",
- "Microsoft.NetApp/netAppAccounts/backupVaults/backups", and
- "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups".
- :vartype type: str or ~azure.mgmt.netapp.models.CheckQuotaNameResourceTypes
- :ivar resource_group: Resource group name. Required.
- :vartype resource_group: str
+ :ivar desired_ransomware_protection_state: The desired value of the Advanced Ransomware
+ Protection feature state available to the volume. Known values are: "Disabled" and "Enabled".
+ :vartype desired_ransomware_protection_state: str or
+ ~azure.mgmt.netapp.models.DesiredRansomwareProtectionState
+ :ivar actual_ransomware_protection_state: The actual state of the Advanced Ransomware
+ Protection feature currently active on the volume. Known values are: "Disabled", "Enabled",
+ "Learning", and "Paused".
+ :vartype actual_ransomware_protection_state: str or
+ ~azure.mgmt.netapp.models.ActualRansomwareProtectionState
"""
- name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
- """Name of the resource to verify. Required."""
- type: Union[str, "_models.CheckQuotaNameResourceTypes"] = rest_field(
- visibility=["read", "create", "update", "delete", "query"]
+ desired_ransomware_protection_state: Optional[Union[str, "_models.DesiredRansomwareProtectionState"]] = rest_field(
+ name="desiredRansomwareProtectionState", visibility=["read", "create", "update", "delete", "query"]
)
- """Resource type used for verification. Required. Known values are:
- \"Microsoft.NetApp/netAppAccounts\", \"Microsoft.NetApp/netAppAccounts/capacityPools\",
- \"Microsoft.NetApp/netAppAccounts/capacityPools/volumes\",
- \"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\",
- \"Microsoft.NetApp/netAppAccounts/backupVaults/backups\", and
- \"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups\"."""
- resource_group: str = rest_field(name="resourceGroup", visibility=["read", "create", "update", "delete", "query"])
- """Resource group name. Required."""
+ """The desired value of the Advanced Ransomware Protection feature state available to the volume.
+ Known values are: \"Disabled\" and \"Enabled\"."""
+ actual_ransomware_protection_state: Optional[Union[str, "_models.ActualRansomwareProtectionState"]] = rest_field(
+ name="actualRansomwareProtectionState", visibility=["read"]
+ )
+ """The actual state of the Advanced Ransomware Protection feature currently active on the volume.
+ Known values are: \"Disabled\", \"Enabled\", \"Learning\", and \"Paused\"."""
@overload
def __init__(
self,
*,
- name: str,
- type: Union[str, "_models.CheckQuotaNameResourceTypes"],
- resource_group: str,
+ desired_ransomware_protection_state: Optional[Union[str, "_models.DesiredRansomwareProtectionState"]] = None,
) -> None: ...
@overload
@@ -3402,8 +7101,14 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
-class QuotaItem(ProxyResource):
- """Information regarding Quota Item.
+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.
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
@@ -3416,22 +7121,20 @@ class QuotaItem(ProxyResource):
:ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
information.
:vartype system_data: ~azure.mgmt.netapp.models.SystemData
- :ivar properties: QuotaItem properties.
- :vartype properties: ~azure.mgmt.netapp.models.QuotaItemProperties
+ :ivar properties: Advanced Ransomware Protection reports Properties.
+ :vartype properties: ~azure.mgmt.netapp.models.RansomwareReportProperties
"""
- properties: Optional["_models.QuotaItemProperties"] = rest_field(
+ properties: Optional["_models.RansomwareReportProperties"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
- """QuotaItem properties."""
-
- __flattened_items = ["current", "default", "usage"]
+ """Advanced Ransomware Protection reports Properties."""
@overload
def __init__(
self,
*,
- properties: Optional["_models.QuotaItemProperties"] = None,
+ properties: Optional["_models.RansomwareReportProperties"] = None,
) -> None: ...
@overload
@@ -3442,44 +7145,117 @@ 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 RansomwareReportProperties(_Model):
+ """Advanced Ransomware Protection (ARP) report properties.
+
+ Evaluate the report to determine whether the activity is acceptable (false positive) or whether
+ an attack seems malicious using the ClearSuspects operation.
+
+ Advanced Ransomware Protection (ARP) creates snapshots named Anti_ransomware_backup when it
+ detects a potential ransomware threat. You can use one of the ARP snapshots or another snapshot
+ of your volume to restore data.
+
+ :ivar event_time: The creation date and time of the report.
+ :vartype event_time: ~datetime.datetime
+ :ivar state: State of the Advanced Ransomware Protection (ARP) report. Known values are:
+ "Active" and "Resolved".
+ :vartype state: str or ~azure.mgmt.netapp.models.RansomwareReportState
+ :ivar severity: Severity of the Advanced Ransomware Protection (ARP) report. Known values are:
+ "None", "Low", "Moderate", and "High".
+ :vartype severity: str or ~azure.mgmt.netapp.models.RansomwareReportSeverity
+ :ivar cleared_count: The number of cleared suspects identified by the ARP report.
+ :vartype cleared_count: int
+ :ivar reported_count: The number of suspects identified by the ARP report.
+ :vartype reported_count: int
+ :ivar suspects: Suspects identified in an ARP report.
+ :vartype suspects: list[~azure.mgmt.netapp.models.RansomwareSuspects]
+ :ivar provisioning_state: Azure lifecycle management.
+ :vartype provisioning_state: str
+ """
+ event_time: Optional[datetime.datetime] = rest_field(name="eventTime", visibility=["read"], format="rfc3339")
+ """The creation date and time of the report."""
+ state: Optional[Union[str, "_models.RansomwareReportState"]] = rest_field(visibility=["read"])
+ """State of the Advanced Ransomware Protection (ARP) report. Known values are: \"Active\" and
+ \"Resolved\"."""
+ severity: Optional[Union[str, "_models.RansomwareReportSeverity"]] = rest_field(visibility=["read"])
+ """Severity of the Advanced Ransomware Protection (ARP) report. Known values are: \"None\",
+ \"Low\", \"Moderate\", and \"High\"."""
+ cleared_count: Optional[int] = rest_field(name="clearedCount", visibility=["read"])
+ """The number of cleared suspects identified by the ARP report."""
+ reported_count: Optional[int] = rest_field(name="reportedCount", visibility=["read"])
+ """The number of suspects identified by the ARP report."""
+ suspects: Optional[list["_models.RansomwareSuspects"]] = rest_field(visibility=["read"])
+ """Suspects identified in an ARP report."""
+ provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"])
+ """Azure lifecycle management."""
-class QuotaItemProperties(_Model):
- """QuotaItem Properties.
- :ivar current: The current quota value.
- :vartype current: int
- :ivar default: The default quota value.
- :vartype default: int
- :ivar usage: The usage quota value.
- :vartype usage: int
+class RansomwareSuspects(_Model):
+ """List of suspects identified in an Advanced Ransomware Protection (ARP) report.
+
+ :ivar extension: Suspect File extension.
+ :vartype extension: str
+ :ivar resolution: ARP report suspect resolution. Known values are: "PotentialThreat" and
+ "FalsePositive".
+ :vartype resolution: str or ~azure.mgmt.netapp.models.RansomwareSuspectResolution
+ :ivar file_count: The number of suspect files at the time of ARP report, this number can change
+ as files get created and report status progresses.
+ :vartype file_count: int
+ :ivar suspect_files: Suspect files.
+ :vartype suspect_files: list[~azure.mgmt.netapp.models.SuspectFile]
"""
- current: Optional[int] = rest_field(visibility=["read"])
- """The current quota value."""
- default: Optional[int] = rest_field(visibility=["read"])
- """The default quota value."""
- usage: Optional[int] = rest_field(visibility=["read"])
- """The usage quota value."""
+ extension: Optional[str] = rest_field(visibility=["read"])
+ """Suspect File extension."""
+ resolution: Optional[Union[str, "_models.RansomwareSuspectResolution"]] = rest_field(visibility=["read"])
+ """ARP report suspect resolution. Known values are: \"PotentialThreat\" and \"FalsePositive\"."""
+ file_count: Optional[int] = rest_field(name="fileCount", visibility=["read"])
+ """The number of suspect files at the time of ARP report, this number can change as files get
+ created and report status progresses."""
+ suspect_files: Optional[list["_models.SuspectFile"]] = rest_field(name="suspectFiles", visibility=["read"])
+ """Suspect files."""
+
+
+class RansomwareSuspectsClearRequest(_Model):
+ """Clear suspects for Advanced Ransomware Protection (ARP) report.
+
+ :ivar resolution: ARP report suspect resolution. Required. Known values are: "PotentialThreat"
+ and "FalsePositive".
+ :vartype resolution: str or ~azure.mgmt.netapp.models.RansomwareSuspectResolution
+ :ivar extensions: List of file extensions resolved (PotentialThreat or FalsePositive).
+ Required.
+ :vartype extensions: list[str]
+ """
+
+ resolution: Union[str, "_models.RansomwareSuspectResolution"] = rest_field(
+ visibility=["read", "create", "update", "delete", "query"]
+ )
+ """ARP report suspect resolution. Required. Known values are: \"PotentialThreat\" and
+ \"FalsePositive\"."""
+ extensions: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
+ """List of file extensions resolved (PotentialThreat or FalsePositive). Required."""
+
+ @overload
+ def __init__(
+ self,
+ *,
+ resolution: Union[str, "_models.RansomwareSuspectResolution"],
+ extensions: list[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 ReestablishReplicationRequest(_Model):
@@ -3819,6 +7595,24 @@ 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"])
@@ -3842,6 +7636,27 @@ 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__(
@@ -4010,6 +7825,116 @@ 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.
@@ -4047,6 +7972,58 @@ 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.
@@ -4773,6 +8750,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
+class SuspectFile(_Model):
+ """Suspect file information.
+
+ :ivar suspect_file_name: Suspect filename.
+ :vartype suspect_file_name: str
+ :ivar file_timestamp: The creation date and time of the file.
+ :vartype file_timestamp: ~datetime.datetime
+ """
+
+ suspect_file_name: Optional[str] = rest_field(name="suspectFileName", visibility=["read"])
+ """Suspect filename."""
+ file_timestamp: Optional[datetime.datetime] = rest_field(
+ name="fileTimestamp", visibility=["read"], format="rfc3339"
+ )
+ """The creation date and time of the file."""
+
+
class SvmPeerCommandResponse(_Model):
"""Information about svm peering process.
@@ -5132,6 +9126,7 @@ 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",
@@ -5155,8 +9150,11 @@ 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
@@ -5620,6 +9618,7 @@ 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",
@@ -5643,8 +9642,11 @@ 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
@@ -5784,8 +9786,11 @@ 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. 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.
+ For extra large volumes, valid values are in the range 2400GiB to 7200TiB. 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
@@ -5857,9 +9862,11 @@ 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. 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.
+ For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in
+ bytes as multiples of 1 GiB."""
export_policy: Optional["_models.VolumePatchPropertiesExportPolicy"] = rest_field(
name="exportPolicy", visibility=["read", "create", "update", "delete", "query"]
)
@@ -5984,6 +9991,8 @@ class VolumePatchPropertiesDataProtection(_Model):
:vartype backup: ~azure.mgmt.netapp.models.VolumeBackupProperties
:ivar snapshot: Snapshot properties.
:vartype snapshot: ~azure.mgmt.netapp.models.VolumeSnapshotProperties
+ :ivar ransomware_protection: Advanced Ransomware Protection updatable settings.
+ :vartype ransomware_protection: ~azure.mgmt.netapp.models.RansomwareProtectionPatchSettings
"""
backup: Optional["_models.VolumeBackupProperties"] = rest_field(
@@ -5994,6 +10003,10 @@ class VolumePatchPropertiesDataProtection(_Model):
visibility=["read", "create", "update", "delete", "query"]
)
"""Snapshot properties."""
+ ransomware_protection: Optional["_models.RansomwareProtectionPatchSettings"] = rest_field(
+ name="ransomwareProtection", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Advanced Ransomware Protection updatable settings."""
@overload
def __init__(
@@ -6001,6 +10014,7 @@ def __init__(
*,
backup: Optional["_models.VolumeBackupProperties"] = None,
snapshot: Optional["_models.VolumeSnapshotProperties"] = None,
+ ransomware_protection: Optional["_models.RansomwareProtectionPatchSettings"] = None,
) -> None: ...
@overload
@@ -6057,9 +10071,11 @@ 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. 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.
+ For extra large volumes, valid values are in the range 2400GiB to 7200TiB. 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
@@ -6151,6 +10167,9 @@ 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
@@ -6231,11 +10250,31 @@ 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"])
@@ -6249,9 +10288,11 @@ 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. 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.
+ For extra large volumes, valid values are in the range 2400GiB to 7200TiB. 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"]
)
@@ -6366,6 +10407,11 @@ 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"]
)
@@ -6469,10 +10515,38 @@ 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
@@ -6504,6 +10578,7 @@ 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,
@@ -6519,6 +10594,9 @@ 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
@@ -6543,6 +10621,8 @@ class VolumePropertiesDataProtection(_Model):
:vartype snapshot: ~azure.mgmt.netapp.models.VolumeSnapshotProperties
:ivar volume_relocation: VolumeRelocation properties.
:vartype volume_relocation: ~azure.mgmt.netapp.models.VolumeRelocationProperties
+ :ivar ransomware_protection: Advanced Ransomware Protection settings.
+ :vartype ransomware_protection: ~azure.mgmt.netapp.models.RansomwareProtectionSettings
"""
backup: Optional["_models.VolumeBackupProperties"] = rest_field(
@@ -6561,6 +10641,10 @@ class VolumePropertiesDataProtection(_Model):
name="volumeRelocation", visibility=["read", "create", "update", "delete", "query"]
)
"""VolumeRelocation properties."""
+ ransomware_protection: Optional["_models.RansomwareProtectionSettings"] = rest_field(
+ name="ransomwareProtection", visibility=["read", "create", "update", "delete", "query"]
+ )
+ """Advanced Ransomware Protection settings."""
@overload
def __init__(
@@ -6570,6 +10654,7 @@ def __init__(
replication: Optional["_models.ReplicationObject"] = None,
snapshot: Optional["_models.VolumeSnapshotProperties"] = None,
volume_relocation: Optional["_models.VolumeRelocationProperties"] = None,
+ ransomware_protection: Optional["_models.RansomwareProtectionSettings"] = None,
) -> None: ...
@overload
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 35c12577bc79..dc8916780c55 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
@@ -21,7 +21,19 @@
from ._operations import SnapshotPoliciesOperations # type: ignore
from ._operations import BackupPoliciesOperations # type: ignore
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
@@ -47,7 +59,19 @@
"SnapshotPoliciesOperations",
"BackupPoliciesOperations",
"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 0f69e59593a5..59826748368f 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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ 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}/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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ 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}"
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ 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}"
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ 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}/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"))
+ 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}/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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ 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}/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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ 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}/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"))
+ 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}/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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ 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}/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"))
+ 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}/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"))
+ 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}/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"))
+ 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}/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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
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"))
+ 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}/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"))
+ 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}/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"))
+ 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}/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"))
+ 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}/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"))
+ 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}/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"))
+ 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}/revertRelocation"
path_format_arguments = {
@@ -1251,6 +1251,36 @@ def build_volumes_revert_relocation_request(
return HttpRequest(method="POST", url=_url, params=_params, **kwargs)
+def build_volumes_list_quota_report_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}/listQuotaReport"
+ 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="POST", url=_url, params=_params, headers=_headers, **kwargs)
+
+
def build_snapshots_get_request(
resource_group_name: str,
account_name: str,
@@ -1263,7 +1293,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1301,7 +1331,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1341,7 +1371,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1379,7 +1409,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"))
+ 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}/snapshots/{snapshotName}"
path_format_arguments = {
@@ -1405,7 +1435,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1442,7 +1472,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"))
+ 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}/snapshots/{snapshotName}/restoreFiles"
path_format_arguments = {
@@ -1472,7 +1502,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1502,7 +1532,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1534,7 +1564,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1564,7 +1594,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"))
+ 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}/snapshotPolicies/{snapshotPolicyName}"
path_format_arguments = {
@@ -1588,7 +1618,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1616,7 +1646,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1645,7 +1675,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1675,7 +1705,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1707,7 +1737,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1737,7 +1767,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"))
+ 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}/backupPolicies/{backupPolicyName}"
path_format_arguments = {
@@ -1761,7 +1791,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1795,7 +1825,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1833,7 +1863,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1873,7 +1903,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1911,7 +1941,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"))
+ 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}/volumeQuotaRules/{volumeQuotaRuleName}"
path_format_arguments = {
@@ -1937,7 +1967,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"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -1961,22 +1991,30 @@ def build_volume_quota_rules_list_by_volume_request( # pylint: disable=name-too
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_backup_vaults_get_request(
- resource_group_name: str, account_name: str, backup_vault_name: str, subscription_id: str, **kwargs: Any
+def build_ransomware_reports_get_request(
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ ransomware_report_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"))
+ 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}/backupVaults/{backupVaultName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}"
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"),
+ "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
+ "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
+ "ransomwareReportName": _SERIALIZER.url("ransomware_report_name", ransomware_report_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -1990,23 +2028,23 @@ def build_backup_vaults_get_request(
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_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
+def build_ransomware_reports_list_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 {})
- 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"))
+ 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}/backupVaults/{backupVaultName}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports"
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"),
+ "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
@@ -2015,30 +2053,34 @@ def build_backup_vaults_create_or_update_request( # pylint: disable=name-too-lo
_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="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_backup_vaults_update_request(
- resource_group_name: str, account_name: str, backup_vault_name: str, subscription_id: str, **kwargs: Any
+def build_ransomware_reports_clear_suspects_request( # pylint: disable=name-too-long
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ ransomware_report_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"))
- accept = _headers.pop("Accept", "application/json")
-
+ 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}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}/clearSuspects"
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"),
+ "poolName": _SERIALIZER.url("pool_name", pool_name, "str"),
+ "volumeName": _SERIALIZER.url("volume_name", volume_name, "str"),
+ "ransomwareReportName": _SERIALIZER.url("ransomware_report_name", ransomware_report_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2049,49 +2091,26 @@ def build_backup_vaults_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_backup_vaults_delete_request(
+def build_backup_vaults_get_request(
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"))
- # Construct URL
- _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{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_backup_vaults_list_by_net_app_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"))
+ 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}/backupVaults"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{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
@@ -2105,23 +2124,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_net_app_resource_quota_limits_get_request( # pylint: disable=name-too-long
- location: str, quota_limit_name: str, subscription_id: str, **kwargs: Any
+def build_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 {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01"))
+ 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}/quotaLimits/{quotaLimitName}"
- )
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}"
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"),
+ "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
@@ -2130,25 +2149,30 @@ def build_net_app_resource_quota_limits_get_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="GET", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="PUT", 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
+def build_backup_vaults_update_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"))
+ 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}/quotaLimits"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "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
@@ -2157,25 +2181,26 @@ def build_net_app_resource_quota_limits_list_request( # pylint: disable=name-to
_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_net_app_resource_region_infos_get_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
+def build_backup_vaults_delete_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"))
- accept = _headers.pop("Accept", "application/json")
-
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
# Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos/default"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "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
@@ -2183,26 +2208,24 @@ def build_net_app_resource_region_infos_get_request( # pylint: disable=name-too
# 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)
+ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-def build_net_app_resource_region_infos_list_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
+def build_backup_vaults_list_by_net_app_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"))
+ 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"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "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
@@ -2216,21 +2239,30 @@ def build_net_app_resource_region_infos_list_request( # pylint: disable=name-to
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
+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
) -> 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"))
+ 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}"
+ _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
@@ -2244,22 +2276,31 @@ def build_accounts_get_request(
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
+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"))
+ 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}"
+ _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
@@ -2275,22 +2316,31 @@ def build_accounts_create_or_update_request(
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
+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
) -> 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"))
+ 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}"
+ _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
@@ -2306,18 +2356,27 @@ def build_accounts_update_request(
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
+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"))
+ 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}"
+ _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
@@ -2328,20 +2387,23 @@ def build_accounts_delete_request(
return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
-def build_accounts_list_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest:
+def build_buckets_list_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"))
+ 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"
- )
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets"
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
@@ -2355,19 +2417,31 @@ def build_accounts_list_request(resource_group_name: str, subscription_id: 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
+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
) -> 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"))
+ 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/netAppAccounts"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}/generateCredentials"
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
@@ -2376,23 +2450,30 @@ def build_accounts_list_by_subscription_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_accounts_renew_credentials_request(
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
+def build_caches_get_request(
+ resource_group_name: str, account_name: str, pool_name: str, cache_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"))
+ 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}/renewCredentials"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}"
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
@@ -2400,23 +2481,30 @@ def build_accounts_renew_credentials_request(
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- return HttpRequest(method="POST", url=_url, params=_params, **kwargs)
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-def build_accounts_transition_to_cmk_request(
- resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any
+
+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
) -> 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"))
+ 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}/transitiontocmk"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}"
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
@@ -2427,25 +2515,29 @@ def build_accounts_transition_to_cmk_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)
+ return HttpRequest(method="PUT", 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
+def build_caches_update_request(
+ resource_group_name: str, account_name: str, pool_name: str, cache_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"))
+ 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}/getKeyVaultStatus"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}"
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
@@ -2454,25 +2546,27 @@ def build_accounts_get_change_key_vault_information_request( # pylint: disable=
_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="PATCH", 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
+def build_caches_delete_request(
+ resource_group_name: str, account_name: str, pool_name: str, cache_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"))
+ 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"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}"
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
@@ -2480,27 +2574,25 @@ def build_accounts_change_key_vault_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")
-
- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="DELETE", url=_url, params=_params, **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
+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:
_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"))
+ 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}/migrateBackups"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches"
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
@@ -2509,28 +2601,28 @@ def build_backups_under_account_migrate_backups_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="POST", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="GET", 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
+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
) -> 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"))
+ 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}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/listPeeringPassphrases"
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
@@ -2541,26 +2633,27 @@ def build_pools_get_request(
# Construct headers
_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_pools_create_or_update_request(
- resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
+def build_caches_pool_change_request(
+ resource_group_name: str, account_name: str, pool_name: str, cache_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"))
+ 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}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/poolChange"
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
@@ -2573,26 +2666,24 @@ def build_pools_create_or_update_request(
_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_pools_update_request(
- resource_group_name: str, account_name: str, pool_name: str, subscription_id: str, **kwargs: Any
+def build_elastic_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 {})
- 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"))
+ 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}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{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"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2601,26 +2692,27 @@ def build_pools_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)
+ return HttpRequest(method="GET", 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
+def build_elastic_accounts_create_or_update_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"))
+ 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}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{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"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -2628,20 +2720,26 @@ def build_pools_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="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-def build_pools_list_request(
+def build_elastic_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 {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01"))
+ 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"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
@@ -2654,32 +2752,51 @@ def build_pools_list_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_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
+def build_elastic_accounts_delete_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"))
+ 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"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{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"),
- "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_accounts_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/elasticAccounts"
+ )
+ 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
@@ -2688,28 +2805,24 @@ def build_backups_under_backup_vault_restore_files_request( # pylint: disable=n
_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_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
+def build_elastic_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 {})
- 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"))
+ 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}/migrateBackups"
+ _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/elasticAccounts"
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
@@ -2718,36 +2831,27 @@ def build_backups_under_volume_migrate_backups_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="POST", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="GET", 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
+def build_elastic_capacity_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"))
+ 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}"
+ _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"),
- "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
@@ -2761,31 +2865,23 @@ def build_subvolumes_get_request(
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
+def build_elastic_capacity_pools_create_or_update_request( # pylint: disable=name-too-long
+ 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"))
+ 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}"
+ _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"),
- "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
@@ -2801,31 +2897,23 @@ def build_subvolumes_create_request(
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
+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
) -> 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"))
+ 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}"
+ _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"),
- "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
@@ -2841,27 +2929,19 @@ def build_subvolumes_update_request(
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
+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"))
+ 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}"
+ _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"),
- "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
@@ -2872,23 +2952,21 @@ def build_subvolumes_delete_request(
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
+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"))
+ 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"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools"
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
@@ -2902,30 +2980,23 @@ def build_subvolumes_list_by_volume_request(
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
+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
) -> 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"))
+ 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}/getMetadata"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/changeZone"
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
@@ -2934,26 +3005,30 @@ def build_subvolumes_get_metadata_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_net_app_resource_check_name_availability_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
+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
) -> 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"))
+ 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"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/checkVolumeFilePathAvailability"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "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
@@ -2969,21 +3044,23 @@ def build_net_app_resource_check_name_availability_request( # pylint: disable=n
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
+def build_elastic_volumes_get_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 {})
- 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"))
+ 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"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "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
@@ -2992,28 +3069,29 @@ def build_net_app_resource_check_file_path_availability_request( # pylint: disa
_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_net_app_resource_check_quota_availability_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
+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
) -> 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"))
+ 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"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "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
@@ -3026,23 +3104,27 @@ def build_net_app_resource_check_quota_availability_request( # pylint: disable=
_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="PUT", 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
+def build_elastic_volumes_update_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"))
+ 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}/regionInfo"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "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
@@ -3051,26 +3133,27 @@ def build_net_app_resource_query_region_info_request( # pylint: disable=name-to
_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_net_app_resource_query_network_sibling_set_request( # pylint: disable=name-too-long
- location: str, subscription_id: str, **kwargs: Any
+def build_elastic_volumes_delete_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 {})
- 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"))
- accept = _headers.pop("Accept", "application/json")
-
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
# Construct URL
- _url = "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/queryNetworkSiblingSet"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "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
@@ -3078,29 +3161,56 @@ def build_net_app_resource_query_network_sibling_set_request( # pylint: disable
# 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="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
+) -> 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/{poolName}/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"),
+ "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="POST", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="GET", 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
+def build_elastic_volumes_revert_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 {})
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"))
+ 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"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/revert"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "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
@@ -3116,20 +3226,30 @@ def build_net_app_resource_update_network_sibling_set_request( # pylint: disabl
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
+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
) -> 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"))
+ 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"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}"
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
- "location": _SERIALIZER.url("location", location, "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"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3143,21 +3263,31 @@ def build_net_app_resource_usages_list_request( # pylint: disable=name-too-long
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
+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
) -> 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"))
+ 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}/usages/{usageType}"
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}"
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"),
+ "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"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -3166,1024 +3296,13423 @@ def build_net_app_resource_usages_get_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="GET", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-class Operations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
+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
+) -> HttpRequest:
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`operations` attribute.
- """
+ 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}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}"
+ 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"),
+ }
- 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")
+ _url: str = _url.format(**path_format_arguments) # type: ignore
- @distributed_trace
- def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]:
- """List the operations for the provider.
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- :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 {}
+ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
- 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 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
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- def prepare_request(next_link=None):
- if not next_link:
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
- _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)
+ # Construct URL
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots"
+ 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"),
+ }
- 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)
+ _url: str = _url.format(**path_format_arguments) # type: ignore
- return _request
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- 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)
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- def get_next(next_link=None):
- _request = prepare_request(next_link)
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
- _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)
+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
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- return pipeline_response
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
- return ItemPaged(get_next, extract_data)
+ # Construct URL
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}"
+ 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
-class NetAppResourceQuotaLimitsAccountOperations: # pylint: disable=name-too-long
- """
- .. warning::
- **DO NOT** instantiate this class directly.
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`net_app_resource_quota_limits_account` attribute.
- """
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- 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 HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
- @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"],
- )
- 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 {})
+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
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- _headers = kwargs.pop("headers", {}) or {}
- _params = 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")
- cls: ClsType[_models.QuotaItem] = kwargs.pop("cls", None)
+ # Construct URL
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}"
+ 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"),
+ }
- _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)
+ _url: str = _url.format(**path_format_arguments) # type: ignore
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- response = pipeline_response.http_response
+ # 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")
- 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)
+ return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.QuotaItem, response.json())
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
+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
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- return deserialized # type: ignore
+ 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")
- @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"],
- )
- 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.
+ # Construct URL
+ _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}"
+ 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"),
+ }
- :param resource_group_name: 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 {}
+ _url: str = _url.format(**path_format_arguments) # type: ignore
- cls: ClsType[List[_models.QuotaItem]] = kwargs.pop("cls", None)
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- error_map: MutableMapping = {
- 401: ClientAuthenticationError,
- 404: ResourceNotFoundError,
- 409: ResourceExistsError,
- 304: ResourceNotModifiedError,
- }
- error_map.update(kwargs.pop("error_map", {}) or {})
+ # 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")
- def prepare_request(next_link=None):
- if not next_link:
+ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
- _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)
+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
+) -> HttpRequest:
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- return _request
+ 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}/elasticSnapshotPolicies/{snapshotPolicyName}"
+ 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"),
+ }
- 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)
+ _url: str = _url.format(**path_format_arguments) # type: ignore
- def get_next(next_link=None):
- _request = prepare_request(next_link)
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- _stream = False
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
- response = pipeline_response.http_response
+ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
- 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
+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 {})
- return ItemPaged(get_next, extract_data)
+ 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"),
+ }
-class VolumeGroupsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
+ _url: str = _url.format(**path_format_arguments) # type: ignore
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`volume_groups` attribute.
- """
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- 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")
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- @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.
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
- :param resource_group_name: 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 {}
+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 {})
- cls: ClsType[_models.VolumeGroupDetails] = kwargs.pop("cls", None)
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
- _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)
+ # 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"),
+ }
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
+ _url: str = _url.format(**path_format_arguments) # type: ignore
- response = pipeline_response.http_response
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- 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)
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.VolumeGroupDetails, response.json())
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized # type: ignore
+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 {})
- 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 {})
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
+ # 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"),
+ }
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+ _url: str = _url.format(**path_format_arguments) # type: ignore
- 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
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- _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)
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **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)
+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 {})
- response_headers = {}
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
- response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+ 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")
- deserialized = response.iter_bytes()
+ # 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"),
+ }
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ _url: str = _url.format(**path_format_arguments) # type: ignore
- return deserialized # type: ignore
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- @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.
+ # 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")
- :param resource_group_name: 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:
- """
+ return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
- @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:
- """
+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 {})
- @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.
+ 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")
- :param resource_group_name: 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:
- """
+ # 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"),
+ }
- @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.
+ _url: str = _url.format(**path_format_arguments) # 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 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 {}
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- 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)
+ # 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")
- 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"))
+ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
- 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),
- }
+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 {})
- 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
- )
+ 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"),
+ }
- 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 {})
+ _url: str = _url.format(**path_format_arguments) # type: ignore
- _headers = kwargs.pop("headers", {}) or {}
- _params = kwargs.pop("params", {}) or {}
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs)
- _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
- )
+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 {})
- response = pipeline_response.http_response
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
- 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)
+ # 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"),
+ }
- 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"))
+ _url: str = _url.format(**path_format_arguments) # type: ignore
- deserialized = response.iter_bytes()
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return deserialized # type: ignore
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
- @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 {}
+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 {})
- 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)
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ # 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"),
+ }
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
+ _url: str = _url.format(**path_format_arguments) # 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[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
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- @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.
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- :param resource_group_name: 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 {}
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
- 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 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 {})
- def prepare_request(next_link=None):
- if not next_link:
+ 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")
- _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)
+ # 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"),
+ }
- 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)
+ _url: str = _url.format(**path_format_arguments) # type: ignore
- return _request
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- 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)
+ # 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")
- def get_next(next_link=None):
- _request = prepare_request(next_link)
+ return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
- _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)
+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 {})
- return pipeline_response
+ 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")
- return ItemPaged(get_next, extract_data)
+ # 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
-class BackupsOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- Instead, you should access the following operations through
- :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`backups` attribute.
- """
+ # 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")
- 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 HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
- @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 {})
+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 {})
- _headers = kwargs.pop("headers", {}) or {}
- _params = 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"),
+ }
- cls: ClsType[_models.Backup] = kwargs.pop("cls", None)
+ _url: str = _url.format(**path_format_arguments) # type: ignore
- _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)
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- _stream = kwargs.pop("stream", False)
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
+ return HttpRequest(method="DELETE", url=_url, params=_params, **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)
+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 {})
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.Backup, response.json())
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
+ # 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"),
+ }
- return deserialized # type: ignore
+ _url: str = _url.format(**path_format_arguments) # 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 {})
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
- _params = kwargs.pop("params", {}) or {}
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
- 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),
- }
+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
+
+ @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.
+
+ :param resource_group_name: 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]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[List[_models.VolumeQuotaRule]] = 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_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,
+ 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.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)
+
+ 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 RansomwareReportsOperations:
+ """
+ .. 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.
+ """
+
+ 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",
+ "ransomware_report_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,
+ 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 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
+ :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.RansomwareReport] = kwargs.pop("cls", None)
+
+ _request = build_ransomware_reports_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,
+ 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.RansomwareReport, response.json())
+
+ if cls:
+ 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",
+ "pool_name",
+ "volume_name",
+ "accept",
+ ]
+ },
+ api_versions_list=["2025-09-01-preview"],
+ )
+ 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 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]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
+
+ cls: ClsType[List[_models.RansomwareReport]] = 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_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:
+ 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)
+
+ @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(
+ 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
+ ) -> 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_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,
+ 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_clear_suspects(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ ransomware_report_name: str,
+ body: _models.RansomwareSuspectsClearRequest,
+ *,
+ 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",.
+
+ :param resource_group_name: 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
+ :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_clear_suspects(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ ransomware_report_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",.
+
+ :param resource_group_name: 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: 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_clear_suspects(
+ self,
+ resource_group_name: str,
+ 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",.
+
+ :param resource_group_name: 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(
+ 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(
+ 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]:
+ """ "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 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]
+ :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._clear_suspects_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,
+ 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 BackupVaultsOperations:
+ """
+ .. 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.
+ """
+
+ 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, **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 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 = {
+ 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.BackupVault] = kwargs.pop("cls", None)
+
+ _request = build_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 = 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.BackupVault, 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,
+ backup_vault_name: str,
+ body: Union[_models.BackupVault, 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_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
@@ -4220,18 +16749,17 @@ def _create_initial(
return deserialized # type: ignore
@overload
- def begin_create(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- backup_name: str,
- body: _models.Backup,
+ body: _models.BackupVault,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Create a backup under the Backup Vault.
+ ) -> 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.
@@ -4240,32 +16768,29 @@ def begin_create(
: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
+ :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 Backup. The Backup is compatible with
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create(
+ 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.Backup]:
- """Create a backup under the Backup Vault.
+ ) -> 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.
@@ -4274,32 +16799,29 @@ def begin_create(
: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.
+ :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 Backup. The Backup is compatible with
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create(
+ 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.Backup]:
- """Create a backup under the Backup Vault.
+ ) -> 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.
@@ -4308,30 +16830,27 @@ def begin_create(
: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.
+ :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 Backup. The Backup is compatible with
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- def begin_create(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- backup_name: str,
- body: Union[_models.Backup, JSON, IO[bytes]],
+ body: Union[_models.BackupVault, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Create a backup under the Backup Vault.
+ ) -> 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.
@@ -4340,30 +16859,27 @@ def begin_create(
: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
+ :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.Backup]
+ :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.Backup] = 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_initial(
+ 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,
@@ -4376,7 +16892,7 @@ def begin_create(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.Backup, response.json())
+ deserialized = _deserialize(_models.BackupVault, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -4394,13 +16910,13 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.Backup].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.Backup](
+ return LROPoller[_models.BackupVault](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
@@ -4409,8 +16925,7 @@ def _update_initial(
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- backup_name: str,
- body: Optional[Union[_models.BackupPatch, JSON, IO[bytes]]] = None,
+ body: Union[_models.BackupVaultPatch, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -4425,24 +16940,19 @@ 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" if body else None
+ content_type = content_type or "application/json"
_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
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_backups_update_request(
+ _request = build_backup_vaults_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,
@@ -4492,13 +17002,12 @@ def begin_update(
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- backup_name: str,
- body: Optional[_models.BackupPatch] = None,
+ body: _models.BackupVaultPatch,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Patch a Backup under the Backup Vault.
+ ) -> 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.
@@ -4507,16 +17016,14 @@ def begin_update(
: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
+ :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 Backup. The Backup is compatible with
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -4526,13 +17033,12 @@ def begin_update(
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- backup_name: str,
- body: Optional[JSON] = None,
+ body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Patch a Backup under the Backup Vault.
+ ) -> 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.
@@ -4541,16 +17047,14 @@ def begin_update(
: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.
+ :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 Backup. The Backup is compatible with
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -4560,13 +17064,12 @@ def begin_update(
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- backup_name: str,
- body: Optional[IO[bytes]] = None,
+ body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Patch a Backup under the Backup Vault.
+ ) -> 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.
@@ -4575,16 +17078,14 @@ def begin_update(
: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.
+ :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 Backup. The Backup is compatible with
+ :return: An instance of LROPoller that returns BackupVault. The BackupVault is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Backup]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -4594,11 +17095,10 @@ def begin_update(
resource_group_name: str,
account_name: str,
backup_vault_name: str,
- backup_name: str,
- body: Optional[Union[_models.BackupPatch, JSON, IO[bytes]]] = None,
+ body: Union[_models.BackupVaultPatch, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.Backup]:
- """Patch a Backup under the Backup Vault.
+ ) -> 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.
@@ -4607,22 +17107,19 @@ def begin_update(
: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
+ :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.Backup]
+ :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))
- content_type = content_type if body else None
- cls: ClsType[_models.Backup] = 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)
@@ -4631,7 +17128,6 @@ 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,
@@ -4644,7 +17140,7 @@ def begin_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.Backup, response.json())
+ deserialized = _deserialize(_models.BackupVault, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -4662,18 +17158,18 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.Backup].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.Backup](
+ return LROPoller[_models.BackupVault](
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
+ self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -4688,11 +17184,10 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_backups_delete_request(
+ _request = build_backup_vaults_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,
@@ -4736,9 +17231,9 @@ def _delete_initial(
@distributed_trace
def begin_delete(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
+ self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
) -> LROPoller[None]:
- """Delete a Backup under the Backup Vault.
+ """Delete the specified Backup Vault.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -4747,8 +17242,6 @@ 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:
@@ -4765,7 +17258,6 @@ 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,
@@ -4800,35 +17292,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
- 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.
+ 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
: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]
+ :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.Backup]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.BackupVault]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -4841,12 +17322,10 @@ def list_by_vault(
def prepare_request(next_link=None):
if not next_link:
- _request = build_backups_list_by_vault_request(
+ _request = build_backup_vaults_list_by_net_app_account_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,
@@ -4882,7 +17361,7 @@ def prepare_request(next_link=None):
def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.Backup], 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)
@@ -4908,88 +17387,52 @@ def get_next(next_link=None):
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())
+class BucketsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
+ :attr:`buckets` attribute.
+ """
- return deserialized # 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")
@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.
+ @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.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -5000,8 +17443,10 @@ def get_volume_latest_restore_status(
: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
+ :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 = {
@@ -5015,13 +17460,14 @@ def get_volume_latest_restore_status(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.RestoreStatus] = kwargs.pop("cls", None)
+ cls: ClsType[_models.Bucket] = kwargs.pop("cls", None)
- _request = build_backups_get_volume_latest_restore_status_request(
+ _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,
@@ -5055,50 +17501,40 @@ def get_volume_latest_restore_status(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.RestoreStatus, response.json())
+ deserialized = _deserialize(_models.Bucket, 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:
- """
+ @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]],
+ **kwargs: Any
+ ) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
@@ -5107,18 +17543,29 @@ def get(
}
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.Volume] = kwargs.pop("cls", None)
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_volumes_get_request(
+ 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,
)
@@ -5127,19 +17574,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, 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,
@@ -5147,23 +17593,267 @@ def get(
)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.Volume, response.json())
+ 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, {}) # type: ignore
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
- def _create_or_update_initial(
+ @overload
+ 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]],
+ bucket_name: str,
+ body: _models.Bucket,
+ *,
+ 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.
+
+ :param resource_group_name: 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 LROPoller that returns Bucket. The Bucket is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
+ :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,
+ 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.
+
+ :param resource_group_name: 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 LROPoller that returns Bucket. The Bucket is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
+ :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,
+ 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.
+
+ :param resource_group_name: 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 LROPoller that returns Bucket. The Bucket is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
+ :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]],
+ **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.
+
+ :param resource_group_name: 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 LROPoller that returns Bucket. The Bucket is compatible with
+ MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~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, 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,
+ bucket_name=bucket_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.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: 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.Bucket].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",
+ "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]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -5187,11 +17877,12 @@ def _create_or_update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_volumes_create_or_update_request(
+ _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,
@@ -5211,7 +17902,7 @@ def _create_or_update_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 201, 202]:
+ if response.status_code not in [200, 202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -5224,13 +17915,10 @@ def _create_or_update_initial(
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
response_headers = {}
- if response.status_code == 201:
+ 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"))
-
- 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"))
@@ -5242,18 +17930,19 @@ 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,
- body: _models.Volume,
+ bucket_name: str,
+ body: _models.BucketPatch,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """Create or update the specified volume within the capacity pool.
+ ) -> LROPoller[_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.
@@ -5264,30 +17953,34 @@ def begin_create_or_update(
: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
+ :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 LROPoller that returns Volume. The Volume is compatible with
+ :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ 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
- ) -> LROPoller[_models.Volume]:
- """Create or update the specified volume within the capacity pool.
+ ) -> LROPoller[_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.
@@ -5298,30 +17991,34 @@ def begin_create_or_update(
: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.
+ :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 LROPoller that returns Volume. The Volume is compatible with
+ :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create_or_update(
+ 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
- ) -> LROPoller[_models.Volume]:
- """Create or update the specified volume within the capacity pool.
+ ) -> LROPoller[_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.
@@ -5332,28 +18029,49 @@ def begin_create_or_update(
: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.
+ :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 LROPoller that returns Volume. The Volume is compatible with
+ :return: An instance of LROPoller that returns Bucket. The Bucket is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Bucket]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- def begin_create_or_update(
+ @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,
- body: Union[_models.Volume, JSON, IO[bytes]],
+ bucket_name: str,
+ body: Union[_models.BucketPatch, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """Create or update the specified volume within the capacity pool.
+ ) -> LROPoller[_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.
@@ -5364,28 +18082,32 @@ def begin_create_or_update(
: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
+ :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
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
+ :rtype: ~azure.core.polling.LROPoller[~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.Volume] = kwargs.pop("cls", None)
+ cls: ClsType[_models.Bucket] = 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,
volume_name=volume_name,
+ bucket_name=bucket_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -5398,7 +18120,7 @@ def begin_create_or_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.Volume, response.json())
+ deserialized = _deserialize(_models.Bucket, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -5416,23 +18138,38 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.Volume].from_continuation_token(
+ return LROPoller[_models.Bucket].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.Volume](
+ return LROPoller[_models.Bucket](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- def _update_initial(
+ @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 _delete_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: Union[_models.VolumePatch, JSON, IO[bytes]],
+ bucket_name: str,
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -5443,28 +18180,19 @@ 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_volumes_update_request(
+ _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,
- content_type=content_type,
api_version=self._config.api_version,
- content=_content,
headers=_headers,
params=_params,
)
@@ -5473,50 +18201,262 @@ def _update_initial(
}
_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
- )
+ _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["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",
+ "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,
+ **kwargs: Any
+ ) -> LROPoller[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 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,
+ bucket_name=bucket_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
+ @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.
+
+ :param resource_group_name: 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.paging.ItemPaged[~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
- response = pipeline_response.http_response
+ 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)
- 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)
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
- 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"))
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+ response = pipeline_response.http_response
- deserialized = response.iter_bytes()
+ 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 cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return pipeline_response
- return deserialized # type: ignore
+ return ItemPaged(get_next, extract_data)
@overload
- def begin_update(
+ def generate_credentials(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: _models.VolumePatch,
+ bucket_name: str,
+ body: _models.BucketCredentialsExpiry,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """Patch the specified volume.
+ ) -> _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.
@@ -5527,30 +18467,35 @@ def begin_update(
: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
+ :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: An instance of LROPoller that returns Volume. The Volume is compatible with
+ :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
+ :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_update(
+ 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
- ) -> LROPoller[_models.Volume]:
- """Patch the specified volume.
+ ) -> _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.
@@ -5561,30 +18506,35 @@ def begin_update(
: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.
+ :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: An instance of LROPoller that returns Volume. The Volume is compatible with
+ :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
+ :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_update(
+ 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
- ) -> LROPoller[_models.Volume]:
- """Patch the specified volume.
+ ) -> _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.
@@ -5595,28 +18545,50 @@ def begin_update(
: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.
+ :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: An instance of LROPoller that returns Volume. The Volume is compatible with
+ :return: BucketGenerateCredentials. The BucketGenerateCredentials is compatible with
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
+ :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- def begin_update(
+ @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(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: Union[_models.VolumePatch, JSON, IO[bytes]],
+ bucket_name: str,
+ body: Union[_models.BucketCredentialsExpiry, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.Volume]:
- """Patch the specified volume.
+ ) -> _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.
@@ -5627,78 +18599,17 @@ def begin_update(
: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
+ :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.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
+ :rtype: ~azure.mgmt.netapp.models.BucketGenerateCredentials
: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,
@@ -5707,19 +18618,29 @@ 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 {}
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.BucketGenerateCredentials] = kwargs.pop("cls", None)
- _request = build_volumes_delete_request(
+ 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,
- force_delete=force_delete,
+ content_type=content_type,
api_version=self._config.api_version,
+ content=_content,
headers=_headers,
params=_params,
)
@@ -5728,118 +18649,74 @@ def _delete_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 [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
+ 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,
)
- 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): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ if _stream:
+ deserialized = response.iter_bytes()
+ else:
+ deserialized = _deserialize(_models.BucketGenerateCredentials, response.json())
- 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, {}) # 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[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
+ 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
- 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.
+ @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.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -5848,15 +18725,12 @@ def list(
: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]
+ :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:
"""
- _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,
@@ -5865,77 +18739,80 @@ def list(
}
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)
+ _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.Cache] = kwargs.pop("cls", None)
- return _request
+ _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)
- 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)
+ _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.Cache, response.json())
- return pipeline_response
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
- return ItemPaged(get_next, extract_data)
+ return deserialized # type: ignore
- def _populate_availability_zone_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ @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
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -5945,18 +18822,28 @@ def _populate_availability_zone_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))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_volumes_populate_availability_zone_request(
+ 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,
- volume_name=volume_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,
)
@@ -5972,7 +18859,7 @@ def _populate_availability_zone_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202]:
+ if response.status_code not in [200, 201]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -5985,22 +18872,148 @@ def _populate_availability_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"))
+ 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
+ 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,
+ 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.
- 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 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
- 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.
+ @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.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -6009,26 +19022,32 @@ def begin_populate_availability_zone(
: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
+ :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
MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Volume]
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Cache]
: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[_models.Volume] = kwargs.pop("cls", None)
+ 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._populate_availability_zone_initial(
+ 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,
+ cache_name=cache_name,
+ body=body,
+ content_type=content_type,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -6038,14 +19057,10 @@ def begin_populate_availability_zone(
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())
+ deserialized = _deserialize(_models.Cache, response.json())
if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
path_format_arguments = {
@@ -6061,23 +19076,39 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.Volume].from_continuation_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.Volume](
+ return LROPoller[_models.Cache](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- def _revert_initial(
+ @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(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- volume_name: str,
- body: Union[_models.VolumeRevert, JSON, IO[bytes]],
+ cache_name: str,
+ body: Union[_models.CacheUpdate, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -6101,11 +19132,11 @@ def _revert_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_volumes_revert_request(
+ _request = build_caches_update_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
- volume_name=volume_name,
+ cache_name=cache_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -6150,18 +19181,18 @@ def _revert_initial(
return deserialized # type: ignore
@overload
- def begin_revert(
+ def begin_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- volume_name: str,
- body: _models.VolumeRevert,
+ cache_name: str,
+ body: _models.CacheUpdate,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[None]:
- """Revert a volume to the snapshot specified in the body.
+ """Patch the specified Cache.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -6170,10 +19201,10 @@ def begin_revert(
: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
+ :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
@@ -6183,18 +19214,18 @@ def begin_revert(
"""
@overload
- def begin_revert(
+ def begin_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- volume_name: str,
+ cache_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[None]:
- """Revert a volume to the snapshot specified in the body.
+ """Patch the specified Cache.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -6203,9 +19234,9 @@ def begin_revert(
: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.
+ :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".
@@ -6216,18 +19247,18 @@ def begin_revert(
"""
@overload
- def begin_revert(
+ def begin_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- volume_name: str,
+ cache_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[None]:
- """Revert a volume to the snapshot specified in the body.
+ """Patch the specified Cache.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -6236,9 +19267,9 @@ def begin_revert(
: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.
+ :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".
@@ -6249,16 +19280,193 @@ def begin_revert(
"""
@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
+ @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(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ cache_name: str,
+ body: Union[_models.CacheUpdate, JSON, IO[bytes]],
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """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 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._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): # 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-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
+
+ 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",
+ "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
) -> LROPoller[None]:
- """Revert a volume to the snapshot specified in the body.
+ """Delete the specified cache.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -6267,31 +19475,25 @@ def begin_revert(
: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]
+ :param cache_name: The name of the cache resource. Required.
+ :type cache_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._revert_initial(
+ raw_result = self._delete_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,
+ cache_name=cache_name,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -6325,9 +19527,154 @@ 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
- def _reset_cifs_password_initial(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
- ) -> Iterator[bytes]:
+ @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,
@@ -6339,15 +19686,108 @@ def _reset_cifs_password_initial(
_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",
+ 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 _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
+ ) -> 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)
- _request = build_volumes_reset_cifs_password_request(
+ 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,
- volume_name=volume_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,
)
@@ -6363,7 +19803,7 @@ def _reset_cifs_password_initial(
response = pipeline_response.http_response
- if response.status_code not in [202]:
+ if response.status_code not in [200, 202]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -6376,8 +19816,9 @@ def _reset_cifs_password_initial(
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"))
+ 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()
@@ -6386,11 +19827,132 @@ def _reset_cifs_password_initial(
return deserialized # type: ignore
+ @overload
+ 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
+ ) -> LROPoller[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 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,
+ cache_name: str,
+ body: JSON,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[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 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,
+ cache_name: str,
+ body: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[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 LROPoller that returns None
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
@distributed_trace
- def begin_reset_cifs_password(
- self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ @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_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
) -> LROPoller[None]:
- """Reset cifs password from volume.
+ """Moves Cache to another Capacity Pool.
:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
@@ -6399,25 +19961,31 @@ def begin_reset_cifs_password(
: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 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]
: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._reset_cifs_password_initial(
+ raw_result = self._pool_change_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
- volume_name=volume_name,
+ cache_name=cache_name,
+ body=body,
+ content_type=content_type,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -6451,150 +20019,119 @@ 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
- 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()
+class ElasticAccountsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
+ :attr:`elastic_accounts` attribute.
+ """
- return deserialized # 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")
@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.
+ @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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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]
+ :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.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
+ 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)
- 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]:
+ 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.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
- )
+ deserialized = _deserialize(_models.ElasticAccount, response.json())
- def _break_file_locks_initial(
+ 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(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[Union[_models.BreakFileLocksRequest, JSON, IO[bytes]]] = None,
+ body: Union[_models.ElasticAccount, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -6609,24 +20146,18 @@ def _break_file_locks_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" if body else None
+ content_type = content_type or "application/json"
_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
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_volumes_break_file_locks_request(
+ _request = build_elastic_accounts_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,
@@ -6646,7 +20177,7 @@ def _break_file_locks_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202]:
+ if response.status_code not in [200, 201]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -6659,8 +20190,10 @@ def _break_file_locks_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"))
+ 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()
@@ -6671,150 +20204,138 @@ def _break_file_locks_initial(
return deserialized # type: ignore
@overload
- def begin_break_file_locks(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[_models.BreakFileLocksRequest] = None,
+ body: _models.ElasticAccount,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """Break all the file locks on a volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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
+ :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 LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_break_file_locks(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[JSON] = None,
+ body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """Break all the file locks on a volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_break_file_locks(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[IO[bytes]] = None,
+ body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """Break all the file locks on a volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- def begin_break_file_locks(
+ @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(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- body: Optional[Union[_models.BreakFileLocksRequest, JSON, IO[bytes]]] = None,
+ body: Union[_models.ElasticAccount, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[None]:
- """Break all the file locks on a volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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]
+ :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]
: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)
+ cls: ClsType[_models.ElasticAccount] = 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(
+ 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,
@@ -6825,9 +20346,12 @@ def begin_break_file_locks(
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 = pipeline_response.http_response
+ deserialized = _deserialize(_models.ElasticAccount, response.json())
if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ 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),
@@ -6842,37 +20366,35 @@ 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.ElasticAccount].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.ElasticAccount](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
@api_version_validation(
- method_added_on="2025-08-01",
+ method_added_on="2025-09-01-preview",
params_added_on={
- "2025-08-01": [
+ "2025-09-01-preview": [
"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"],
+ api_versions_list=["2025-09-01-preview"],
)
- def _list_get_group_id_list_for_ldap_user_initial( # pylint: disable=name-too-long
+ def _update_initial(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.GetGroupIdListForLDAPUserRequest, JSON, IO[bytes]],
+ body: Union[_models.ElasticAccountUpdate, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -6896,11 +20418,9 @@ def _list_get_group_id_list_for_ldap_user_initial( # pylint: disable=name-too-l
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_volumes_list_get_group_id_list_for_ldap_user_request(
+ _request = build_elastic_accounts_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,
@@ -6934,9 +20454,6 @@ def _list_get_group_id_list_for_ldap_user_initial( # pylint: disable=name-too-l
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"))
@@ -6948,170 +20465,138 @@ def _list_get_group_id_list_for_ldap_user_initial( # pylint: disable=name-too-l
return deserialized # type: ignore
@overload
- def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
+ def begin_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- body: _models.GetGroupIdListForLDAPUserRequest,
+ body: _models.ElasticAccountUpdate,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]:
- """Returns the list of group Ids for a specific LDAP User.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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
+ :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 LROPoller that returns GetGroupIdListForLDAPUserResponse. The
- GetGroupIdListForLDAPUserResponse is compatible with MutableMapping
- :rtype:
- ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse]
+ :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
+ 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.GetGroupIdListForLDAPUserResponse]:
- """Returns the list of group Ids for a specific LDAP User.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 GetGroupIdListForLDAPUserResponse. The
- GetGroupIdListForLDAPUserResponse is compatible with MutableMapping
- :rtype:
- ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse]
+ :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
+ 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.GetGroupIdListForLDAPUserResponse]:
- """Returns the list of group Ids for a specific LDAP User.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 GetGroupIdListForLDAPUserResponse. The
- GetGroupIdListForLDAPUserResponse is compatible with MutableMapping
- :rtype:
- ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.GetGroupIdListForLDAPUserResponse]
+ :return: An instance of LROPoller that returns ElasticAccount. The ElasticAccount is compatible
+ with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticAccount]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
@api_version_validation(
- method_added_on="2025-08-01",
+ method_added_on="2025-09-01-preview",
params_added_on={
- "2025-08-01": [
+ "2025-09-01-preview": [
"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"],
+ api_versions_list=["2025-09-01-preview"],
)
- def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
+ def begin_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- body: Union[_models.GetGroupIdListForLDAPUserRequest, JSON, IO[bytes]],
+ body: Union[_models.ElasticAccountUpdate, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.GetGroupIdListForLDAPUserResponse]:
- """Returns the list of group Ids for a specific LDAP User.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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]
+ :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]
: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)
+ cls: ClsType[_models.ElasticAccount] = 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(
+ 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,
@@ -7123,17 +20608,10 @@ def begin_list_get_group_id_list_for_ldap_user( # pylint: disable=name-too-long
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())
+ deserialized = _deserialize(_models.ElasticAccount, response.json())
if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
path_format_arguments = {
@@ -7149,25 +20627,24 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.GetGroupIdListForLDAPUserResponse].from_continuation_token(
+ return LROPoller[_models.ElasticAccount].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.GetGroupIdListForLDAPUserResponse](
+ return LROPoller[_models.ElasticAccount](
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]:
+ @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]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
@@ -7176,255 +20653,434 @@ def _break_replication_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))
- 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(
+ _request = build_elastic_accounts_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,
- 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)
+ _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
+ @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.
+
+ :param resource_group_name: 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 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,
+ 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
+ @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.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.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)
+
+ 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
+
+ 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)
+
+ 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.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)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
- _stream = True
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
- _request, stream=_stream, **kwargs
- )
+ def prepare_request(next_link=None):
+ if not next_link:
- response = pipeline_response.http_response
+ _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)
- 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)
+ 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)
- 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 _request
- deserialized = response.iter_bytes()
+ 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)
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
- return deserialized # type: ignore
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+ response = pipeline_response.http_response
- @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.
+ 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)
- :param resource_group_name: 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:
- """
+ return pipeline_response
- @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.
+ return ItemPaged(get_next, extract_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 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.
+class ElasticCapacityPoolsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
- :param resource_group_name: 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:
- """
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.netapp.NetAppManagementClient`'s
+ :attr:`elastic_capacity_pools` 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 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.
+ @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.
:param resource_group_name: 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.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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]
+ :return: ElasticCapacityPool. The ElasticCapacityPool is compatible with MutableMapping
+ :rtype: ~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))
- 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)
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ _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)
- 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]:
+ 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[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
+ deserialized = _deserialize(_models.ElasticCapacityPool, response.json())
- def _reestablish_replication_initial(
+ 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"],
+ )
+ def _create_or_update_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- volume_name: str,
- body: Union[_models.ReestablishReplicationRequest, JSON, IO[bytes]],
+ body: Union[_models.ElasticCapacityPool, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -7448,11 +21104,10 @@ def _reestablish_replication_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_volumes_reestablish_replication_request(
+ _request = build_elastic_capacity_pools_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,
@@ -7472,7 +21127,7 @@ def _reestablish_replication_initial(
response = pipeline_response.http_response
- if response.status_code not in [202]:
+ if response.status_code not in [200, 201]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -7485,8 +21140,11 @@ def _reestablish_replication_initial(
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"))
+ 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()
@@ -7496,150 +21154,156 @@ def _reestablish_replication_initial(
return deserialized # type: ignore
@overload
- def begin_reestablish_replication(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- volume_name: str,
- body: _models.ReestablishReplicationRequest,
+ body: _models.ElasticCapacityPool,
*,
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.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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
+ :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 LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :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:
"""
@overload
- def begin_reestablish_replication(
+ 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[None]:
- """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or
- policy-based snapshots.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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.
+ :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 None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :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:
"""
@overload
- def begin_reestablish_replication(
+ 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[None]:
- """Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or
- policy-based snapshots.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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.
+ :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 None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :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:
"""
@distributed_trace
- def begin_reestablish_replication(
+ @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(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- volume_name: str,
- body: Union[_models.ReestablishReplicationRequest, JSON, IO[bytes]],
+ body: Union[_models.ElasticCapacityPool, 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.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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]
+ :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]
: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.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._reestablish_replication_initial(
+ 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,
@@ -7650,9 +21314,12 @@ def begin_reestablish_replication(
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 = pipeline_response.http_response
+ deserialized = _deserialize(_models.ElasticCapacityPool, response.json())
if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ 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),
@@ -7667,33 +21334,39 @@ 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.ElasticCapacityPool].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.
+ return LROPoller[_models.ElasticCapacityPool](
+ 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
- :return: ReplicationStatus. The ReplicationStatus is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.ReplicationStatus
- :raises ~azure.core.exceptions.HttpResponseError:
- """
+ @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(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ body: Union[_models.ElasticCapacityPoolUpdate, JSON, IO[bytes]],
+ **kwargs: Any
+ ) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
@@ -7702,18 +21375,27 @@ def replication_status(
}
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.ReplicationStatus] = kwargs.pop("cls", None)
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_volumes_replication_status_request(
+ 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,
- 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,
)
@@ -7722,19 +21404,18 @@ def replication_status(
}
_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,
@@ -7742,350 +21423,167 @@ def replication_status(
)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- if _stream:
- deserialized = response.iter_bytes()
- else:
- deserialized = _deserialize(_models.ReplicationStatus, 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
@overload
- def list_replications(
+ def begin_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- volume_name: str,
- body: Optional[_models.ListReplicationsRequest] = None,
+ body: _models.ElasticCapacityPoolUpdate,
*,
content_type: str = "application/json",
- **kwargs: Any
- ) -> ItemPaged["_models.Replication"]:
- """List all replications for a specified volume.
+ **kwargs: Any
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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
+ :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 iterator like instance of Replication
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication]
+ :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:
"""
@overload
- def list_replications(
+ def begin_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- volume_name: str,
- body: Optional[JSON] = None,
+ body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> ItemPaged["_models.Replication"]:
- """List all replications for a specified volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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.
+ :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 iterator like instance of Replication
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication]
+ :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:
"""
@overload
- def list_replications(
+ def begin_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- volume_name: str,
- body: Optional[IO[bytes]] = None,
+ body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> ItemPaged["_models.Replication"]:
- """List all replications for a specified volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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.
+ :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 iterator like instance of Replication
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.Replication]
+ :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:
"""
@distributed_trace
@api_version_validation(
- method_added_on="2025-08-01",
+ method_added_on="2025-09-01-preview",
params_added_on={
- "2025-08-01": [
+ "2025-09-01-preview": [
"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"],
+ api_versions_list=["2025-09-01-preview"],
)
- def list_replications(
+ def begin_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- volume_name: str,
- body: Optional[Union[_models.ListReplicationsRequest, JSON, IO[bytes]]] = None,
+ body: Union[_models.ElasticCapacityPoolUpdate, JSON, IO[bytes]],
**kwargs: Any
- ) -> ItemPaged["_models.Replication"]:
- """List all replications for a specified volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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]
+ :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]
: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)
+ 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._resync_replication_initial(
+ 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,
@@ -8094,9 +21592,12 @@ def begin_resync_replication(
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 = pipeline_response.http_response
+ deserialized = _deserialize(_models.ElasticCapacityPool, response.json())
if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ 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),
@@ -8111,16 +21612,25 @@ 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.ElasticCapacityPool].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.ElasticCapacityPool](
+ 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
+ @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
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -8135,11 +21645,10 @@ def _delete_replication_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_volumes_delete_replication_request(
+ _request = build_elastic_capacity_pools_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,
@@ -8157,7 +21666,7 @@ def _delete_replication_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202]:
+ if response.status_code not in [202, 204]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -8182,21 +21691,25 @@ def _delete_replication_initial(
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
+ @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 replication connection on the destination volume, and send release to the source
- replication.
+ """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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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:
@@ -8209,11 +21722,10 @@ def begin_delete_replication(
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(
+ raw_result = 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,
@@ -8247,13 +21759,130 @@ 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
- def _authorize_replication_initial(
+ @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)
+
+ 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
+
+ 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)
+
+ 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)
+
+ @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,
- volume_name: str,
- body: Union[_models.AuthorizeRequest, JSON, IO[bytes]],
+ body: Union[_models.ChangeZoneRequest, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -8277,11 +21906,10 @@ def _authorize_replication_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_volumes_authorize_replication_request(
+ _request = build_elastic_capacity_pools_change_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,
content_type=content_type,
api_version=self._config.api_version,
@@ -8311,199 +21939,346 @@ def _authorize_replication_initial(
_models.ErrorResponse,
response,
)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ 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_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.
+
+ :param resource_group_name: 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 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:
+ """
+
+ @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.
+
+ :param resource_group_name: 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:
+ """
+
+ @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.
+
+ :param resource_group_name: 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:
+ """
+
+ @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(
+ self,
+ resource_group_name: str,
+ account_name: str,
+ pool_name: str,
+ body: Union[_models.ChangeZoneRequest, JSON, IO[bytes]],
+ **kwargs: Any
+ ) -> LROPoller[_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 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
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
- response_headers = {}
- if response.status_code == 202:
+ 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 = response.iter_bytes()
+ deserialized = _deserialize(_models.ElasticCapacityPool, response.json())
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return deserialized
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ path_format_arguments = {
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
+ }
- return deserialized # 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
+ )
@overload
- def begin_authorize_replication(
+ def check_volume_file_path_availability(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- volume_name: str,
- body: _models.AuthorizeRequest,
+ body: _models.CheckElasticVolumeFilePathAvailabilityRequest,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """Authorize the replication connection on the source volume.
+ ) -> _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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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
+ :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: An instance of LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse
+ is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_authorize_replication(
+ def check_volume_file_path_availability(
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.
+ ) -> _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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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.
+ :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 None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse
+ is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_authorize_replication(
+ def check_volume_file_path_availability(
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.
+ ) -> _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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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.
+ :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 None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: CheckElasticResourceAvailabilityResponse. The CheckElasticResourceAvailabilityResponse
+ is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.CheckElasticResourceAvailabilityResponse
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- def begin_authorize_replication(
+ @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(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
- volume_name: str,
- body: Union[_models.AuthorizeRequest, JSON, IO[bytes]],
+ body: Union[_models.CheckElasticVolumeFilePathAvailabilityRequest, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[None]:
- """Authorize the replication connection on the source volume.
+ ) -> _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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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]
+ :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:
"""
- _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,
@@ -8512,18 +22287,27 @@ def _re_initialize_replication_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 {}
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.CheckElasticResourceAvailabilityResponse] = kwargs.pop("cls", None)
- _request = build_volumes_re_initialize_replication_request(
+ 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,
- 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,
)
@@ -8532,18 +22316,19 @@ def _re_initialize_replication_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, 202]:
- 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,
@@ -8551,90 +22336,149 @@ def _re_initialize_replication_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"))
-
- deserialized = response.iter_bytes()
+ if _stream:
+ deserialized = response.iter_bytes()
+ else:
+ deserialized = _deserialize(_models.CheckElasticResourceAvailabilityResponse, response.json())
if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ 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
- def begin_re_initialize_replication(
+ @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
- ) -> LROPoller[None]:
- """Re-Initializes the replication connection on the destination volume.
+ ) -> _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 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)
+ 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 {})
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ _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)
- 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]:
+ 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[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
+ deserialized = _deserialize(_models.ElasticVolume, response.json())
- def _peer_external_cluster_initial(
+ 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"],
+ )
+ def _create_or_update_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: Union[_models.PeerClusterForVolumeMigrationRequest, JSON, IO[bytes]],
+ body: Union[_models.ElasticVolume, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -8658,7 +22502,7 @@ def _peer_external_cluster_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_volumes_peer_external_cluster_request(
+ _request = build_elastic_volumes_create_or_update_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
@@ -8682,7 +22526,7 @@ def _peer_external_cluster_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202]:
+ if response.status_code not in [200, 201]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -8695,8 +22539,10 @@ def _peer_external_cluster_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"))
+ 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()
@@ -8707,41 +22553,41 @@ def _peer_external_cluster_initial(
return deserialized # type: ignore
@overload
- def begin_peer_external_cluster(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: _models.PeerClusterForVolumeMigrationRequest,
+ body: _models.ElasticVolume,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ClusterPeerCommandResponse]:
- """Starts peering the external cluster for this migration volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. 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
+ :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 LROPoller that returns ClusterPeerCommandResponse. The
- ClusterPeerCommandResponse is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse]
+ :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_peer_external_cluster(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
@@ -8751,31 +22597,31 @@ def begin_peer_external_cluster(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ClusterPeerCommandResponse]:
- """Starts peering the external cluster for this migration volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. Required.
:type volume_name: str
- :param body: Cluster peer request object supplied in the body of the operation. Required.
+ :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 ClusterPeerCommandResponse. The
- ClusterPeerCommandResponse is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse]
+ :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_peer_external_cluster(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
@@ -8785,68 +22631,84 @@ def begin_peer_external_cluster(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.ClusterPeerCommandResponse]:
- """Starts peering the external cluster for this migration volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. Required.
:type volume_name: str
- :param body: Cluster peer request object supplied in the body of the operation. Required.
+ :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 ClusterPeerCommandResponse. The
- ClusterPeerCommandResponse is compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ClusterPeerCommandResponse]
+ :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
- def begin_peer_external_cluster(
+ @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.PeerClusterForVolumeMigrationRequest, JSON, IO[bytes]],
+ body: Union[_models.ElasticVolume, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.ClusterPeerCommandResponse]:
- """Starts peering the external cluster for this migration volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. 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]
+ :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]
: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)
+ 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._peer_external_cluster_initial(
+ raw_result = self._create_or_update_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
@@ -8862,14 +22724,10 @@ def begin_peer_external_cluster(
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())
+ deserialized = _deserialize(_models.ElasticVolume, response.json())
if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
path_format_arguments = {
@@ -8885,18 +22743,40 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.ClusterPeerCommandResponse].from_continuation_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.ClusterPeerCommandResponse](
+ return LROPoller[_models.ElasticVolume](
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
+ @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
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -8906,18 +22786,28 @@ def _authorize_external_replication_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))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_volumes_authorize_external_replication_request(
+ 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,
)
@@ -8952,45 +22842,174 @@ def _authorize_external_replication_initial(
deserialized = response.iter_bytes()
- if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ 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.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.
- 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 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
- 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.
+ @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.
:param resource_group_name: 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.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. 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]
+ :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]
: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[_models.SvmPeerCommandResponse] = kwargs.pop("cls", None)
+ 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._authorize_external_replication_initial(
+ 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,
@@ -9000,14 +23019,10 @@ def begin_authorize_external_replication(
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())
+ deserialized = _deserialize(_models.ElasticVolume, response.json())
if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
path_format_arguments = {
@@ -9023,17 +23038,31 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.SvmPeerCommandResponse].from_continuation_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.SvmPeerCommandResponse](
+ return LROPoller[_models.ElasticVolume](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
- def _finalize_external_replication_initial(
+ @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"],
+ )
+ def _delete_initial(
self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -9049,7 +23078,7 @@ def _finalize_external_replication_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_volumes_finalize_external_replication_request(
+ _request = build_elastic_volumes_delete_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
@@ -9071,7 +23100,7 @@ def _finalize_external_replication_initial(
response = pipeline_response.http_response
- if response.status_code not in [202]:
+ if response.status_code not in [202, 204]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -9084,8 +23113,9 @@ def _finalize_external_replication_initial(
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"))
+ 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()
@@ -9095,20 +23125,33 @@ def _finalize_external_replication_initial(
return deserialized # type: ignore
@distributed_trace
- def begin_finalize_external_replication(
+ @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"],
+ )
+ def begin_delete(
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.
+ """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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. Required.
:type volume_name: str
:return: An instance of LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
@@ -9122,7 +23165,7 @@ def begin_finalize_external_replication(
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(
+ raw_result = self._delete_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
@@ -9160,139 +23203,142 @@ 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
- 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.
+ @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.
:param resource_group_name: 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.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. 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]
+ :return: An iterator like instance of ElasticVolume
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticVolume]
: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)
+ 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
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ def extract_data(pipeline_response):
+ deserialized = pipeline_response.http_response.json()
+ list_of_elem = _deserialize(List[_models.ElasticVolume], deserialized.get("value", []))
if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ 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[None].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[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+ response = pipeline_response.http_response
- def _pool_change_initial(
+ 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",
+ 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(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: Union[_models.PoolChangeRequest, JSON, IO[bytes]],
+ body: Union[_models.ElasticVolumeRevert, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -9316,7 +23362,7 @@ def _pool_change_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_volumes_pool_change_request(
+ _request = build_elastic_volumes_revert_request(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
@@ -9365,40 +23411,41 @@ def _pool_change_initial(
return deserialized # type: ignore
@overload
- def begin_pool_change(
+ def begin_revert(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: _models.PoolChangeRequest,
+ body: _models.ElasticVolumeRevert,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """Moves volume to another pool.
+ ) -> 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. 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
+ :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 LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :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_pool_change(
+ def begin_revert(
self,
resource_group_name: str,
account_name: str,
@@ -9408,30 +23455,31 @@ def begin_pool_change(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """Moves volume to another pool.
+ ) -> 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. Required.
:type volume_name: str
- :param body: Move volume to the pool supplied in the body of the operation. Required.
+ :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 None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :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_pool_change(
+ def begin_revert(
self,
resource_group_name: str,
account_name: str,
@@ -9441,66 +23489,84 @@ def begin_pool_change(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """Moves volume to another pool.
+ ) -> 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. Required.
:type volume_name: str
- :param body: Move volume to the pool supplied in the body of the operation. Required.
+ :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 None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :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
- def begin_pool_change(
+ @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.PoolChangeRequest, JSON, IO[bytes]],
+ body: Union[_models.ElasticVolumeRevert, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[None]:
- """Moves volume to another pool.
+ ) -> 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. 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]
+ :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]
: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.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._pool_change_initial(
+ raw_result = self._revert_initial(
resource_group_name=resource_group_name,
account_name=account_name,
pool_name=pool_name,
@@ -9515,9 +23581,16 @@ 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["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, 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),
@@ -9532,21 +23605,161 @@ 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.ElasticVolume].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.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(
+ 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 = 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.ElasticSnapshot, response.json())
- def _relocate_initial(
+ 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"],
+ )
+ def _create_or_update_initial(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: Optional[Union[_models.RelocateVolumeRequest, JSON, IO[bytes]]] = None,
+ snapshot_name: str,
+ body: Union[_models.ElasticSnapshot, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -9561,24 +23774,21 @@ def _relocate_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" if body else None
+ content_type = content_type or "application/json"
_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
+ _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_volumes_relocate_request(
+ _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,
@@ -9598,7 +23808,7 @@ def _relocate_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202]:
+ if response.status_code not in [200, 201]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -9611,8 +23821,10 @@ def _relocate_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"))
+ 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()
@@ -9623,147 +23835,180 @@ def _relocate_initial(
return deserialized # type: ignore
@overload
- def begin_relocate(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: Optional[_models.RelocateVolumeRequest] = None,
+ snapshot_name: str,
+ body: _models.ElasticSnapshot,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """Relocates volume to a new stamp.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. Required.
:type volume_name: str
- :param body: Relocate volume request. Default value is None.
- :type body: ~azure.mgmt.netapp.models.RelocateVolumeRequest
+ :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 LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: An instance of LROPoller that returns ElasticSnapshot. The ElasticSnapshot is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshot]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_relocate(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: Optional[JSON] = None,
+ snapshot_name: str,
+ body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """Relocates volume to a new stamp.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. Required.
:type volume_name: str
- :param body: Relocate volume request. Default value is None.
+ :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 LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: An instance of LROPoller that returns ElasticSnapshot. The ElasticSnapshot is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshot]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_relocate(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: Optional[IO[bytes]] = None,
+ snapshot_name: str,
+ body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[None]:
- """Relocates volume to a new stamp.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. Required.
:type volume_name: str
- :param body: Relocate volume request. Default value is None.
+ :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 LROPoller that returns None
- :rtype: ~azure.core.polling.LROPoller[None]
+ :return: An instance of LROPoller that returns ElasticSnapshot. The ElasticSnapshot is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshot]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- def begin_relocate(
+ @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(
self,
resource_group_name: str,
account_name: str,
pool_name: str,
volume_name: str,
- body: Optional[Union[_models.RelocateVolumeRequest, JSON, IO[bytes]]] = None,
+ snapshot_name: str,
+ body: Union[_models.ElasticSnapshot, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[None]:
- """Relocates volume to a new stamp.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :param volume_name: The name of the ElasticVolume. 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]
+ :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 LROPoller that returns ElasticSnapshot. The ElasticSnapshot is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~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))
- content_type = content_type if body else None
- cls: ClsType[None] = kwargs.pop("cls", None)
+ cls: ClsType[_models.ElasticSnapshot] = 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(
+ 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,
+ snapshot_name=snapshot_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -9774,136 +24019,12 @@ def begin_relocate(
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
+ def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_response
+ deserialized = _deserialize(_models.ElasticSnapshot, response.json())
if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ 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),
@@ -9918,16 +24039,39 @@ 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.ElasticSnapshot].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.ElasticSnapshot](
+ 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
+ @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,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ snapshot_name: str,
+ **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -9942,11 +24086,12 @@ def _revert_relocation_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_volumes_revert_relocation_request(
+ _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,
@@ -9964,7 +24109,7 @@ def _revert_relocation_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202]:
+ if response.status_code not in [202, 204]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -9989,21 +24134,43 @@ def _revert_relocation_initial(
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
+ @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,
+ account_name: str,
+ pool_name: str,
+ volume_name: str,
+ snapshot_name: str,
+ **kwargs: Any
) -> LROPoller[None]:
- """Reverts the volume relocation process, cleans up the new volume and starts using the
- former-existing volume.
+ """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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param pool_name: The name of the capacity pool. Required.
+ :param pool_name: The name of the ElasticCapacityPool. Required.
:type pool_name: str
- :param volume_name: The name of the volume. Required.
+ :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 LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
@@ -10016,11 +24183,12 @@ def begin_revert_relocation(
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(
+ 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,
@@ -10054,15 +24222,132 @@ 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(
+ self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any
+ ) -> ItemPaged["_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.paging.ItemPaged[~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)
-class SnapshotsOperations:
+ 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
+
+ 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, 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 ElasticSnapshotPoliciesOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.netapp.NetAppManagementClient`'s
- :attr:`snapshots` attribute.
+ :attr:`elastic_snapshot_policies` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -10073,30 +24358,34 @@ 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,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- **kwargs: Any
- ) -> _models.Snapshot:
- """Get details of the specified snapshot.
+ 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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
+ :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 = {
@@ -10110,14 +24399,12 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None)
+ cls: ClsType[_models.ElasticSnapshotPolicy] = kwargs.pop("cls", None)
- _request = build_snapshots_get_request(
+ _request = build_elastic_snapshot_policies_get_request(
resource_group_name=resource_group_name,
account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
+ snapshot_policy_name=snapshot_policy_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -10151,21 +24438,34 @@ def get(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.Snapshot, response.json())
+ deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
- def _create_initial(
+ @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,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: Union[_models.Snapshot, JSON, IO[bytes]],
+ snapshot_policy_name: str,
+ body: Union[_models.ElasticSnapshotPolicy, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -10189,12 +24489,10 @@ def _create_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_snapshots_create_request(
+ _request = build_elastic_snapshot_policies_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,
+ snapshot_policy_name=snapshot_policy_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -10214,7 +24512,7 @@ def _create_initial(
response = pipeline_response.http_response
- if response.status_code not in [201, 202]:
+ if response.status_code not in [200, 201]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -10227,8 +24525,11 @@ def _create_initial(
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"))
+ 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()
@@ -10238,163 +24539,152 @@ def _create_initial(
return deserialized # type: ignore
@overload
- def begin_create(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: _models.Snapshot,
+ snapshot_policy_name: str,
+ body: _models.ElasticSnapshotPolicy,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Create the specified snapshot within the given volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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
+ :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 LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
+ :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
+ is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
+ snapshot_policy_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Create the specified snapshot within the given volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
+ :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
+ is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
+ snapshot_policy_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Create the specified snapshot within the given volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
+ :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
+ is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- def begin_create(
+ @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(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: Union[_models.Snapshot, JSON, IO[bytes]],
+ snapshot_policy_name: str,
+ body: Union[_models.ElasticSnapshotPolicy, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Create the specified snapshot within the given volume.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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]
+ :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 LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
+ is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~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.Snapshot] = kwargs.pop("cls", 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_initial(
+ 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,
- snapshot_name=snapshot_name,
+ snapshot_policy_name=snapshot_policy_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -10406,14 +24696,10 @@ def begin_create(
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())
+ deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json())
if cls:
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
+ return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
path_format_arguments = {
@@ -10429,24 +24715,37 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.Snapshot].from_continuation_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.Snapshot](
+ return LROPoller[_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"],
+ )
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]],
+ snapshot_policy_name: str,
+ body: Union[_models.ElasticSnapshotPolicy, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -10470,12 +24769,10 @@ def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_snapshots_update_request(
+ _request = build_elastic_snapshot_policies_update_request(
resource_group_name=resource_group_name,
account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
+ snapshot_policy_name=snapshot_policy_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -10524,35 +24821,29 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: _models.SnapshotPatch,
+ snapshot_policy_name: str,
+ body: _models.ElasticSnapshotPolicy,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Patch a snapshot.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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
+ :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.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 LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
+ :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
+ is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -10561,35 +24852,29 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
+ snapshot_policy_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Patch a snapshot.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
+ :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
+ is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -10598,75 +24883,78 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
+ snapshot_policy_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Patch a snapshot.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 LROPoller that returns Snapshot. The Snapshot is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.Snapshot]
+ :return: An instance of LROPoller that returns ElasticSnapshotPolicy. The ElasticSnapshotPolicy
+ is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
: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,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- body: Union[_models.SnapshotPatch, JSON, IO[bytes]],
+ snapshot_policy_name: str,
+ body: Union[_models.ElasticSnapshotPolicy, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.Snapshot]:
- """Patch a snapshot.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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]
+ :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:
+ 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]
: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)
+ 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)
@@ -10674,9 +24962,7 @@ def begin_update(
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,
+ snapshot_policy_name=snapshot_policy_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -10689,7 +24975,7 @@ def begin_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.Snapshot, response.json())
+ deserialized = _deserialize(_models.ElasticSnapshotPolicy, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -10707,24 +24993,31 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.Snapshot].from_continuation_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.Snapshot](
+ return LROPoller[_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"],
+ )
def _delete_initial(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- **kwargs: Any
+ self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -10739,12 +25032,10 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_snapshots_delete_request(
+ _request = build_elastic_snapshot_policies_delete_request(
resource_group_name=resource_group_name,
account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
- snapshot_name=snapshot_name,
+ snapshot_policy_name=snapshot_policy_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -10762,7 +25053,7 @@ def _delete_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202, 204]:
+ if response.status_code not in [202, 204]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -10787,28 +25078,31 @@ 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,
- pool_name: str,
- volume_name: str,
- snapshot_name: str,
- **kwargs: Any
+ self, resource_group_name: str, account_name: str, snapshot_policy_name: str, **kwargs: Any
) -> LROPoller[None]:
- """Delete snapshot.
+ """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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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 snapshot_policy_name: The name of the ElasticSnapshotPolicy. 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:
@@ -10824,9 +25118,7 @@ def begin_delete(
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,
+ snapshot_policy_name=snapshot_policy_name,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -10861,28 +25153,31 @@ 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(
- 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.
+ @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.
:param resource_group_name: 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.
+ :param account_name: The name of the ElasticAccount. 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]
+ :return: An iterator like instance of ElasticSnapshotPolicy
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticSnapshotPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.ElasticSnapshotPolicy]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -10895,11 +25190,9 @@ def list(
def prepare_request(next_link=None):
if not next_link:
- _request = build_snapshots_list_request(
+ _request = build_elastic_snapshot_policies_list_by_elastic_account_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,
@@ -10936,7 +25229,7 @@ def prepare_request(next_link=None):
def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.Snapshot], deserialized.get("value", []))
+ 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, iter(list_of_elem)
@@ -10962,284 +25255,128 @@ def get_next(next_link=None):
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.
+ @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
+ ) -> ItemPaged["_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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]
+ :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.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticVolume]
:raises ~azure.core.exceptions.HttpResponseError:
"""
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = kwargs.pop("params", {}) or {}
- @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.
+ cls: ClsType[List[_models.ElasticVolume]] = kwargs.pop("cls", 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 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:
- """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
- @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.
+ def prepare_request(next_link=None):
+ if not next_link:
- :param resource_group_name: 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:
- """
+ _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)
- @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.
+ return _request
- :param resource_group_name: 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 {}
+ 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)
- 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
+ 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
)
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
+ response = pipeline_response.http_response
- def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
- if cls:
- return cls(pipeline_response, None, {}) # type: ignore
+ 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)
- path_format_arguments = {
- "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
- }
+ return pipeline_response
- 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
+ return ItemPaged(get_next, extract_data)
-class SnapshotPoliciesOperations:
+class ElasticBackupVaultsOperations:
"""
.. 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.
+ :attr:`elastic_backup_vaults` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -11250,20 +25387,34 @@ 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, snapshot_policy_name: str, **kwargs: Any
- ) -> _models.SnapshotPolicy:
- """Get a snapshot Policy.
+ 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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
+ :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 = {
@@ -11277,12 +25428,12 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.SnapshotPolicy] = kwargs.pop("cls", None)
+ cls: ClsType[_models.ElasticBackupVault] = kwargs.pop("cls", None)
- _request = build_snapshot_policies_get_request(
+ _request = build_elastic_backup_vaults_get_request(
resource_group_name=resource_group_name,
account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
+ backup_vault_name=backup_vault_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -11316,201 +25467,314 @@ def get(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.SnapshotPolicy, response.json())
+ 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"],
+ )
+ 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
+ ) -> 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_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 = 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 create(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
- snapshot_policy_name: str,
- body: _models.SnapshotPolicy,
+ backup_vault_name: str,
+ body: _models.ElasticBackupVault,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> _models.SnapshotPolicy:
- """Create a snapshot policy.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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
+ :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: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy
+ :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def create(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
- snapshot_policy_name: str,
+ backup_vault_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> _models.SnapshotPolicy:
- """Create a snapshot policy.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy
+ :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def create(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
- snapshot_policy_name: str,
+ backup_vault_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> _models.SnapshotPolicy:
- """Create a snapshot policy.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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: SnapshotPolicy. The SnapshotPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy
+ :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- def create(
+ @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(
self,
resource_group_name: str,
account_name: str,
- snapshot_policy_name: str,
- body: Union[_models.SnapshotPolicy, JSON, IO[bytes]],
+ backup_vault_name: str,
+ body: Union[_models.ElasticBackupVault, JSON, IO[bytes]],
**kwargs: Any
- ) -> _models.SnapshotPolicy:
- """Create a snapshot policy.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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
+ :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]
: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)
+ cls: ClsType[_models.ElasticBackupVault] = 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,
+ 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):
+ response = pipeline_response.http_response
+ deserialized = _deserialize(_models.ElasticBackupVault, response.json())
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
- _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,
+ 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.SnapshotPolicy, response.json())
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.ElasticBackupVault].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_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"],
+ )
def _update_initial(
self,
resource_group_name: str,
account_name: str,
- snapshot_policy_name: str,
- body: Union[_models.SnapshotPolicyPatch, JSON, IO[bytes]],
+ backup_vault_name: str,
+ body: Union[_models.ElasticBackupVault, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -11534,10 +25798,10 @@ def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_snapshot_policies_update_request(
+ _request = build_elastic_backup_vaults_update_request(
resource_group_name=resource_group_name,
account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
+ backup_vault_name=backup_vault_name,
subscription_id=self._config.subscription_id,
content_type=content_type,
api_version=self._config.api_version,
@@ -11586,29 +25850,29 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- snapshot_policy_name: str,
- body: _models.SnapshotPolicyPatch,
+ backup_vault_name: str,
+ body: _models.ElasticBackupVault,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.SnapshotPolicy]:
- """Patch a snapshot policy.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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
+ :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.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 LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy]
+ :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -11617,29 +25881,29 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- snapshot_policy_name: str,
+ backup_vault_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.SnapshotPolicy]:
- """Patch a snapshot policy.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy]
+ :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -11648,63 +25912,78 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- snapshot_policy_name: str,
+ backup_vault_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.SnapshotPolicy]:
- """Patch a snapshot policy.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 LROPoller that returns SnapshotPolicy. The SnapshotPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy]
+ :return: An instance of LROPoller that returns ElasticBackupVault. The ElasticBackupVault is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupVault]
: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,
- snapshot_policy_name: str,
- body: Union[_models.SnapshotPolicyPatch, JSON, IO[bytes]],
+ backup_vault_name: str,
+ body: Union[_models.ElasticBackupVault, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.SnapshotPolicy]:
- """Patch a snapshot policy.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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]
+ :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:
+ 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]
: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)
+ cls: ClsType[_models.ElasticBackupVault] = 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)
@@ -11712,7 +25991,7 @@ def begin_update(
raw_result = self._update_initial(
resource_group_name=resource_group_name,
account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
+ backup_vault_name=backup_vault_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -11725,7 +26004,7 @@ def begin_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.SnapshotPolicy, response.json())
+ deserialized = _deserialize(_models.ElasticBackupVault, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -11743,18 +26022,31 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.SnapshotPolicy].from_continuation_token(
+ return LROPoller[_models.ElasticBackupVault].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.SnapshotPolicy](
+ return LROPoller[_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"],
+ )
def _delete_initial(
- self, resource_group_name: str, account_name: str, snapshot_policy_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,
@@ -11769,10 +26061,10 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_snapshot_policies_delete_request(
+ _request = build_elastic_backup_vaults_delete_request(
resource_group_name=resource_group_name,
account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
+ backup_vault_name=backup_vault_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -11790,7 +26082,7 @@ def _delete_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202, 204]:
+ if response.status_code not in [202, 204]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -11815,18 +26107,31 @@ 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, snapshot_policy_name: str, **kwargs: Any
+ self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
) -> LROPoller[None]:
- """Delete snapshot policy.
+ """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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param snapshot_policy_name: The name of the snapshot policy. Required.
- :type snapshot_policy_name: str
+ :param backup_vault_name: The name of the ElasticBackupVault. 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:
@@ -11842,7 +26147,7 @@ def begin_delete(
raw_result = self._delete_initial(
resource_group_name=resource_group_name,
account_name=account_name,
- snapshot_policy_name=snapshot_policy_name,
+ backup_vault_name=backup_vault_name,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -11877,22 +26182,31 @@ 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(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.SnapshotPolicy"]:
- """List snapshot policy.
+ @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.
:param resource_group_name: 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.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :return: An iterator like instance of SnapshotPolicy
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.SnapshotPolicy]
+ :return: An iterator like instance of ElasticBackupVault
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticBackupVault]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[List[_models.SnapshotPolicy]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.ElasticBackupVault]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -11905,7 +26219,7 @@ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> It
def prepare_request(next_link=None):
if not next_link:
- _request = build_snapshot_policies_list_request(
+ _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,
@@ -11944,7 +26258,7 @@ def prepare_request(next_link=None):
def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.SnapshotPolicy], deserialized.get("value", []))
+ 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, iter(list_of_elem)
@@ -11970,90 +26284,15 @@ def get_next(next_link=None):
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:
+class ElasticBackupPoliciesOperations:
"""
.. 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.
+ :attr:`elastic_backup_policies` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -12064,20 +26303,34 @@ 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.BackupPolicy:
- """Get a particular backup Policy.
+ ) -> _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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
:type backup_policy_name: str
- :return: BackupPolicy. The BackupPolicy is compatible with MutableMapping
- :rtype: ~azure.mgmt.netapp.models.BackupPolicy
+ :return: ElasticBackupPolicy. The ElasticBackupPolicy is compatible with MutableMapping
+ :rtype: ~azure.mgmt.netapp.models.ElasticBackupPolicy
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
@@ -12091,9 +26344,9 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.BackupPolicy] = kwargs.pop("cls", None)
+ cls: ClsType[_models.ElasticBackupPolicy] = kwargs.pop("cls", None)
- _request = build_backup_policies_get_request(
+ _request = build_elastic_backup_policies_get_request(
resource_group_name=resource_group_name,
account_name=account_name,
backup_policy_name=backup_policy_name,
@@ -12130,19 +26383,34 @@ def get(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.BackupPolicy, response.json())
+ deserialized = _deserialize(_models.ElasticBackupPolicy, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
- def _create_initial(
+ @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(
self,
resource_group_name: str,
account_name: str,
backup_policy_name: str,
- body: Union[_models.BackupPolicy, JSON, IO[bytes]],
+ body: Union[_models.ElasticBackupPolicy, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -12166,7 +26434,7 @@ def _create_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_backup_policies_create_request(
+ _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,
@@ -12189,7 +26457,7 @@ def _create_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 201, 202]:
+ if response.status_code not in [200, 201]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -12208,10 +26476,6 @@ def _create_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:
@@ -12220,38 +26484,38 @@ def _create_initial(
return deserialized # type: ignore
@overload
- def begin_create(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
backup_policy_name: str,
- body: _models.BackupPolicy,
+ body: _models.ElasticBackupPolicy,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Create a backup policy for Netapp Account.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :param backup_policy_name: The name of the ElasticBackupPolicy. 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
+ :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 LROPoller that returns BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
+ :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
@@ -12260,29 +26524,29 @@ def begin_create(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Create a backup policy for Netapp Account.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
:type backup_policy_name: str
- :param body: Backup policy object supplied in the body of the operation. Required.
+ :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 BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
+ :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
@@ -12291,63 +26555,78 @@ def begin_create(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Create a backup policy for Netapp Account.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
:type backup_policy_name: str
- :param body: Backup policy object supplied in the body of the operation. Required.
+ :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 BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
+ :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- def begin_create(
+ @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(
self,
resource_group_name: str,
account_name: str,
backup_policy_name: str,
- body: Union[_models.BackupPolicy, JSON, IO[bytes]],
+ body: Union[_models.ElasticBackupPolicy, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Create a backup policy for Netapp Account.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :param backup_policy_name: The name of the ElasticBackupPolicy. 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]
+ :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
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~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.BackupPolicy] = kwargs.pop("cls", None)
+ cls: ClsType[_models.ElasticBackupPolicy] = 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(
+ raw_result = self._create_or_update_initial(
resource_group_name=resource_group_name,
account_name=account_name,
backup_policy_name=backup_policy_name,
@@ -12363,7 +26642,7 @@ def begin_create(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.BackupPolicy, response.json())
+ deserialized = _deserialize(_models.ElasticBackupPolicy, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -12381,22 +26660,37 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.BackupPolicy].from_continuation_token(
+ return LROPoller[_models.ElasticBackupPolicy].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.BackupPolicy](
+ return LROPoller[_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"],
+ )
def _update_initial(
self,
resource_group_name: str,
account_name: str,
backup_policy_name: str,
- body: Union[_models.BackupPolicyPatch, JSON, IO[bytes]],
+ body: Union[_models.ElasticBackupPolicy, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -12420,7 +26714,7 @@ def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_backup_policies_update_request(
+ _request = build_elastic_backup_policies_update_request(
resource_group_name=resource_group_name,
account_name=account_name,
backup_policy_name=backup_policy_name,
@@ -12457,9 +26751,7 @@ 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"))
deserialized = response.iter_bytes()
@@ -12475,28 +26767,28 @@ def begin_update(
resource_group_name: str,
account_name: str,
backup_policy_name: str,
- body: _models.BackupPolicyPatch,
+ body: _models.ElasticBackupPolicy,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Patch a backup policy for Netapp Account.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :param backup_policy_name: The name of the ElasticBackupPolicy. 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
+ :param body: The resource properties to be updated. 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 LROPoller that returns BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
+ :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -12510,24 +26802,24 @@ def begin_update(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Patch a backup policy for Netapp Account.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
:type backup_policy_name: str
- :param body: Backup policy object supplied in the body of the operation. Required.
+ :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 BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
+ :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -12541,58 +26833,73 @@ def begin_update(
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Patch a backup policy for Netapp Account.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
:type backup_policy_name: str
- :param body: Backup policy object supplied in the body of the operation. Required.
+ :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 BackupPolicy. The BackupPolicy is compatible
- with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupPolicy]
+ :return: An instance of LROPoller that returns ElasticBackupPolicy. The ElasticBackupPolicy is
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ElasticBackupPolicy]
: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.BackupPolicyPatch, JSON, IO[bytes]],
+ body: Union[_models.ElasticBackupPolicy, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.BackupPolicy]:
- """Patch a backup policy for Netapp Account.
+ ) -> LROPoller[_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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :param backup_policy_name: The name of the ElasticBackupPolicy. 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]
+ :param body: The resource properties to be updated. 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
+ compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~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.BackupPolicy] = kwargs.pop("cls", None)
+ cls: ClsType[_models.ElasticBackupPolicy] = 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)
@@ -12613,7 +26920,7 @@ def begin_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.BackupPolicy, response.json())
+ deserialized = _deserialize(_models.ElasticBackupPolicy, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -12631,16 +26938,29 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.BackupPolicy].from_continuation_token(
+ return LROPoller[_models.ElasticBackupPolicy].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
- return LROPoller[_models.BackupPolicy](
+ return LROPoller[_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"],
+ )
def _delete_initial(
self, resource_group_name: str, account_name: str, backup_policy_name: str, **kwargs: Any
) -> Iterator[bytes]:
@@ -12657,7 +26977,7 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_backup_policies_delete_request(
+ _request = build_elastic_backup_policies_delete_request(
resource_group_name=resource_group_name,
account_name=account_name,
backup_policy_name=backup_policy_name,
@@ -12678,7 +26998,7 @@ def _delete_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202, 204]:
+ if response.status_code not in [202, 204]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -12703,17 +27023,30 @@ 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
) -> LROPoller[None]:
- """Delete backup policy.
+ """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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :param backup_policy_name: Backup policy Name which uniquely identify backup policy. Required.
+ :param backup_policy_name: The name of the ElasticBackupPolicy. Required.
:type backup_policy_name: str
:return: An instance of LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
@@ -12765,22 +27098,31 @@ 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(self, resource_group_name: str, account_name: str, **kwargs: Any) -> ItemPaged["_models.BackupPolicy"]:
- """List backup policies for Netapp Account.
+ @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.
:param resource_group_name: 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.
+ :param account_name: The name of the ElasticAccount. Required.
:type account_name: str
- :return: An iterator like instance of BackupPolicy
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.BackupPolicy]
+ :return: An iterator like instance of ElasticBackupPolicy
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.netapp.models.ElasticBackupPolicy]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[List[_models.BackupPolicy]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.ElasticBackupPolicy]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -12793,7 +27135,7 @@ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> It
def prepare_request(next_link=None):
if not next_link:
- _request = build_backup_policies_list_request(
+ _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,
@@ -12832,7 +27174,7 @@ def prepare_request(next_link=None):
def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.BackupPolicy], deserialized.get("value", []))
+ 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, iter(list_of_elem)
@@ -12859,14 +27201,14 @@ def get_next(next_link=None):
return ItemPaged(get_next, extract_data)
-class VolumeQuotaRulesOperations:
+class ElasticBackupsOperations:
"""
.. 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.
+ :attr:`elastic_backups` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -12877,30 +27219,37 @@ 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",
+ "backup_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,
- volume_quota_rule_name: str,
- **kwargs: Any
- ) -> _models.VolumeQuotaRule:
- """Get details of the specified quota rule.
+ 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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
+ :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 = {
@@ -12914,14 +27263,13 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.VolumeQuotaRule] = kwargs.pop("cls", None)
+ cls: ClsType[_models.ElasticBackup] = kwargs.pop("cls", None)
- _request = build_volume_quota_rules_get_request(
+ _request = build_elastic_backups_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,
+ backup_vault_name=backup_vault_name,
+ backup_name=backup_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -12955,21 +27303,36 @@ def get(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.VolumeQuotaRule, response.json())
+ deserialized = _deserialize(_models.ElasticBackup, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
- def _create_initial(
+ @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,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- body: Union[_models.VolumeQuotaRule, JSON, IO[bytes]],
+ backup_vault_name: str,
+ backup_name: str,
+ body: Union[_models.ElasticBackup, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -12993,12 +27356,11 @@ def _create_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_volume_quota_rules_create_request(
+ _request = build_elastic_backups_create_or_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,
+ 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,
@@ -13032,7 +27394,9 @@ def _create_initial(
response_headers = {}
if response.status_code == 201:
- response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ 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()
@@ -13043,163 +27407,166 @@ def _create_initial(
return deserialized # type: ignore
@overload
- def begin_create(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- body: _models.VolumeQuotaRule,
+ backup_vault_name: str,
+ backup_name: str,
+ body: _models.ElasticBackup,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Create the specified quota rule within the given volume.
+ ) -> 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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
+ :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 VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
+ :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(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
+ backup_vault_name: str,
+ backup_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Create the specified quota rule within the given volume.
+ ) -> 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
+ :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(
+ def begin_create_or_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
+ backup_vault_name: str,
+ backup_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Create the specified quota rule within the given volume.
+ ) -> 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
+ :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
- def begin_create(
+ @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_create_or_update(
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]],
+ backup_vault_name: str,
+ backup_name: str,
+ body: Union[_models.ElasticBackup, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Create the specified quota rule within the given volume.
+ ) -> 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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]
+ :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]
: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)
+ 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_initial(
+ 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,
- volume_quota_rule_name=volume_quota_rule_name,
+ backup_vault_name=backup_vault_name,
+ backup_name=backup_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -13212,7 +27579,7 @@ def begin_create(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.VolumeQuotaRule, response.json())
+ deserialized = _deserialize(_models.ElasticBackup, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -13230,24 +27597,39 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.VolumeQuotaRule].from_continuation_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.VolumeQuotaRule](
+ 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",
+ "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,
- volume_quota_rule_name: str,
- body: Union[_models.VolumeQuotaRulePatch, JSON, IO[bytes]],
+ backup_vault_name: str,
+ backup_name: str,
+ body: Union[_models.ElasticBackup, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -13271,12 +27653,11 @@ def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_volume_quota_rules_update_request(
+ _request = build_elastic_backups_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,
+ 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,
@@ -13325,35 +27706,32 @@ 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,
+ backup_vault_name: str,
+ backup_name: str,
+ body: _models.ElasticBackup,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Patch a quota rule.
+ ) -> 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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
+ :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 LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
+ :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:
"""
@@ -13362,35 +27740,32 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
+ backup_vault_name: str,
+ backup_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Patch a quota rule.
+ ) -> 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 LROPoller that returns VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
+ :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:
"""
@@ -13399,75 +27774,85 @@ def begin_update(
self,
resource_group_name: str,
account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
+ backup_vault_name: str,
+ backup_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Patch a quota rule.
+ ) -> 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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.
+ :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 VolumeQuotaRule. The VolumeQuotaRule is
- compatible with MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.VolumeQuotaRule]
+ :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(
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]],
+ backup_vault_name: str,
+ backup_name: str,
+ body: Union[_models.ElasticBackup, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.VolumeQuotaRule]:
- """Patch a quota rule.
+ ) -> 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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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]
+ :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.VolumeQuotaRule] = kwargs.pop("cls", 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)
@@ -13475,9 +27860,8 @@ def begin_update(
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,
+ backup_vault_name=backup_vault_name,
+ backup_name=backup_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -13490,7 +27874,7 @@ def begin_update(
def get_long_running_output(pipeline_response):
response = pipeline_response.http_response
- deserialized = _deserialize(_models.VolumeQuotaRule, response.json())
+ deserialized = _deserialize(_models.ElasticBackup, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -13508,24 +27892,32 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.VolumeQuotaRule].from_continuation_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.VolumeQuotaRule](
+ 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,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_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,
@@ -13540,12 +27932,11 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_volume_quota_rules_delete_request(
+ _request = build_elastic_backups_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,
+ backup_vault_name=backup_vault_name,
+ backup_name=backup_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -13563,7 +27954,7 @@ def _delete_initial(
response = pipeline_response.http_response
- if response.status_code not in [200, 202, 204]:
+ if response.status_code not in [202, 204]:
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
@@ -13588,28 +27979,34 @@ 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",
+ "backup_name",
+ ]
+ },
+ api_versions_list=["2025-09-01-preview"],
+ )
def begin_delete(
- self,
- resource_group_name: str,
- account_name: str,
- pool_name: str,
- volume_name: str,
- volume_quota_rule_name: str,
- **kwargs: Any
+ self, resource_group_name: str, account_name: str, backup_vault_name: str, backup_name: str, **kwargs: Any
) -> LROPoller[None]:
- """Delete quota rule.
+ """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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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 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 LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
@@ -13625,9 +28022,8 @@ def begin_delete(
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,
+ backup_vault_name=backup_vault_name,
+ backup_name=backup_name,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -13662,28 +28058,40 @@ 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_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.
+ @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 NetApp account. Required.
+ :param account_name: The name of the ElasticAccount. 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]
+ :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.VolumeQuotaRule]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.ElasticBackup]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -13696,11 +28104,10 @@ def list_by_volume(
def prepare_request(next_link=None):
if not next_link:
- _request = build_volume_quota_rules_list_by_volume_request(
+ _request = build_elastic_backups_list_by_vault_request(
resource_group_name=resource_group_name,
account_name=account_name,
- pool_name=pool_name,
- volume_name=volume_name,
+ backup_vault_name=backup_vault_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -13737,7 +28144,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.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)
@@ -13764,14 +28171,14 @@ def get_next(next_link=None):
return ItemPaged(get_next, extract_data)
-class BackupVaultsOperations:
+class ActiveDirectoryConfigsOperations:
"""
.. 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:`active_directory_configs` attribute.
"""
def __init__(self, *args, **kwargs) -> None:
@@ -13782,20 +28189,31 @@ 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, account_name: str, backup_vault_name: str, **kwargs: Any
- ) -> _models.BackupVault:
- """Get the Backup Vault.
+ 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 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
+ :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 = {
@@ -13809,12 +28227,11 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
- cls: ClsType[_models.BackupVault] = kwargs.pop("cls", None)
+ cls: ClsType[_models.ActiveDirectoryConfig] = kwargs.pop("cls", None)
- _request = build_backup_vaults_get_request(
+ _request = build_active_directory_configs_get_request(
resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
+ active_directory_config_name=active_directory_config_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -13848,19 +28265,32 @@ def get(
if _stream:
deserialized = response.iter_bytes()
else:
- deserialized = _deserialize(_models.BackupVault, response.json())
+ 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"],
+ )
def _create_or_update_initial(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: Union[_models.BackupVault, JSON, IO[bytes]],
+ active_directory_config_name: str,
+ body: Union[_models.ActiveDirectoryConfig, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -13884,10 +28314,9 @@ 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_active_directory_configs_create_or_update_request(
resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_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,
@@ -13937,30 +28366,27 @@ def _create_or_update_initial(
def begin_create_or_update(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: _models.BackupVault,
+ active_directory_config_name: str,
+ body: _models.ActiveDirectoryConfig,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Create or update the specified Backup Vault in the NetApp account.
+ ) -> LROPoller[_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 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
+ :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 LROPoller that returns BackupVault. The BackupVault is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
+ is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -13968,30 +28394,27 @@ def begin_create_or_update(
def begin_create_or_update(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
+ active_directory_config_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.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 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.
+ :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 LROPoller that returns BackupVault. The BackupVault is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
+ is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -13999,72 +28422,79 @@ def begin_create_or_update(
def begin_create_or_update(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
+ active_directory_config_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.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 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.
+ :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 LROPoller that returns BackupVault. The BackupVault is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
+ is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
: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,
- account_name: str,
- backup_vault_name: str,
- body: Union[_models.BackupVault, JSON, IO[bytes]],
+ active_directory_config_name: str,
+ body: Union[_models.ActiveDirectoryConfig, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Create or update the specified Backup Vault in the NetApp account.
+ ) -> LROPoller[_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 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]
+ :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]
: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.ActiveDirectoryConfig] = 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,
+ active_directory_config_name=active_directory_config_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -14077,7 +28507,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.ActiveDirectoryConfig, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -14095,22 +28525,35 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.BackupVault].from_continuation_token(
+ return LROPoller[_models.ActiveDirectoryConfig].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.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"],
+ )
def _update_initial(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: Union[_models.BackupVaultPatch, JSON, IO[bytes]],
+ active_directory_config_name: str,
+ body: Union[_models.ActiveDirectoryConfigUpdate, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
@@ -14134,10 +28577,9 @@ def _update_initial(
else:
_content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore
- _request = build_backup_vaults_update_request(
+ _request = build_active_directory_configs_update_request(
resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_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,
@@ -14185,30 +28627,27 @@ def _update_initial(
def begin_update(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
- body: _models.BackupVaultPatch,
+ active_directory_config_name: str,
+ body: _models.ActiveDirectoryConfigUpdate,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Patch the specified NetApp Backup Vault.
+ ) -> LROPoller[_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 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
+ :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 LROPoller that returns BackupVault. The BackupVault is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
+ is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -14216,30 +28655,27 @@ def begin_update(
def begin_update(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
+ active_directory_config_name: str,
body: JSON,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Patch the specified NetApp Backup Vault.
+ ) -> LROPoller[_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 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.
+ :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 LROPoller that returns BackupVault. The BackupVault is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
+ is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@@ -14247,72 +28683,79 @@ def begin_update(
def begin_update(
self,
resource_group_name: str,
- account_name: str,
- backup_vault_name: str,
+ active_directory_config_name: str,
body: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Patch the specified NetApp Backup Vault.
+ ) -> LROPoller[_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 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.
+ :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 LROPoller that returns BackupVault. The BackupVault is compatible with
- MutableMapping
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.BackupVault]
+ :return: An instance of LROPoller that returns ActiveDirectoryConfig. The ActiveDirectoryConfig
+ is compatible with MutableMapping
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ActiveDirectoryConfig]
: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,
- account_name: str,
- backup_vault_name: str,
- body: Union[_models.BackupVaultPatch, JSON, IO[bytes]],
+ active_directory_config_name: str,
+ body: Union[_models.ActiveDirectoryConfigUpdate, JSON, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.BackupVault]:
- """Patch the specified NetApp Backup Vault.
+ ) -> LROPoller[_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 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]
+ :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]
: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.ActiveDirectoryConfig] = 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,
+ active_directory_config_name=active_directory_config_name,
body=body,
content_type=content_type,
cls=lambda x, y, z: x,
@@ -14325,7 +28768,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.ActiveDirectoryConfig, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized
@@ -14343,18 +28786,30 @@ def get_long_running_output(pipeline_response):
else:
polling_method = polling
if cont_token:
- return LROPoller[_models.BackupVault].from_continuation_token(
+ return LROPoller[_models.ActiveDirectoryConfig].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.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"],
+ )
def _delete_initial(
- self, resource_group_name: str, account_name: str, backup_vault_name: str, **kwargs: Any
+ self, resource_group_name: str, active_directory_config_name: str, **kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -14369,10 +28824,9 @@ def _delete_initial(
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
- _request = build_backup_vaults_delete_request(
+ _request = build_active_directory_configs_delete_request(
resource_group_name=resource_group_name,
- account_name=account_name,
- backup_vault_name=backup_vault_name,
+ active_directory_config_name=active_directory_config_name,
subscription_id=self._config.subscription_id,
api_version=self._config.api_version,
headers=_headers,
@@ -14415,18 +28869,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",
+ "active_directory_config_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, active_directory_config_name: str, **kwargs: Any
) -> LROPoller[None]:
- """Delete the specified Backup Vault.
+ """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 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 active_directory_config_name: The name of the ActiveDirectoryConfig. Required.
+ :type active_directory_config_name: str
:return: An instance of LROPoller that returns None
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
@@ -14441,8 +28905,7 @@ def begin_delete(
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,
+ active_directory_config_name=active_directory_config_name,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
@@ -14477,24 +28940,27 @@ 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.
+ @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.
:param resource_group_name: 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]
+ :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.BackupVault]] = kwargs.pop("cls", None)
+ cls: ClsType[List[_models.ActiveDirectoryConfig]] = kwargs.pop("cls", None)
error_map: MutableMapping = {
401: ClientAuthenticationError,
@@ -14507,9 +28973,8 @@ 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_active_directory_configs_list_by_resource_group_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,
@@ -14546,7 +29011,99 @@ def prepare_request(next_link=None):
def extract_data(pipeline_response):
deserialized = pipeline_response.http_response.json()
- list_of_elem = _deserialize(List[_models.BackupVault], deserialized.get("value", []))
+ 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", []))
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 b25a252ae114..c139f1b7f0ad 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/Accounts_ChangeKeyVault.json
+# x-ms-original-file: 2025-09-01-preview/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 fc794531ebe0..0ae46b2af012 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/Accounts_CreateOrUpdate.json
+# x-ms-original-file: 2025-09-01-preview/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 985f68534507..7067a12f0782 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": "ad_password",
+ "password": "",
"site": "SiteName",
"smbServerName": "SMBServer",
"username": "ad_user_name",
@@ -56,6 +56,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01/Accounts_CreateOrUpdateAD.json
+# x-ms-original-file: 2025-09-01-preview/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 7ee29f1a4b37..699b7ab6bb1e 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/Accounts_Delete.json
+# x-ms-original-file: 2025-09-01-preview/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 dc9bda067e30..9c5379af8cbb 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/Accounts_Get.json
+# x-ms-original-file: 2025-09-01-preview/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 3f86003c9dac..52384fef3b76 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/Accounts_GetChangeKeyVaultInformation.json
+# x-ms-original-file: 2025-09-01-preview/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 6c2b3655d105..425b0da03485 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/Accounts_List.json
+# x-ms-original-file: 2025-09-01-preview/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 7035a73a82ec..885f93b54195 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/Accounts_ListBySubscription.json
+# x-ms-original-file: 2025-09-01-preview/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 d11c5371b5ac..d3fecf8da7cb 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/Accounts_RenewCredentials.json
+# x-ms-original-file: 2025-09-01-preview/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 f6c2e2a57068..3506c4a90f4c 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/Accounts_TransitionEncryptionKey.json
+# x-ms-original-file: 2025-09-01-preview/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 f09a53c5f1f5..30158ef3119d 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/Accounts_Update.json
+# x-ms-original-file: 2025-09-01-preview/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
new file mode 100644
index 000000000000..62eefc79b95f
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_create_or_update.py
@@ -0,0 +1,73 @@
+# 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
new file mode 100644
index 000000000000..3eb94b599c5f
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_delete.py
@@ -0,0 +1,41 @@
+# 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
new file mode 100644
index 000000000000..c2cf2be0eec9
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_get.py
@@ -0,0 +1,42 @@
+# 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
new file mode 100644
index 000000000000..2cc675e0db04
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_resource_group.py
@@ -0,0 +1,42 @@
+# 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
new file mode 100644
index 000000000000..2a27ab7ebb24
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_list_by_subscription.py
@@ -0,0 +1,40 @@
+# 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
new file mode 100644
index 000000000000..432a8ee7ab85
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/active_directory_configs_update.py
@@ -0,0 +1,43 @@
+# 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 99117b065a9f..3b3a2f7dad37 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/BackupPolicies_Create.json
+# x-ms-original-file: 2025-09-01-preview/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 328a4eb25c3b..9fa42379d9f2 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/BackupPolicies_Delete.json
+# x-ms-original-file: 2025-09-01-preview/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 3de8e58dd8ca..b7f3335f0f6a 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/BackupPolicies_Get.json
+# x-ms-original-file: 2025-09-01-preview/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 db47f3b2ccfb..fed981bed483 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/BackupPolicies_List.json
+# x-ms-original-file: 2025-09-01-preview/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 e56ef6673ce6..e78f4d96ebe2 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/BackupPolicies_Update.json
+# x-ms-original-file: 2025-09-01-preview/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 9fd2d262aaee..33d3256a33ad 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/BackupVaults_Create.json
+# x-ms-original-file: 2025-09-01-preview/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 5cca8f13f971..4de19521977c 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/BackupVaults_Delete.json
+# x-ms-original-file: 2025-09-01-preview/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 0122dd04656e..650580b6d044 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/BackupVaults_Get.json
+# x-ms-original-file: 2025-09-01-preview/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 751171a2db0d..1a5ef3a56221 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/BackupVaults_List.json
+# x-ms-original-file: 2025-09-01-preview/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 090f8c5fdcac..d9a7869fac9d 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/BackupVaults_Update.json
+# x-ms-original-file: 2025-09-01-preview/BackupVaults_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_list_by_vault.py
similarity index 92%
rename from sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py
rename to sdk/netapp/azure-mgmt-netapp/generated_samples/backups_list_by_vault.py
index d49cc911a4f6..72a29844b8e7 100644
--- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_list_by_vault.py
@@ -15,7 +15,7 @@
pip install azure-identity
pip install azure-mgmt-netapp
# USAGE
- python backups_under_backup_vault_list.py
+ python 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,
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_List.json
+# x-ms-original-file: 2025-09-01-preview/Backups_ListByVault.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 4ce353659b4b..29f94c86f102 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/BackupsUnderAccount_Migrate.json
+# x-ms-original-file: 2025-09-01-preview/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 eb9f2f235bb2..5bd671b36110 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
@@ -46,6 +46,6 @@ def main():
print(response)
-# x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_Create.json
+# x-ms-original-file: 2025-09-01-preview/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 eccf7fedc16c..0966a7f05c0c 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/BackupsUnderBackupVault_Delete.json
+# x-ms-original-file: 2025-09-01-preview/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 8ab5cb3fcc76..e06ea7ccf3e4 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/BackupsUnderBackupVault_Get.json
+# x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Get.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 761b0cb29c82..775925ab4956 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/BackupsUnderBackupVault_SingleFileRestore.json
+# x-ms-original-file: 2025-09-01-preview/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 a3ca067906cb..b2f5d28a5c21 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/BackupsUnderBackupVault_Update.json
+# x-ms-original-file: 2025-09-01-preview/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 7d994d00187f..2547829aa596 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/BackupsUnderVolume_Migrate.json
+# x-ms-original-file: 2025-09-01-preview/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
new file mode 100644
index 000000000000..971accf3e599
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_create_or_update.py
@@ -0,0 +1,53 @@
+# 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
new file mode 100644
index 000000000000..c9d0f871ea09
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_delete.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..b780c8ef4290
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_generate_credentials.py
@@ -0,0 +1,46 @@
+# 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
new file mode 100644
index 000000000000..f9eb7cd7642a
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_get.py
@@ -0,0 +1,45 @@
+# 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
new file mode 100644
index 000000000000..f5276b53c41e
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_list.py
@@ -0,0 +1,45 @@
+# 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/buckets_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_update.py
new file mode 100644
index 000000000000..895a2bcecf77
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/buckets_update.py
@@ -0,0 +1,51 @@
+# 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_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_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"},
+ }
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: 2025-09-01-preview/Buckets_Update.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
new file mode 100644
index 000000000000..676674094a6a
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_create_or_update.py
@@ -0,0 +1,63 @@
+# 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
new file mode 100644
index 000000000000..13b34316f15e
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_delete.py
@@ -0,0 +1,43 @@
+# 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
new file mode 100644
index 000000000000..9ccdeab2c2e7
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_get.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..daf6a175ae40
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list_by_capacity_pools.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..c9bfba6ffaa1
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_list_peering_passphrases.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..76813253f463
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_pool_change.py
@@ -0,0 +1,47 @@
+# 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
new file mode 100644
index 000000000000..c3a93ef6c9b5
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/caches_update.py
@@ -0,0 +1,44 @@
+# 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",
+ )
+
+ client.caches.begin_update(
+ resource_group_name="myRG",
+ account_name="account1",
+ pool_name="pool1",
+ cache_name="cache1",
+ body={"properties": {"size": 214748364800}},
+ ).result()
+
+
+# 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 9ace63e94eca..b8757d600ff5 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/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
+ "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
},
)
print(response)
-# x-ms-original-file: 2025-09-01/CheckFilePathAvailability.json
+# x-ms-original-file: 2025-09-01-preview/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 134976c7b800..992d63f7f488 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/CheckNameAvailability.json
+# x-ms-original-file: 2025-09-01-preview/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 fa2d648cc3a3..847101ba1987 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/CheckQuotaAvailability.json
+# x-ms-original-file: 2025-09-01-preview/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
new file mode 100644
index 000000000000..f163a94e35ad
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_create_or_update.py
@@ -0,0 +1,43 @@
+# 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
new file mode 100644
index 000000000000..40b269b9eb99
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_delete.py
@@ -0,0 +1,41 @@
+# 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
new file mode 100644
index 000000000000..e5fc60f54545
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_get.py
@@ -0,0 +1,42 @@
+# 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
new file mode 100644
index 000000000000..1d8ff55c839a
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_resource_group.py
@@ -0,0 +1,42 @@
+# 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
new file mode 100644
index 000000000000..d05870872bd8
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_list_by_subscription.py
@@ -0,0 +1,40 @@
+# 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
new file mode 100644
index 000000000000..8db215da5aca
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_accounts_update.py
@@ -0,0 +1,43 @@
+# 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
new file mode 100644
index 000000000000..b1d42661ec31
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_create_or_update.py
@@ -0,0 +1,52 @@
+# 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
new file mode 100644
index 000000000000..455b5d61754e
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_delete.py
@@ -0,0 +1,42 @@
+# 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
new file mode 100644
index 000000000000..c634fd78ee37
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_get.py
@@ -0,0 +1,43 @@
+# 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
new file mode 100644
index 000000000000..564a123210bc
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_list.py
@@ -0,0 +1,43 @@
+# 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_policies_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_update.py
new file mode 100644
index 000000000000..bf2293c5e761
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_policies_update.py
@@ -0,0 +1,51 @@
+# 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_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_update(
+ resource_group_name="myRG",
+ account_name="account1",
+ backup_policy_name="backupPolicyName",
+ body={
+ "properties": {
+ "dailyBackupsToKeep": 5,
+ "monthlyBackupsToKeep": 10,
+ "policyState": "Enabled",
+ "weeklyBackupsToKeep": 10,
+ }
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: 2025-09-01-preview/ElasticBackupPolicies_Update.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
new file mode 100644
index 000000000000..c31128c7bb1f
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_create.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..265c3c1d6017
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_delete.py
@@ -0,0 +1,42 @@
+# 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
new file mode 100644
index 000000000000..f7c4deefd806
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_get.py
@@ -0,0 +1,43 @@
+# 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
new file mode 100644
index 000000000000..1b1799756e6e
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_list_by_elastic_account.py
@@ -0,0 +1,43 @@
+# 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
new file mode 100644
index 000000000000..19c25c10910f
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backup_vaults_update.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..c8f0f1b423c6
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_create_or_update.py
@@ -0,0 +1,53 @@
+# 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
new file mode 100644
index 000000000000..4561068193d5
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_delete.py
@@ -0,0 +1,43 @@
+# 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
new file mode 100644
index 000000000000..3e2dd0adef62
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_get.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..0de61c567304
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_backups_list_by_vault.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..655b97489428
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_change_zone.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..63f9cd34b904
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_check_volume_file_path_availability.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..32431c7ad704
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update.py
@@ -0,0 +1,54 @@
+# 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
new file mode 100644
index 000000000000..a628450df3da
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_create_or_update_cmk.py
@@ -0,0 +1,58 @@
+# 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
new file mode 100644
index 000000000000..73705f84d106
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_delete.py
@@ -0,0 +1,42 @@
+# 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
new file mode 100644
index 000000000000..fcb8fd8d46fe
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_get.py
@@ -0,0 +1,43 @@
+# 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
new file mode 100644
index 000000000000..305953b85e5a
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_list_by_elastic_account.py
@@ -0,0 +1,43 @@
+# 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
new file mode 100644
index 000000000000..8cb89ad7cd5c
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_capacity_pools_update.py
@@ -0,0 +1,50 @@
+# 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
new file mode 100644
index 000000000000..35acc79eff1d
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_create_or_update.py
@@ -0,0 +1,53 @@
+# 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
new file mode 100644
index 000000000000..627fa7e61845
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_delete.py
@@ -0,0 +1,42 @@
+# 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
new file mode 100644
index 000000000000..4cb09e706f75
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_get.py
@@ -0,0 +1,43 @@
+# 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
new file mode 100644
index 000000000000..27e829cbf04d
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_by_elastic_account.py
@@ -0,0 +1,43 @@
+# 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
new file mode 100644
index 000000000000..d0fb124fcb2c
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_list_elastic_volumes.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..cfb8160512c1
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshot_policies_update.py
@@ -0,0 +1,52 @@
+# 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
new file mode 100644
index 000000000000..c95c6ccd687c
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_delete.py
@@ -0,0 +1,44 @@
+# 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_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_get.py
new file mode 100644
index 000000000000..bec12792c41f
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_get.py
@@ -0,0 +1,45 @@
+# 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_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_snapshots.get(
+ resource_group_name="myRG",
+ account_name="account1",
+ pool_name="pool1",
+ volume_name="volume1",
+ snapshot_name="snapshot1",
+ )
+ print(response)
+
+
+# x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_Get.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
new file mode 100644
index 000000000000..7bdaa705c28c
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_snapshots_list_by_elastic_volume.py
@@ -0,0 +1,45 @@
+# 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
new file mode 100644
index 000000000000..d921dac463ba
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_create_or_update.py
@@ -0,0 +1,75 @@
+# 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
new file mode 100644
index 000000000000..b278873e6274
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_delete.py
@@ -0,0 +1,43 @@
+# 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
new file mode 100644
index 000000000000..384593c34da6
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_get.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..543034852b5e
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_list_by_elastic_pool.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..4cf521e944cd
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_revert.py
@@ -0,0 +1,48 @@
+# 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
new file mode 100644
index 000000000000..91bc3d91ef5a
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/elastic_volumes_update.py
@@ -0,0 +1,66 @@
+# 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 fe281aae5feb..c269626a0467 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/GroupIdListForLDAPUser.json
+# x-ms-original-file: 2025-09-01-preview/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 9647427b05aa..24c6786f3f59 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/NetAppResourceQuotaLimitsAccount_Get.json
+# x-ms-original-file: 2025-09-01-preview/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 eb8dd03f3acb..ce8ac09e9123 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/NetAppResourceQuotaLimitsAccount_List.json
+# x-ms-original-file: 2025-09-01-preview/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 949c61f58e5e..fca1f2be850e 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/NetAppResourceQuotaLimits_Get.json
+# x-ms-original-file: 2025-09-01-preview/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 e021d5a669e5..6622229d3680 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/NetAppResourceQuotaLimits_List.json
+# x-ms-original-file: 2025-09-01-preview/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 2580a158620d..33681fdaa114 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/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet",
+ "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet",
},
)
print(response)
-# x-ms-original-file: 2025-09-01/NetworkSiblingSet_Query.json
+# x-ms-original-file: 2025-09-01-preview/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 91e8400004b5..2f3832be30a1 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/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet",
+ "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet",
},
).result()
print(response)
-# x-ms-original-file: 2025-09-01/NetworkSiblingSet_Update.json
+# x-ms-original-file: 2025-09-01-preview/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 cb510fae60c7..cfa2f3510230 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/OperationList.json
+# x-ms-original-file: 2025-09-01-preview/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 07056b77377f..53ba1ca35a85 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/Pools_CreateOrUpdate.json
+# x-ms-original-file: 2025-09-01-preview/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 3e820a32c710..a2d6418240c4 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/Pools_CreateOrUpdate_CustomThroughput.json
+# x-ms-original-file: 2025-09-01-preview/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 1a1d5fdceb09..fb55ae2bbe3f 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/Pools_Delete.json
+# x-ms-original-file: 2025-09-01-preview/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 9ab489868be3..ada745ad4bfa 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/Pools_Get.json
+# x-ms-original-file: 2025-09-01-preview/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 2fd31a18de16..2ba2d0900db2 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/Pools_Get_CustomThroughput.json
+# x-ms-original-file: 2025-09-01-preview/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 3e19f3927ba8..0910db332b3a 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/Pools_List.json
+# x-ms-original-file: 2025-09-01-preview/Pools_List.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
new file mode 100644
index 000000000000..75c2dcc9d0ac
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_clear_suspects.py
@@ -0,0 +1,45 @@
+# 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 ransomware_reports_clear_suspects.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.ransomware_reports.begin_clear_suspects(
+ resource_group_name="myRG",
+ account_name="account1",
+ pool_name="pool1",
+ volume_name="volume1",
+ ransomware_report_name="ransomwareReport1",
+ body={"extensions": [".threat"], "resolution": "PotentialThreat"},
+ ).result()
+
+
+# x-ms-original-file: 2025-09-01-preview/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
new file mode 100644
index 000000000000..85f3bdd12830
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_get.py
@@ -0,0 +1,45 @@
+# 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 ransomware_reports_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.ransomware_reports.get(
+ resource_group_name="myRG",
+ account_name="account1",
+ pool_name="pool1",
+ volume_name="volume1",
+ ransomware_report_name="ransomwareReport1",
+ )
+ print(response)
+
+
+# x-ms-original-file: 2025-09-01-preview/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
new file mode 100644
index 000000000000..4849a6ea9f20
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/ransomware_reports_list.py
@@ -0,0 +1,45 @@
+# 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 ransomware_reports_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.ransomware_reports.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/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 764eecd305a9..cb378fb58dfb 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/RegionInfo.json
+# x-ms-original-file: 2025-09-01-preview/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 23ab10dd73b0..1c7de7d68fb9 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/RegionInfos_Get.json
+# x-ms-original-file: 2025-09-01-preview/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 65656e0e3efa..2bb9ea2e02d1 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/RegionInfos_List.json
+# x-ms-original-file: 2025-09-01-preview/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 899f6e3295b6..7813c15b4286 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/SnapshotPolicies_Create.json
+# x-ms-original-file: 2025-09-01-preview/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 037f5063c19f..0dfd7b3be7e0 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/SnapshotPolicies_Delete.json
+# x-ms-original-file: 2025-09-01-preview/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 f1fb5e587f4e..c3b12faa46fe 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/SnapshotPolicies_Get.json
+# x-ms-original-file: 2025-09-01-preview/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 6a8b10cbe0e6..53193473094f 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/SnapshotPolicies_List.json
+# x-ms-original-file: 2025-09-01-preview/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 eaecfe890513..77fceb003331 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/SnapshotPolicies_ListVolumes.json
+# x-ms-original-file: 2025-09-01-preview/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 6764d7701911..b5c2e5c7a4e2 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/SnapshotPolicies_Update.json
+# x-ms-original-file: 2025-09-01-preview/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 973bc5fa3e27..779f93944764 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/Snapshots_Create.json
+# x-ms-original-file: 2025-09-01-preview/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 250f2b1c4b0c..ea2ab6054610 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/Snapshots_Delete.json
+# x-ms-original-file: 2025-09-01-preview/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 99adedb6362b..dc04b2376242 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/Snapshots_Get.json
+# x-ms-original-file: 2025-09-01-preview/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 13e5cf9e9c7c..9987c22e8015 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/Snapshots_List.json
+# x-ms-original-file: 2025-09-01-preview/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 cfbdf282f075..76d4cf0a9e3f 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/Snapshots_SingleFileRestore.json
+# x-ms-original-file: 2025-09-01-preview/Snapshots_SingleFileRestore.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 0a6893ad280b..65038676c438 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/Subvolumes_Create.json
+# x-ms-original-file: 2025-09-01-preview/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 c5a643b67fe4..4e544779c185 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/Subvolumes_Delete.json
+# x-ms-original-file: 2025-09-01-preview/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 33e86af3f523..367d558c327c 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/Subvolumes_Get.json
+# x-ms-original-file: 2025-09-01-preview/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 05f9d137fefa..754c0d498e9d 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/Subvolumes_List.json
+# x-ms-original-file: 2025-09-01-preview/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 bb4e0b663190..6fe9ff1185b5 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/Subvolumes_Metadata.json
+# x-ms-original-file: 2025-09-01-preview/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 d67287e038ea..cd1e7ba7cef9 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/Subvolumes_Update.json
+# x-ms-original-file: 2025-09-01-preview/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 4a69be6f3da0..af86ac2080db 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/Usages_Get.json
+# x-ms-original-file: 2025-09-01-preview/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 c8f25200825b..9d74b57228da 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/Usages_List.json
+# x-ms-original-file: 2025-09-01-preview/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 881b9e5e051a..1fe789272428 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/VolumeGroups_Create_Oracle.json
+# x-ms-original-file: 2025-09-01-preview/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 5658a27ce6b7..d9de87adf455 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/VolumeGroups_Create_SapHana.json
+# x-ms-original-file: 2025-09-01-preview/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 0aecdfea1690..0ffea4ed6683 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/VolumeGroups_Delete.json
+# x-ms-original-file: 2025-09-01-preview/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 ecdff4d3f6da..f5132ed68c09 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/VolumeGroups_Get_Oracle.json
+# x-ms-original-file: 2025-09-01-preview/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 2a3257b77f57..cacf27ff9068 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/VolumeGroups_Get_SapHana.json
+# x-ms-original-file: 2025-09-01-preview/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 eb0aa1ef782f..830304a3435a 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/VolumeGroups_List_Oracle.json
+# x-ms-original-file: 2025-09-01-preview/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 3cfb5aba7287..e048b14f9c86 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/VolumeGroups_List_SapHana.json
+# x-ms-original-file: 2025-09-01-preview/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 57989f8177ef..32716712338a 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/VolumeQuotaRules_Create.json
+# x-ms-original-file: 2025-09-01-preview/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 e5d2b7ab70e2..02104826ddad 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/VolumeQuotaRules_Delete.json
+# x-ms-original-file: 2025-09-01-preview/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 6c88bce0e09d..e57bc6bef0d2 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/VolumeQuotaRules_Get.json
+# x-ms-original-file: 2025-09-01-preview/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 63958c0f5818..5f11e4a097e2 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/VolumeQuotaRules_List.json
+# x-ms-original-file: 2025-09-01-preview/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 080e72cbb1a2..f29f53b3444a 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/VolumeQuotaRules_Update.json
+# x-ms-original-file: 2025-09-01-preview/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 e746febfe899..8c8f71d920f0 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/Volumes_AuthorizeExternalReplication.json
+# x-ms-original-file: 2025-09-01-preview/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 e06d025c2c41..598cb148306e 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/Volumes_AuthorizeReplication.json
+# x-ms-original-file: 2025-09-01-preview/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 8e97ad8121fa..8af58e09a833 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/Volumes_BreakFileLocks.json
+# x-ms-original-file: 2025-09-01-preview/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 54cfbe2a63e2..47cbe061655d 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/Volumes_BreakReplication.json
+# x-ms-original-file: 2025-09-01-preview/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 37603c86bbe2..d7dec2b0f52a 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/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
+ "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/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/Volumes_CreateOrUpdate.json
+# x-ms-original-file: 2025-09-01-preview/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 8c430bf092b2..69b41eea7179 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/Volumes_Delete.json
+# x-ms-original-file: 2025-09-01-preview/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 a2be036bc0a2..adbd9d1dc00a 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/Volumes_DeleteReplication.json
+# x-ms-original-file: 2025-09-01-preview/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
new file mode 100644
index 000000000000..a0475a909c4a
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_get.py
@@ -0,0 +1,44 @@
+# 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
new file mode 100644
index 000000000000..b9f6ac05228e
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_extra_large_volumes_list.py
@@ -0,0 +1,44 @@
+# 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 26e4ba3e37f7..dcaef5e7eedf 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/Volumes_FinalizeExternalReplication.json
+# x-ms-original-file: 2025-09-01-preview/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 4e054d1cc2b6..64f189808641 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/Volumes_FinalizeRelocation.json
+# x-ms-original-file: 2025-09-01-preview/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 56340538f885..f9dd9b5c9efc 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/Volumes_Get.json
+# x-ms-original-file: 2025-09-01-preview/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 9b1b2443bb8c..a5b6f494f953 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/Volumes_LatestBackupStatus.json
+# x-ms-original-file: 2025-09-01-preview/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 a1e62adcb695..ab4e49b4418e 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/Volumes_LatestRestoreStatus.json
+# x-ms-original-file: 2025-09-01-preview/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 b9f0c22ffe55..692209ce26b2 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/Volumes_List.json
+# x-ms-original-file: 2025-09-01-preview/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
new file mode 100644
index 000000000000..781fe857e92f
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py
@@ -0,0 +1,44 @@
+# 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_list_quota_report.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_list_quota_report(
+ resource_group_name="myRG",
+ account_name="account1",
+ pool_name="pool1",
+ volume_name="volume1",
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: 2025-09-01-preview/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 52d2e8890ea0..e43d14fadec9 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/Volumes_ListReplications.json
+# x-ms-original-file: 2025-09-01-preview/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 9325cfc0bbf3..ff455c5c81c5 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/Volumes_PeerExternalCluster.json
+# x-ms-original-file: 2025-09-01-preview/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 ca6999604c00..9ad365289b09 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/Volumes_PerformReplicationTransfer.json
+# x-ms-original-file: 2025-09-01-preview/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 47f795c942b2..127bda99c257 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/Volumes_PoolChange.json
+# x-ms-original-file: 2025-09-01-preview/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 4a18071693c7..5a4b063aa6e6 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/Volumes_PopulateAvailabilityZones.json
+# x-ms-original-file: 2025-09-01-preview/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 0d847225deae..4820f0790a11 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/Volumes_ReInitializeReplication.json
+# x-ms-original-file: 2025-09-01-preview/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 faa8e6223e93..24e3f64c0c1f 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/Volumes_ReestablishReplication.json
+# x-ms-original-file: 2025-09-01-preview/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 7341e182b468..a5d399635993 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/Volumes_Relocate.json
+# x-ms-original-file: 2025-09-01-preview/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 b8c4077a7b6a..6363f3ab6452 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/Volumes_ReplicationStatus.json
+# x-ms-original-file: 2025-09-01-preview/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 f5bd64213605..baef8d7f1486 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/Volumes_ResetCifsPassword.json
+# x-ms-original-file: 2025-09-01-preview/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 605b88366ab3..fda3dc4cffdb 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/Volumes_ResyncReplication.json
+# x-ms-original-file: 2025-09-01-preview/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 7e3088734a86..21f8ee874958 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/Volumes_Revert.json
+# x-ms-original-file: 2025-09-01-preview/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 aeec2ed864c4..92fdd87d0bb8 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/Volumes_RevertRelocation.json
+# x-ms-original-file: 2025-09-01-preview/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 94ae34208681..62edc655e8d0 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/Volumes_SplitClone.json
+# x-ms-original-file: 2025-09-01-preview/Volumes_SplitClone.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 cfc07091c547..d25eaa9a9e1d 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,6 +86,13 @@ 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",
@@ -162,6 +169,13 @@ 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 2eeec0aab482..46d0026072d5 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,6 +92,13 @@ 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",
@@ -174,6 +181,13 @@ 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
new file mode 100644
index 000000000000..89047675dc8e
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations.py
@@ -0,0 +1,144 @@
+# 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
new file mode 100644
index 000000000000..4301312b2fc4
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_active_directory_configs_operations_async.py
@@ -0,0 +1,151 @@
+# 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
new file mode 100644
index 000000000000..a1f9566dc1a7
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations.py
@@ -0,0 +1,150 @@
+# 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
new file mode 100644
index 000000000000..eb8429798c20
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_buckets_operations_async.py
@@ -0,0 +1,157 @@
+# 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
new file mode 100644
index 000000000000..e2ab0f39d5a2
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_caches_operations.py
@@ -0,0 +1,215 @@
+# 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": [
+ {
+ "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": [
+ {
+ "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
new file mode 100644
index 000000000000..175723f6b09d
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_caches_operations_async.py
@@ -0,0 +1,224 @@
+# 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": [
+ {
+ "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": [
+ {
+ "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
new file mode 100644
index 000000000000..f1ee61b59b69
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations.py
@@ -0,0 +1,137 @@
+# 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
new file mode 100644
index 000000000000..b615d728ddcf
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_accounts_operations_async.py
@@ -0,0 +1,144 @@
+# 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
new file mode 100644
index 000000000000..f392210fef0d
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations.py
@@ -0,0 +1,126 @@
+# 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={
+ "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_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
new file mode 100644
index 000000000000..78240e5ac787
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_policies_operations_async.py
@@ -0,0 +1,133 @@
+# 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={
+ "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_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
new file mode 100644
index 000000000000..3ce433f68dee
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations.py
@@ -0,0 +1,112 @@
+# 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={
+ "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_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
new file mode 100644
index 000000000000..882aefb1ef48
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backup_vaults_operations_async.py
@@ -0,0 +1,119 @@
+# 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={
+ "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_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
new file mode 100644
index 000000000000..aca78bdf7488
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations.py
@@ -0,0 +1,139 @@
+# 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
new file mode 100644
index 000000000000..9449eb50fcc7
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_backups_operations_async.py
@@ -0,0 +1,146 @@
+# 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
new file mode 100644
index 000000000000..e07a93fc8f9d
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations.py
@@ -0,0 +1,140 @@
+# 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
new file mode 100644
index 000000000000..464803929ce1
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_capacity_pools_operations_async.py
@@ -0,0 +1,155 @@
+# 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
new file mode 100644
index 000000000000..a83e3c242c9e
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations.py
@@ -0,0 +1,138 @@
+# 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={
+ "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_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
new file mode 100644
index 000000000000..02d14798f733
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshot_policies_operations_async.py
@@ -0,0 +1,145 @@
+# 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={
+ "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_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
new file mode 100644
index 000000000000..9ec309a1ac18
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations.py
@@ -0,0 +1,88 @@
+# 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
new file mode 100644
index 000000000000..b191f7f9e9c9
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_snapshots_operations_async.py
@@ -0,0 +1,93 @@
+# 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
new file mode 100644
index 000000000000..89d83270afc8
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations.py
@@ -0,0 +1,175 @@
+# 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
new file mode 100644
index 000000000000..0e7a23ba2dde
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_elastic_volumes_operations_async.py
@@ -0,0 +1,184 @@
+# 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_ransomware_reports_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_ransomware_reports_operations.py
new file mode 100644
index 000000000000..bc10fed57d8f
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_ransomware_reports_operations.py
@@ -0,0 +1,61 @@
+# 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 TestNetAppManagementRansomwareReportsOperations(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(NetAppManagementClient)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_ransomware_reports_get(self, resource_group):
+ response = self.client.ransomware_reports.get(
+ resource_group_name=resource_group.name,
+ account_name="str",
+ pool_name="str",
+ volume_name="str",
+ ransomware_report_name="str",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_ransomware_reports_list(self, resource_group):
+ response = self.client.ransomware_reports.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_ransomware_reports_begin_clear_suspects(self, resource_group):
+ response = self.client.ransomware_reports.begin_clear_suspects(
+ resource_group_name=resource_group.name,
+ account_name="str",
+ pool_name="str",
+ volume_name="str",
+ ransomware_report_name="str",
+ body={"extensions": ["str"], "resolution": "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_ransomware_reports_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_ransomware_reports_operations_async.py
new file mode 100644
index 000000000000..7b01eef069d5
--- /dev/null
+++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_ransomware_reports_operations_async.py
@@ -0,0 +1,64 @@
+# 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 TestNetAppManagementRansomwareReportsOperationsAsync(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_ransomware_reports_get(self, resource_group):
+ response = await self.client.ransomware_reports.get(
+ resource_group_name=resource_group.name,
+ account_name="str",
+ pool_name="str",
+ volume_name="str",
+ ransomware_report_name="str",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_ransomware_reports_list(self, resource_group):
+ response = self.client.ransomware_reports.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_ransomware_reports_begin_clear_suspects(self, resource_group):
+ response = await (
+ await self.client.ransomware_reports.begin_clear_suspects(
+ resource_group_name=resource_group.name,
+ account_name="str",
+ pool_name="str",
+ volume_name="str",
+ ransomware_report_name="str",
+ body={"extensions": ["str"], "resolution": "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 7d80504ea2eb..fa7b11b561e5 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,6 +61,7 @@ def test_volume_groups_begin_create(self, resource_group):
"avsDataStore": "str",
"backupId": "str",
"baremetalTenantId": "str",
+ "breakthroughMode": "str",
"capacityPoolResourceId": "str",
"cloneProgress": 0,
"coolAccess": bool,
@@ -69,6 +70,10 @@ def test_volume_groups_begin_create(self, resource_group):
"coolnessPeriod": 0,
"dataProtection": {
"backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool},
+ "ransomwareProtection": {
+ "actualRansomwareProtectionState": "str",
+ "desiredRansomwareProtectionState": "str",
+ },
"replication": {
"destinationReplications": [
{
@@ -79,6 +84,10 @@ def test_volume_groups_begin_create(self, resource_group):
}
],
"endpointType": "str",
+ "externalReplicationSetupInfo": "str",
+ "externalReplicationSetupStatus": "str",
+ "mirrorState": "str",
+ "relationshipStatus": "str",
"remotePath": {
"externalHostName": "str",
"serverName": "str",
@@ -129,7 +138,10 @@ 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 2b00db380c10..e9c6c1e9013e 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,6 +63,7 @@ async def test_volume_groups_begin_create(self, resource_group):
"avsDataStore": "str",
"backupId": "str",
"baremetalTenantId": "str",
+ "breakthroughMode": "str",
"capacityPoolResourceId": "str",
"cloneProgress": 0,
"coolAccess": bool,
@@ -75,6 +76,10 @@ async def test_volume_groups_begin_create(self, resource_group):
"backupVaultId": "str",
"policyEnforced": bool,
},
+ "ransomwareProtection": {
+ "actualRansomwareProtectionState": "str",
+ "desiredRansomwareProtectionState": "str",
+ },
"replication": {
"destinationReplications": [
{
@@ -85,6 +90,10 @@ 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",
@@ -135,7 +144,10 @@ 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 889c748ae9e3..c246e210b195 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,6 +50,7 @@ def test_volumes_begin_create_or_update(self, resource_group):
"avsDataStore": "str",
"backupId": "str",
"baremetalTenantId": "str",
+ "breakthroughMode": "str",
"capacityPoolResourceId": "str",
"cloneProgress": 0,
"coolAccess": bool,
@@ -58,11 +59,19 @@ def test_volumes_begin_create_or_update(self, resource_group):
"coolnessPeriod": 0,
"dataProtection": {
"backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool},
+ "ransomwareProtection": {
+ "actualRansomwareProtectionState": "str",
+ "desiredRansomwareProtectionState": "str",
+ },
"replication": {
"destinationReplications": [
{"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",
@@ -109,7 +118,10 @@ 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"}
@@ -177,6 +189,7 @@ def test_volumes_begin_update(self, resource_group):
"coolnessPeriod": 0,
"dataProtection": {
"backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool},
+ "ransomwareProtection": {"desiredRansomwareProtectionState": "str"},
"snapshot": {"snapshotPolicyId": "str"},
},
"defaultGroupQuotaInKiBs": 0,
@@ -536,3 +549,16 @@ def test_volumes_begin_revert_relocation(self, resource_group):
# please add some check logic here by yourself
# ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_volumes_begin_list_quota_report(self, resource_group):
+ response = self.client.volumes.begin_list_quota_report(
+ 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
+ # ...
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 bc23c2ec13ca..4ff5a7f6cc0a 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,6 +52,7 @@ 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,
@@ -60,11 +61,19 @@ async def test_volumes_begin_create_or_update(self, resource_group):
"coolnessPeriod": 0,
"dataProtection": {
"backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool},
+ "ransomwareProtection": {
+ "actualRansomwareProtectionState": "str",
+ "desiredRansomwareProtectionState": "str",
+ },
"replication": {
"destinationReplications": [
{"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",
@@ -111,7 +120,10 @@ 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"}
@@ -181,6 +193,7 @@ async def test_volumes_begin_update(self, resource_group):
"coolnessPeriod": 0,
"dataProtection": {
"backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool},
+ "ransomwareProtection": {"desiredRansomwareProtectionState": "str"},
"snapshot": {"snapshotPolicyId": "str"},
},
"defaultGroupQuotaInKiBs": 0,
@@ -583,3 +596,18 @@ async def test_volumes_begin_revert_relocation(self, resource_group):
# please add some check logic here by yourself
# ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_volumes_begin_list_quota_report(self, resource_group):
+ response = await (
+ await self.client.volumes.begin_list_quota_report(
+ 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
+ # ...
diff --git a/sdk/netapp/azure-mgmt-netapp/pyproject.toml b/sdk/netapp/azure-mgmt-netapp/pyproject.toml
index 99f21c0f46cb..2e9e64e7e52a 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 :: 5 - Production/Stable",
+ "Development Status :: 4 - Beta",
"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 = true
+is_stable = false
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 e94566200558..f9fb28f6ffa6 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: 9cd47a976054f57864cf7cc7dd33941eaa977951
+commit: 44a12ed5a9045bb04ad3759bd96c32fe970a935c
repo: Azure/azure-rest-api-specs
additionalDirectories: