From a698d0af094cf0ae030096d0a3cd96d87b25be31 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 22 Apr 2025 04:05:40 +0000 Subject: [PATCH] CodeGen from PR 32748 in Azure/azure-rest-api-specs Merge dc5e0805a95b83eb6f776ae7fbad677d5acd63df into 1e06393fe545b07c42a71830ba0fdb366f22fb93 --- .../src/autorest.md | 2 +- ...Azure.ResourceManager.ElasticSan.net8.0.cs | 126 ++++++++- ...sourceManager.ElasticSan.netstandard2.0.cs | 126 ++++++++- .../Samples/Sample_ElasticSanCollection.cs | 28 +- ...cSanPrivateEndpointConnectionCollection.cs | 20 +- ...ticSanPrivateEndpointConnectionResource.cs | 12 +- .../Samples/Sample_ElasticSanResource.cs | 22 +- .../Sample_ElasticSanSnapshotCollection.cs | 20 +- .../Sample_ElasticSanSnapshotResource.cs | 12 +- .../Sample_ElasticSanVolumeCollection.cs | 32 ++- .../Sample_ElasticSanVolumeGroupCollection.cs | 43 +-- .../Sample_ElasticSanVolumeGroupResource.cs | 87 +++++- .../Sample_ElasticSanVolumeResource.cs | 87 +++++- .../Sample_SubscriptionResourceExtensions.cs | 8 +- .../Generated/ArmElasticSanModelFactory.cs | 34 ++- .../src/Generated/ElasticSanCollection.cs | 20 +- ...cSanPrivateEndpointConnectionCollection.cs | 20 +- ...ticSanPrivateEndpointConnectionResource.cs | 12 +- .../src/Generated/ElasticSanResource.cs | 36 +-- .../Generated/ElasticSanSnapshotCollection.cs | 20 +- .../Generated/ElasticSanSnapshotResource.cs | 12 +- .../Generated/ElasticSanVolumeCollection.cs | 35 +-- .../ElasticSanVolumeGroupCollection.cs | 35 +-- ...ElasticSanVolumeGroupData.Serialization.cs | 16 ++ .../Generated/ElasticSanVolumeGroupData.cs | 6 +- .../ElasticSanVolumeGroupResource.cs | 209 +++++++++++++- .../src/Generated/ElasticSanVolumeResource.cs | 106 ++++++- .../Extensions/ElasticSanExtensions.cs | 12 +- ...MockableElasticSanResourceGroupResource.cs | 4 +- .../MockableElasticSanSubscriptionResource.cs | 8 +- .../PreValidationResponseOperationSource.cs | 30 ++ .../DeleteRetentionPolicy.Serialization.cs | 148 ++++++++++ .../Generated/Models/DeleteRetentionPolicy.cs | 69 +++++ .../src/Generated/Models/DeleteType.cs | 48 ++++ .../Models/DiskSnapshotList.Serialization.cs | 148 ++++++++++ .../src/Generated/Models/DiskSnapshotList.cs | 77 +++++ .../Models/ElasticSanProvisioningState.cs | 9 + ...lasticSanVolumeGroupPatch.Serialization.cs | 16 ++ .../Models/ElasticSanVolumeGroupPatch.cs | 6 +- .../src/Generated/Models/PolicyState.cs | 51 ++++ .../PreValidationResponse.Serialization.cs | 129 +++++++++ .../Generated/Models/PreValidationResponse.cs | 65 +++++ .../Models/VolumeNameList.Serialization.cs | 136 +++++++++ .../src/Generated/Models/VolumeNameList.cs | 76 +++++ .../Models/XmsAccessSoftDeletedResource.cs | 51 ++++ .../ElasticSanManagementRestOperations.cs | 139 +++++++++ .../ElasticSansRestOperations.cs | 2 +- ...rivateEndpointConnectionsRestOperations.cs | 2 +- .../PrivateLinkResourcesRestOperations.cs | 2 +- .../RestOperations/SkusRestOperations.cs | 2 +- .../VolumeGroupsRestOperations.cs | 38 ++- .../VolumeSnapshotsRestOperations.cs | 2 +- .../RestOperations/VolumesRestOperations.cs | 264 ++++++++++++++++-- .../src/autorest.md | 2 +- sdk/storage/ci.yml | 2 + 55 files changed, 2426 insertions(+), 298 deletions(-) create mode 100644 sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/LongRunningOperation/PreValidationResponseOperationSource.cs create mode 100644 sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DeleteRetentionPolicy.Serialization.cs create mode 100644 sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DeleteRetentionPolicy.cs create mode 100644 sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DeleteType.cs create mode 100644 sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DiskSnapshotList.Serialization.cs create mode 100644 sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DiskSnapshotList.cs create mode 100644 sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/PolicyState.cs create mode 100644 sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/PreValidationResponse.Serialization.cs create mode 100644 sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/PreValidationResponse.cs create mode 100644 sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/VolumeNameList.Serialization.cs create mode 100644 sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/VolumeNameList.cs create mode 100644 sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/XmsAccessSoftDeletedResource.cs create mode 100644 sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/ElasticSanManagementRestOperations.cs diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md index 891b2449b699..6aa8c72fb2d2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md +++ b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md @@ -10,7 +10,7 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true library-name: Compute namespace: Azure.ResourceManager.Compute -require: https://github.com/Azure/azure-rest-api-specs/blob/883abbe08d313739069c0007eb820aa0a0710748/specification/compute/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/compute/resource-manager/readme.md #tag: package-2025-02-01 output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/api/Azure.ResourceManager.ElasticSan.net8.0.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/api/Azure.ResourceManager.ElasticSan.net8.0.cs index a88bc4acd4c3..e977da1fb78c 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/api/Azure.ResourceManager.ElasticSan.net8.0.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/api/Azure.ResourceManager.ElasticSan.net8.0.cs @@ -196,8 +196,8 @@ protected ElasticSanVolumeCollection() { } public virtual Azure.Response Exists(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = default(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = default(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -229,8 +229,8 @@ protected ElasticSanVolumeGroupCollection() { } public virtual Azure.Response Exists(string volumeGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string volumeGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string volumeGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = default(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = default(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string volumeGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string volumeGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string volumeGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -241,6 +241,7 @@ protected ElasticSanVolumeGroupCollection() { } public partial class ElasticSanVolumeGroupData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ElasticSanVolumeGroupData() { } + public Azure.ResourceManager.ElasticSan.Models.DeleteRetentionPolicy DeleteRetentionPolicy { get { throw null; } set { } } public Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType? Encryption { get { throw null; } set { } } public Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionProperties EncryptionProperties { get { throw null; } set { } } public bool? EnforceDataIntegrityCheckForIscsi { get { throw null; } set { } } @@ -273,6 +274,10 @@ protected ElasticSanVolumeGroupResource() { } public virtual Azure.Response GetElasticSanVolume(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetElasticSanVolumeAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ElasticSan.ElasticSanVolumeCollection GetElasticSanVolumes() { throw null; } + public virtual Azure.ResourceManager.ArmOperation PreBackupVolume(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.VolumeNameList volumeNameList, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PreBackupVolumeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.VolumeNameList volumeNameList, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PreRestoreVolume(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.DiskSnapshotList diskSnapshotList, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PreRestoreVolumeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.DiskSnapshotList diskSnapshotList, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ElasticSan.ElasticSanVolumeGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ElasticSan.ElasticSanVolumeGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -288,10 +293,12 @@ protected ElasticSanVolumeResource() { } public virtual Azure.ResourceManager.ElasticSan.ElasticSanVolumeData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot? xmsDeleteSnapshots = default(Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot?), Azure.ResourceManager.ElasticSan.Models.XmsForceDelete? xmsForceDelete = default(Azure.ResourceManager.ElasticSan.Models.XmsForceDelete?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot? xmsDeleteSnapshots = default(Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot?), Azure.ResourceManager.ElasticSan.Models.XmsForceDelete? xmsForceDelete = default(Azure.ResourceManager.ElasticSan.Models.XmsForceDelete?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot? xmsDeleteSnapshots = default(Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot?), Azure.ResourceManager.ElasticSan.Models.XmsForceDelete? xmsForceDelete = default(Azure.ResourceManager.ElasticSan.Models.XmsForceDelete?), Azure.ResourceManager.ElasticSan.Models.DeleteType? deleteType = default(Azure.ResourceManager.ElasticSan.Models.DeleteType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot? xmsDeleteSnapshots = default(Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot?), Azure.ResourceManager.ElasticSan.Models.XmsForceDelete? xmsForceDelete = default(Azure.ResourceManager.ElasticSan.Models.XmsForceDelete?), Azure.ResourceManager.ElasticSan.Models.DeleteType? deleteType = default(Azure.ResourceManager.ElasticSan.Models.DeleteType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RestoreVolume(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RestoreVolumeAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ElasticSan.ElasticSanVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ElasticSan.ElasticSanVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -345,8 +352,11 @@ public static partial class ArmElasticSanModelFactory public static Azure.ResourceManager.ElasticSan.ElasticSanVolumeData ElasticSanVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? volumeId = default(System.Guid?), Azure.ResourceManager.ElasticSan.Models.ElasticSanVolumeDataSourceInfo creationData = null, long sizeGiB = (long)0, Azure.ResourceManager.ElasticSan.Models.IscsiTargetInfo storageTarget = null, Azure.Core.ResourceIdentifier managedByResourceId = null, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ElasticSan.ElasticSanVolumeGroupData ElasticSanVolumeGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState, Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType? protocolType, Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType? encryption, Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionProperties encryptionProperties, System.Collections.Generic.IEnumerable virtualNetworkRules, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } - public static Azure.ResourceManager.ElasticSan.ElasticSanVolumeGroupData ElasticSanVolumeGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState?), Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType? protocolType = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType?), Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType? encryption = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType?), Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionProperties encryptionProperties = null, System.Collections.Generic.IEnumerable virtualNetworkRules = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, bool? enforceDataIntegrityCheckForIscsi = default(bool?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ElasticSan.ElasticSanVolumeGroupData ElasticSanVolumeGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState, Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType? protocolType, Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType? encryption, Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionProperties encryptionProperties, System.Collections.Generic.IEnumerable virtualNetworkRules, System.Collections.Generic.IEnumerable privateEndpointConnections, bool? enforceDataIntegrityCheckForIscsi) { throw null; } + public static Azure.ResourceManager.ElasticSan.ElasticSanVolumeGroupData ElasticSanVolumeGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState?), Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType? protocolType = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType?), Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType? encryption = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType?), Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionProperties encryptionProperties = null, System.Collections.Generic.IEnumerable virtualNetworkRules = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, bool? enforceDataIntegrityCheckForIscsi = default(bool?), Azure.ResourceManager.ElasticSan.Models.DeleteRetentionPolicy deleteRetentionPolicy = null) { throw null; } public static Azure.ResourceManager.ElasticSan.Models.IscsiTargetInfo IscsiTargetInfo(string targetIqn = null, string targetPortalHostname = null, int? targetPortalPort = default(int?), Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState?), Azure.ResourceManager.ElasticSan.Models.ResourceOperationalStatus? status = default(Azure.ResourceManager.ElasticSan.Models.ResourceOperationalStatus?)) { throw null; } + public static Azure.ResourceManager.ElasticSan.Models.PreValidationResponse PreValidationResponse(string validationStatus = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AutoScalePolicyEnforcement : System.IEquatable @@ -367,6 +377,46 @@ public static partial class ArmElasticSanModelFactory public static bool operator !=(Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement left, Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement right) { throw null; } public override string ToString() { throw null; } } + public partial class DeleteRetentionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeleteRetentionPolicy() { } + public Azure.ResourceManager.ElasticSan.Models.PolicyState? PolicyState { get { throw null; } set { } } + public int? RetentionPeriodDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.DeleteRetentionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.DeleteRetentionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DeleteType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DeleteType(string value) { throw null; } + public static Azure.ResourceManager.ElasticSan.Models.DeleteType Permanent { get { throw null; } } + public bool Equals(Azure.ResourceManager.ElasticSan.Models.DeleteType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ElasticSan.Models.DeleteType left, Azure.ResourceManager.ElasticSan.Models.DeleteType right) { throw null; } + public static implicit operator Azure.ResourceManager.ElasticSan.Models.DeleteType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ElasticSan.Models.DeleteType left, Azure.ResourceManager.ElasticSan.Models.DeleteType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DiskSnapshotList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiskSnapshotList(System.Collections.Generic.IEnumerable diskSnapshotIds) { } + public System.Collections.Generic.IList DiskSnapshotIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.DiskSnapshotList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.DiskSnapshotList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ElasticSanEncryptionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ElasticSanEncryptionProperties() { } @@ -482,10 +532,13 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public ElasticSanProvisioningState(string value) { throw null; } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Canceled { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Deleted { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Deleting { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Failed { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Invalid { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Pending { get { throw null; } } + public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Restoring { get { throw null; } } + public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState SoftDeleting { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Succeeded { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Updating { get { throw null; } } public bool Equals(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState other) { throw null; } @@ -686,6 +739,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ElasticSanVolumeGroupPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ElasticSanVolumeGroupPatch() { } + public Azure.ResourceManager.ElasticSan.Models.DeleteRetentionPolicy DeleteRetentionPolicy { get { throw null; } set { } } public Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType? Encryption { get { throw null; } set { } } public Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionProperties EncryptionProperties { get { throw null; } set { } } public bool? EnforceDataIntegrityCheckForIscsi { get { throw null; } set { } } @@ -727,6 +781,35 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PolicyState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyState(string value) { throw null; } + public static Azure.ResourceManager.ElasticSan.Models.PolicyState Disabled { get { throw null; } } + public static Azure.ResourceManager.ElasticSan.Models.PolicyState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.ElasticSan.Models.PolicyState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ElasticSan.Models.PolicyState left, Azure.ResourceManager.ElasticSan.Models.PolicyState right) { throw null; } + public static implicit operator Azure.ResourceManager.ElasticSan.Models.PolicyState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ElasticSan.Models.PolicyState left, Azure.ResourceManager.ElasticSan.Models.PolicyState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PreValidationResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PreValidationResponse() { } + public string ValidationStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.PreValidationResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.PreValidationResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ResourceOperationalStatus : System.IEquatable { private readonly object _dummy; @@ -775,6 +858,35 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class VolumeNameList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VolumeNameList(System.Collections.Generic.IEnumerable volumeNames) { } + public System.Collections.Generic.IList VolumeNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.VolumeNameList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.VolumeNameList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct XmsAccessSoftDeletedResource : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public XmsAccessSoftDeletedResource(string value) { throw null; } + public static Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource False { get { throw null; } } + public static Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource True { get { throw null; } } + public bool Equals(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource left, Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource right) { throw null; } + public static implicit operator Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource left, Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct XmsDeleteSnapshot : System.IEquatable { diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/api/Azure.ResourceManager.ElasticSan.netstandard2.0.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/api/Azure.ResourceManager.ElasticSan.netstandard2.0.cs index a88bc4acd4c3..e977da1fb78c 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/api/Azure.ResourceManager.ElasticSan.netstandard2.0.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/api/Azure.ResourceManager.ElasticSan.netstandard2.0.cs @@ -196,8 +196,8 @@ protected ElasticSanVolumeCollection() { } public virtual Azure.Response Exists(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = default(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = default(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -229,8 +229,8 @@ protected ElasticSanVolumeGroupCollection() { } public virtual Azure.Response Exists(string volumeGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string volumeGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string volumeGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = default(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = default(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string volumeGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string volumeGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string volumeGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -241,6 +241,7 @@ protected ElasticSanVolumeGroupCollection() { } public partial class ElasticSanVolumeGroupData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ElasticSanVolumeGroupData() { } + public Azure.ResourceManager.ElasticSan.Models.DeleteRetentionPolicy DeleteRetentionPolicy { get { throw null; } set { } } public Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType? Encryption { get { throw null; } set { } } public Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionProperties EncryptionProperties { get { throw null; } set { } } public bool? EnforceDataIntegrityCheckForIscsi { get { throw null; } set { } } @@ -273,6 +274,10 @@ protected ElasticSanVolumeGroupResource() { } public virtual Azure.Response GetElasticSanVolume(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetElasticSanVolumeAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ElasticSan.ElasticSanVolumeCollection GetElasticSanVolumes() { throw null; } + public virtual Azure.ResourceManager.ArmOperation PreBackupVolume(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.VolumeNameList volumeNameList, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PreBackupVolumeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.VolumeNameList volumeNameList, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PreRestoreVolume(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.DiskSnapshotList diskSnapshotList, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PreRestoreVolumeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.DiskSnapshotList diskSnapshotList, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ElasticSan.ElasticSanVolumeGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ElasticSan.ElasticSanVolumeGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -288,10 +293,12 @@ protected ElasticSanVolumeResource() { } public virtual Azure.ResourceManager.ElasticSan.ElasticSanVolumeData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot? xmsDeleteSnapshots = default(Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot?), Azure.ResourceManager.ElasticSan.Models.XmsForceDelete? xmsForceDelete = default(Azure.ResourceManager.ElasticSan.Models.XmsForceDelete?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot? xmsDeleteSnapshots = default(Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot?), Azure.ResourceManager.ElasticSan.Models.XmsForceDelete? xmsForceDelete = default(Azure.ResourceManager.ElasticSan.Models.XmsForceDelete?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot? xmsDeleteSnapshots = default(Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot?), Azure.ResourceManager.ElasticSan.Models.XmsForceDelete? xmsForceDelete = default(Azure.ResourceManager.ElasticSan.Models.XmsForceDelete?), Azure.ResourceManager.ElasticSan.Models.DeleteType? deleteType = default(Azure.ResourceManager.ElasticSan.Models.DeleteType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot? xmsDeleteSnapshots = default(Azure.ResourceManager.ElasticSan.Models.XmsDeleteSnapshot?), Azure.ResourceManager.ElasticSan.Models.XmsForceDelete? xmsForceDelete = default(Azure.ResourceManager.ElasticSan.Models.XmsForceDelete?), Azure.ResourceManager.ElasticSan.Models.DeleteType? deleteType = default(Azure.ResourceManager.ElasticSan.Models.DeleteType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RestoreVolume(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RestoreVolumeAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ElasticSan.ElasticSanVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ElasticSan.ElasticSanVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -345,8 +352,11 @@ public static partial class ArmElasticSanModelFactory public static Azure.ResourceManager.ElasticSan.ElasticSanVolumeData ElasticSanVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? volumeId = default(System.Guid?), Azure.ResourceManager.ElasticSan.Models.ElasticSanVolumeDataSourceInfo creationData = null, long sizeGiB = (long)0, Azure.ResourceManager.ElasticSan.Models.IscsiTargetInfo storageTarget = null, Azure.Core.ResourceIdentifier managedByResourceId = null, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ElasticSan.ElasticSanVolumeGroupData ElasticSanVolumeGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState, Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType? protocolType, Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType? encryption, Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionProperties encryptionProperties, System.Collections.Generic.IEnumerable virtualNetworkRules, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } - public static Azure.ResourceManager.ElasticSan.ElasticSanVolumeGroupData ElasticSanVolumeGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState?), Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType? protocolType = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType?), Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType? encryption = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType?), Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionProperties encryptionProperties = null, System.Collections.Generic.IEnumerable virtualNetworkRules = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, bool? enforceDataIntegrityCheckForIscsi = default(bool?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ElasticSan.ElasticSanVolumeGroupData ElasticSanVolumeGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState, Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType? protocolType, Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType? encryption, Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionProperties encryptionProperties, System.Collections.Generic.IEnumerable virtualNetworkRules, System.Collections.Generic.IEnumerable privateEndpointConnections, bool? enforceDataIntegrityCheckForIscsi) { throw null; } + public static Azure.ResourceManager.ElasticSan.ElasticSanVolumeGroupData ElasticSanVolumeGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState?), Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType? protocolType = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanStorageTargetType?), Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType? encryption = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType?), Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionProperties encryptionProperties = null, System.Collections.Generic.IEnumerable virtualNetworkRules = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, bool? enforceDataIntegrityCheckForIscsi = default(bool?), Azure.ResourceManager.ElasticSan.Models.DeleteRetentionPolicy deleteRetentionPolicy = null) { throw null; } public static Azure.ResourceManager.ElasticSan.Models.IscsiTargetInfo IscsiTargetInfo(string targetIqn = null, string targetPortalHostname = null, int? targetPortalPort = default(int?), Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState? provisioningState = default(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState?), Azure.ResourceManager.ElasticSan.Models.ResourceOperationalStatus? status = default(Azure.ResourceManager.ElasticSan.Models.ResourceOperationalStatus?)) { throw null; } + public static Azure.ResourceManager.ElasticSan.Models.PreValidationResponse PreValidationResponse(string validationStatus = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AutoScalePolicyEnforcement : System.IEquatable @@ -367,6 +377,46 @@ public static partial class ArmElasticSanModelFactory public static bool operator !=(Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement left, Azure.ResourceManager.ElasticSan.Models.AutoScalePolicyEnforcement right) { throw null; } public override string ToString() { throw null; } } + public partial class DeleteRetentionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeleteRetentionPolicy() { } + public Azure.ResourceManager.ElasticSan.Models.PolicyState? PolicyState { get { throw null; } set { } } + public int? RetentionPeriodDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.DeleteRetentionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.DeleteRetentionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DeleteType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DeleteType(string value) { throw null; } + public static Azure.ResourceManager.ElasticSan.Models.DeleteType Permanent { get { throw null; } } + public bool Equals(Azure.ResourceManager.ElasticSan.Models.DeleteType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ElasticSan.Models.DeleteType left, Azure.ResourceManager.ElasticSan.Models.DeleteType right) { throw null; } + public static implicit operator Azure.ResourceManager.ElasticSan.Models.DeleteType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ElasticSan.Models.DeleteType left, Azure.ResourceManager.ElasticSan.Models.DeleteType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DiskSnapshotList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiskSnapshotList(System.Collections.Generic.IEnumerable diskSnapshotIds) { } + public System.Collections.Generic.IList DiskSnapshotIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.DiskSnapshotList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.DiskSnapshotList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ElasticSanEncryptionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ElasticSanEncryptionProperties() { } @@ -482,10 +532,13 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public ElasticSanProvisioningState(string value) { throw null; } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Canceled { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Deleted { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Deleting { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Failed { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Invalid { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Pending { get { throw null; } } + public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Restoring { get { throw null; } } + public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState SoftDeleting { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Succeeded { get { throw null; } } public static Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState Updating { get { throw null; } } public bool Equals(Azure.ResourceManager.ElasticSan.Models.ElasticSanProvisioningState other) { throw null; } @@ -686,6 +739,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ElasticSanVolumeGroupPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ElasticSanVolumeGroupPatch() { } + public Azure.ResourceManager.ElasticSan.Models.DeleteRetentionPolicy DeleteRetentionPolicy { get { throw null; } set { } } public Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionType? Encryption { get { throw null; } set { } } public Azure.ResourceManager.ElasticSan.Models.ElasticSanEncryptionProperties EncryptionProperties { get { throw null; } set { } } public bool? EnforceDataIntegrityCheckForIscsi { get { throw null; } set { } } @@ -727,6 +781,35 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PolicyState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyState(string value) { throw null; } + public static Azure.ResourceManager.ElasticSan.Models.PolicyState Disabled { get { throw null; } } + public static Azure.ResourceManager.ElasticSan.Models.PolicyState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.ElasticSan.Models.PolicyState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ElasticSan.Models.PolicyState left, Azure.ResourceManager.ElasticSan.Models.PolicyState right) { throw null; } + public static implicit operator Azure.ResourceManager.ElasticSan.Models.PolicyState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ElasticSan.Models.PolicyState left, Azure.ResourceManager.ElasticSan.Models.PolicyState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PreValidationResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PreValidationResponse() { } + public string ValidationStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.PreValidationResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.PreValidationResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ResourceOperationalStatus : System.IEquatable { private readonly object _dummy; @@ -775,6 +858,35 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class VolumeNameList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VolumeNameList(System.Collections.Generic.IEnumerable volumeNames) { } + public System.Collections.Generic.IList VolumeNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.VolumeNameList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ElasticSan.Models.VolumeNameList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct XmsAccessSoftDeletedResource : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public XmsAccessSoftDeletedResource(string value) { throw null; } + public static Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource False { get { throw null; } } + public static Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource True { get { throw null; } } + public bool Equals(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource left, Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource right) { throw null; } + public static implicit operator Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource left, Azure.ResourceManager.ElasticSan.Models.XmsAccessSoftDeletedResource right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct XmsDeleteSnapshot : System.IEquatable { diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanCollection.cs index f6d06b70388d..d44900cdefa0 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ElasticSanCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ElasticSansCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Create_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -44,9 +44,9 @@ public async Task CreateOrUpdate_ElasticSansCreateMaximumSetGen() ElasticSanData data = new ElasticSanData(new AzureLocation("France Central"), new ElasticSanSku(ElasticSanSkuName.PremiumLrs) { Tier = ElasticSanSkuTier.Premium, - }, 1L, 3L) + }, 5L, 25L) { - AvailabilityZones = { "xoz" }, + AvailabilityZones = { "1" }, PublicNetworkAccess = ElasticSanPublicNetworkAccess.Enabled, ScaleUpProperties = new ScaleUpProperties { @@ -57,7 +57,7 @@ public async Task CreateOrUpdate_ElasticSansCreateMaximumSetGen() }, Tags = { -["key9706"] = "haitqqakcntcpalkzqmjmcnifnhd" +["key9316"] = "ihndtieqibtob" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticSanName, data); @@ -74,7 +74,7 @@ public async Task CreateOrUpdate_ElasticSansCreateMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ElasticSansCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Create_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task CreateOrUpdate_ElasticSansCreateMinimumSetGen() // invoke the operation string elasticSanName = "elasticsanname"; - ElasticSanData data = new ElasticSanData(new AzureLocation("France Central"), new ElasticSanSku(ElasticSanSkuName.PremiumLrs), 1L, 3L); + ElasticSanData data = new ElasticSanData(new AzureLocation("France Central"), new ElasticSanSku(ElasticSanSkuName.PremiumLrs), 15L, 27L); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticSanName, data); ElasticSanResource result = lro.Value; @@ -109,7 +109,7 @@ public async Task CreateOrUpdate_ElasticSansCreateMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_ElasticSansGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,7 +142,7 @@ public async Task Get_ElasticSansGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_ElasticSansGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task Get_ElasticSansGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetAll_ElasticSansListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -210,7 +210,7 @@ public async Task GetAll_ElasticSansListByResourceGroupMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetAll_ElasticSansListByResourceGroupMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -245,7 +245,7 @@ public async Task GetAll_ElasticSansListByResourceGroupMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Exists_ElasticSansGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -274,7 +274,7 @@ public async Task Exists_ElasticSansGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Exists_ElasticSansGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -303,7 +303,7 @@ public async Task Exists_ElasticSansGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ElasticSansGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -344,7 +344,7 @@ public async Task GetIfExists_ElasticSansGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ElasticSansGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionCollection.cs index 40bf68254fb5..644ac380a48d 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticSanPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PrivateEndpointConnectionsCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionsCreateMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PrivateEndpointConnectionsCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionsCreateMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task Get_PrivateEndpointConnectionsGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task Get_PrivateEndpointConnectionsGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetAll_PrivateEndpointConnectionsListMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -204,7 +204,7 @@ public async Task GetAll_PrivateEndpointConnectionsListMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetAll_PrivateEndpointConnectionsListMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_List_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_List_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -240,7 +240,7 @@ public async Task GetAll_PrivateEndpointConnectionsListMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateEndpointConnectionsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -270,7 +270,7 @@ public async Task Exists_PrivateEndpointConnectionsGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateEndpointConnectionsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -300,7 +300,7 @@ public async Task Exists_PrivateEndpointConnectionsGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateEndpointConnectionsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -342,7 +342,7 @@ public async Task GetIfExists_PrivateEndpointConnectionsGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateEndpointConnectionsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionResource.cs index 4eaae7282e61..e4494c955b5a 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticSanPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_PrivateEndpointConnectionsGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_PrivateEndpointConnectionsGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Delete_PrivateEndpointConnectionsDeleteMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task Delete_PrivateEndpointConnectionsDeleteMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Delete_PrivateEndpointConnectionsDeleteMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Delete_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -136,7 +136,7 @@ public async Task Delete_PrivateEndpointConnectionsDeleteMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Update_PrivateEndpointConnectionsCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -177,7 +177,7 @@ public async Task Update_PrivateEndpointConnectionsCreateMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Update_PrivateEndpointConnectionsCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanResource.cs index 36acc9833530..3f2e2a095482 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticSanResource [Ignore("Only validating compilation of examples")] public async Task Get_ElasticSansGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_ElasticSansGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_ElasticSansGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ElasticSansGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Delete_ElasticSansDeleteMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,7 +106,7 @@ public async Task Delete_ElasticSansDeleteMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Delete_ElasticSansDeleteMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Delete_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Delete_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task Delete_ElasticSansDeleteMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Update_ElasticSansUpdateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Update_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Update_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -153,10 +153,10 @@ public async Task Update_ElasticSansUpdateMaximumSetGen() { Tags = { -["key5945"] = "eufqmxresekerilkgvfzddolxzas" +["key1931"] = "yhjwkgmrrwrcoxblgwgzjqusch" }, - BaseSizeTiB = 21L, - ExtendedCapacitySizeTiB = 10L, + BaseSizeTiB = 13L, + ExtendedCapacitySizeTiB = 29L, PublicNetworkAccess = ElasticSanPublicNetworkAccess.Enabled, ScaleUpProperties = new ScaleUpProperties { @@ -180,7 +180,7 @@ public async Task Update_ElasticSansUpdateMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Update_ElasticSansUpdateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Update_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_Update_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -212,7 +212,7 @@ public async Task Update_ElasticSansUpdateMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetPrivateLinkResources_PrivateLinkResourcesListByElasticSanMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json // this example is just showing the usage of "PrivateLinkResources_ListByElasticSan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -241,7 +241,7 @@ public async Task GetPrivateLinkResources_PrivateLinkResourcesListByElasticSanMa [Ignore("Only validating compilation of examples")] public async Task GetPrivateLinkResources_PrivateLinkResourcesListByElasticSanMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByElasticSan_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/PrivateLinkResources_ListByElasticSan_MinimumSet_Gen.json // this example is just showing the usage of "PrivateLinkResources_ListByElasticSan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotCollection.cs index 86b9fee35ae8..ad41a3cb4a92 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticSanSnapshotCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VolumeSnapshotsCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Create_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task CreateOrUpdate_VolumeSnapshotsCreateMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VolumeSnapshotsCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Create_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task CreateOrUpdate_VolumeSnapshotsCreateMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_VolumeSnapshotsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Get_VolumeSnapshotsGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_VolumeSnapshotsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task Get_VolumeSnapshotsGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetAll_VolumeSnapshotsListByVolumeGroupMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_ListByVolumeGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +202,7 @@ public async Task GetAll_VolumeSnapshotsListByVolumeGroupMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetAll_VolumeSnapshotsListByVolumeGroupMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_ListByVolumeGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -239,7 +239,7 @@ public async Task GetAll_VolumeSnapshotsListByVolumeGroupMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Exists_VolumeSnapshotsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -270,7 +270,7 @@ public async Task Exists_VolumeSnapshotsGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Exists_VolumeSnapshotsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -301,7 +301,7 @@ public async Task Exists_VolumeSnapshotsGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VolumeSnapshotsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -344,7 +344,7 @@ public async Task GetIfExists_VolumeSnapshotsGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VolumeSnapshotsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotResource.cs index d1fccc8e90ef..f914f4a887d1 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanSnapshotResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticSanSnapshotResource [Ignore("Only validating compilation of examples")] public async Task Get_VolumeSnapshotsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_VolumeSnapshotsGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_VolumeSnapshotsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_VolumeSnapshotsGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Delete_VolumeSnapshotsDeleteMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Delete_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task Delete_VolumeSnapshotsDeleteMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Delete_VolumeSnapshotsDeleteMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Delete_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Delete_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task Delete_VolumeSnapshotsDeleteMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Update_VolumeSnapshotsCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Create_MaximumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task Update_VolumeSnapshotsCreateMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Update_VolumeSnapshotsCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeSnapshots_Create_MinimumSet_Gen.json // this example is just showing the usage of "VolumeSnapshots_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeCollection.cs index 2b56a96b9460..44582ee34567 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticSanVolumeCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VolumesCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Create_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -42,14 +42,14 @@ public async Task CreateOrUpdate_VolumesCreateMaximumSetGen() // invoke the operation string volumeName = "volumename"; - ElasticSanVolumeData data = new ElasticSanVolumeData(9L) + ElasticSanVolumeData data = new ElasticSanVolumeData(23L) { CreationData = new ElasticSanVolumeDataSourceInfo { CreateSource = ElasticSanVolumeCreateOption.None, - SourceId = new ResourceIdentifier("ARM Id of Resource"), + SourceId = new ResourceIdentifier("mdonegivjquite"), }, - ManagedByResourceId = new ResourceIdentifier("mtkeip"), + ManagedByResourceId = new ResourceIdentifier("pclpkrpkpmvcsegcubrakcoodrubo"), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, volumeName, data); ElasticSanVolumeResource result = lro.Value; @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_VolumesCreateMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VolumesCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Create_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task CreateOrUpdate_VolumesCreateMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_VolumesGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Get_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -137,7 +137,7 @@ public async Task Get_VolumesGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_VolumesGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Get_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task Get_VolumesGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetAll_VolumesListByVolumeGroupMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_ListByVolumeGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -193,7 +193,8 @@ public async Task GetAll_VolumesListByVolumeGroupMaximumSetGen() ElasticSanVolumeCollection collection = elasticSanVolumeGroup.GetElasticSanVolumes(); // invoke the operation and iterate over the result - await foreach (ElasticSanVolumeResource item in collection.GetAllAsync()) + XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = XmsAccessSoftDeletedResource.True; + await foreach (ElasticSanVolumeResource item in collection.GetAllAsync(xmsAccessSoftDeletedResources: xmsAccessSoftDeletedResources)) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -209,7 +210,7 @@ public async Task GetAll_VolumesListByVolumeGroupMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetAll_VolumesListByVolumeGroupMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_ListByVolumeGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -230,7 +231,8 @@ public async Task GetAll_VolumesListByVolumeGroupMinimumSetGen() ElasticSanVolumeCollection collection = elasticSanVolumeGroup.GetElasticSanVolumes(); // invoke the operation and iterate over the result - await foreach (ElasticSanVolumeResource item in collection.GetAllAsync()) + XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = XmsAccessSoftDeletedResource.True; + await foreach (ElasticSanVolumeResource item in collection.GetAllAsync(xmsAccessSoftDeletedResources: xmsAccessSoftDeletedResources)) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -246,7 +248,7 @@ public async Task GetAll_VolumesListByVolumeGroupMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Exists_VolumesGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Get_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -277,7 +279,7 @@ public async Task Exists_VolumesGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Exists_VolumesGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Get_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -308,7 +310,7 @@ public async Task Exists_VolumesGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VolumesGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Get_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -351,7 +353,7 @@ public async Task GetIfExists_VolumesGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VolumesGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Get_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupCollection.cs index d81c2b6519c9..c0c3d80b000d 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ElasticSanVolumeGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VolumeGroupsCreateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateMaximumSetGen() { UserAssignedIdentities = { -[new ResourceIdentifier("key1006")] = new UserAssignedIdentity() +[new ResourceIdentifier("key2350")] = new UserAssignedIdentity() }, }, ProtocolType = ElasticSanStorageTargetType.Iscsi, @@ -57,17 +57,22 @@ public async Task CreateOrUpdate_VolumeGroupsCreateMaximumSetGen() { KeyVaultProperties = new ElasticSanKeyVaultProperties { - KeyName = "lunpapamzeimppgobraxjt", - KeyVersion = "oemygbnfmqhijmonkqfqmy", - KeyVaultUri = new Uri("https://microsoft.com/a"), + KeyName = "rommjwp", + KeyVersion = "ulmxxgzgsuhalwesmhfslq", + KeyVaultUri = new Uri("https://microsoft.com/at"), }, - EncryptionUserAssignedIdentity = new ResourceIdentifier("gfhkfbozahmmwluqndfgxunssafa"), + EncryptionUserAssignedIdentity = new ResourceIdentifier("vgbeephfgecgg"), }, - VirtualNetworkRules = {new ElasticSanVirtualNetworkRule(new ResourceIdentifier("bkhwaiqvvaguymsmnzzbzz")) + VirtualNetworkRules = {new ElasticSanVirtualNetworkRule(new ResourceIdentifier("fhhawhc")) { Action = ElasticSanVirtualNetworkRuleAction.Allow, }}, EnforceDataIntegrityCheckForIscsi = true, + DeleteRetentionPolicy = new DeleteRetentionPolicy + { + PolicyState = PolicyState.Enabled, + RetentionPeriodDays = 14, + }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, volumeGroupName, data); ElasticSanVolumeGroupResource result = lro.Value; @@ -83,7 +88,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VolumeGroupsCreateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Create_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Create_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +124,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_VolumeGroupsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -153,7 +158,7 @@ public async Task Get_VolumeGroupsGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_VolumeGroupsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,7 +192,7 @@ public async Task Get_VolumeGroupsGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetAll_VolumeGroupsListByElasticSanMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_ListByElasticSan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +212,8 @@ public async Task GetAll_VolumeGroupsListByElasticSanMaximumSetGen() ElasticSanVolumeGroupCollection collection = elasticSan.GetElasticSanVolumeGroups(); // invoke the operation and iterate over the result - await foreach (ElasticSanVolumeGroupResource item in collection.GetAllAsync()) + XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = XmsAccessSoftDeletedResource.True; + await foreach (ElasticSanVolumeGroupResource item in collection.GetAllAsync(xmsAccessSoftDeletedResources: xmsAccessSoftDeletedResources)) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -223,7 +229,7 @@ public async Task GetAll_VolumeGroupsListByElasticSanMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetAll_VolumeGroupsListByElasticSanMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_ListByElasticSan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +249,8 @@ public async Task GetAll_VolumeGroupsListByElasticSanMinimumSetGen() ElasticSanVolumeGroupCollection collection = elasticSan.GetElasticSanVolumeGroups(); // invoke the operation and iterate over the result - await foreach (ElasticSanVolumeGroupResource item in collection.GetAllAsync()) + XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = XmsAccessSoftDeletedResource.True; + await foreach (ElasticSanVolumeGroupResource item in collection.GetAllAsync(xmsAccessSoftDeletedResources: xmsAccessSoftDeletedResources)) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -259,7 +266,7 @@ public async Task GetAll_VolumeGroupsListByElasticSanMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Exists_VolumeGroupsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -289,7 +296,7 @@ public async Task Exists_VolumeGroupsGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Exists_VolumeGroupsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -319,7 +326,7 @@ public async Task Exists_VolumeGroupsGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VolumeGroupsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -361,7 +368,7 @@ public async Task GetIfExists_VolumeGroupsGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VolumeGroupsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupResource.cs index cc928b7c294a..d6b82987332b 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeGroupResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ElasticSanVolumeGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_VolumeGroupsGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_VolumeGroupsGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_VolumeGroupsGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_VolumeGroupsGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Delete_VolumeGroupsDeleteMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task Delete_VolumeGroupsDeleteMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Delete_VolumeGroupsDeleteMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Delete_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Delete_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -137,7 +137,7 @@ public async Task Delete_VolumeGroupsDeleteMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Update_VolumeGroupsUpdateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Update_VolumeGroupsUpdateMaximumSetGen() { UserAssignedIdentities = { -[new ResourceIdentifier("key1006")] = new UserAssignedIdentity() +[new ResourceIdentifier("key2350")] = new UserAssignedIdentity() }, }, ProtocolType = ElasticSanStorageTargetType.Iscsi, @@ -170,17 +170,22 @@ public async Task Update_VolumeGroupsUpdateMaximumSetGen() { KeyVaultProperties = new ElasticSanKeyVaultProperties { - KeyName = "lunpapamzeimppgobraxjt", - KeyVersion = "oemygbnfmqhijmonkqfqmy", - KeyVaultUri = new Uri("https://microsoft.com/a"), + KeyName = "rommjwp", + KeyVersion = "ulmxxgzgsuhalwesmhfslq", + KeyVaultUri = new Uri("https://microsoft.com/at"), }, - EncryptionUserAssignedIdentity = new ResourceIdentifier("gfhkfbozahmmwluqndfgxunssafa"), + EncryptionUserAssignedIdentity = new ResourceIdentifier("vgbeephfgecgg"), }, - VirtualNetworkRules = {new ElasticSanVirtualNetworkRule(new ResourceIdentifier("bkhwaiqvvaguymsmnzzbzz")) + VirtualNetworkRules = {new ElasticSanVirtualNetworkRule(new ResourceIdentifier("fhhawhc")) { Action = ElasticSanVirtualNetworkRuleAction.Allow, }}, EnforceDataIntegrityCheckForIscsi = true, + DeleteRetentionPolicy = new DeleteRetentionPolicy + { + PolicyState = PolicyState.Enabled, + RetentionPeriodDays = 14, + }, }; ArmOperation lro = await elasticSanVolumeGroup.UpdateAsync(WaitUntil.Completed, patch); ElasticSanVolumeGroupResource result = lro.Value; @@ -196,7 +201,7 @@ public async Task Update_VolumeGroupsUpdateMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Update_VolumeGroupsUpdateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Update_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/VolumeGroups_Update_MinimumSet_Gen.json // this example is just showing the usage of "VolumeGroups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -224,5 +229,63 @@ public async Task Update_VolumeGroupsUpdateMinimumSetGen() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task PreBackupVolume_VolumeGroupsPreBackupMaximumSetGen() + { + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_PreBackup_MaximumSet_Gen.json + // this example is just showing the usage of "Volumes_PreBackup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticSanVolumeGroupResource created on azure + // for more information of creating ElasticSanVolumeGroupResource, please refer to the document of ElasticSanVolumeGroupResource + string subscriptionId = "subscriptionid"; + string resourceGroupName = "resourcegroupname"; + string elasticSanName = "elasticsanname"; + string volumeGroupName = "volumegroupname"; + ResourceIdentifier elasticSanVolumeGroupResourceId = ElasticSanVolumeGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName); + ElasticSanVolumeGroupResource elasticSanVolumeGroup = client.GetElasticSanVolumeGroupResource(elasticSanVolumeGroupResourceId); + + // invoke the operation + VolumeNameList volumeNameList = new VolumeNameList(new string[] { "volumename" }); + ArmOperation lro = await elasticSanVolumeGroup.PreBackupVolumeAsync(WaitUntil.Completed, volumeNameList); + PreValidationResponse result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task PreRestoreVolume_VolumeGroupsPreRestoreMaximumSetGen() + { + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_PreRestore_MaximumSet_Gen.json + // this example is just showing the usage of "Volumes_PreRestore" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticSanVolumeGroupResource created on azure + // for more information of creating ElasticSanVolumeGroupResource, please refer to the document of ElasticSanVolumeGroupResource + string subscriptionId = "subscriptionid"; + string resourceGroupName = "resourcegroupname"; + string elasticSanName = "elasticsanname"; + string volumeGroupName = "volumegroupname"; + ResourceIdentifier elasticSanVolumeGroupResourceId = ElasticSanVolumeGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName); + ElasticSanVolumeGroupResource elasticSanVolumeGroup = client.GetElasticSanVolumeGroupResource(elasticSanVolumeGroupResourceId); + + // invoke the operation + DiskSnapshotList diskSnapshotList = new DiskSnapshotList(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/{subscriptionid}/resourceGroups/{resourcegroupname}/providers/Microsoft.Compute/snapshots/disksnapshot1") }); + ArmOperation lro = await elasticSanVolumeGroup.PreRestoreVolumeAsync(WaitUntil.Completed, diskSnapshotList); + PreValidationResponse result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeResource.cs index 934adbb100ac..06c51559a5bc 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_ElasticSanVolumeResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticSanVolumeResource [Ignore("Only validating compilation of examples")] public async Task Get_VolumesGetMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Get_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_VolumesGetMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Get_VolumesGetMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Get_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_VolumesGetMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Delete_VolumesDeleteMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Delete_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -105,7 +105,8 @@ public async Task Delete_VolumesDeleteMaximumSetGen() // invoke the operation XmsDeleteSnapshot? xmsDeleteSnapshots = XmsDeleteSnapshot.True; XmsForceDelete? xmsForceDelete = XmsForceDelete.True; - await elasticSanVolume.DeleteAsync(WaitUntil.Completed, xmsDeleteSnapshots: xmsDeleteSnapshots, xmsForceDelete: xmsForceDelete); + DeleteType? deleteType = DeleteType.Permanent; + await elasticSanVolume.DeleteAsync(WaitUntil.Completed, xmsDeleteSnapshots: xmsDeleteSnapshots, xmsForceDelete: xmsForceDelete, deleteType: deleteType); Console.WriteLine("Succeeded"); } @@ -114,7 +115,7 @@ public async Task Delete_VolumesDeleteMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Delete_VolumesDeleteMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Delete_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Delete_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +134,8 @@ public async Task Delete_VolumesDeleteMinimumSetGen() ElasticSanVolumeResource elasticSanVolume = client.GetElasticSanVolumeResource(elasticSanVolumeResourceId); // invoke the operation - await elasticSanVolume.DeleteAsync(WaitUntil.Completed); + DeleteType? deleteType = DeleteType.Permanent; + await elasticSanVolume.DeleteAsync(WaitUntil.Completed, deleteType: deleteType); Console.WriteLine("Succeeded"); } @@ -142,7 +144,7 @@ public async Task Delete_VolumesDeleteMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task Update_VolumesUpdateMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Update_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Update_MaximumSet_Gen.json // this example is just showing the usage of "Volumes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +165,8 @@ public async Task Update_VolumesUpdateMaximumSetGen() // invoke the operation ElasticSanVolumePatch patch = new ElasticSanVolumePatch { - SizeGiB = 11L, + SizeGiB = 7L, + ManagedByResourceId = new ResourceIdentifier("pclpkrpkpmvcsegcubrakcoodrubo"), }; ArmOperation lro = await elasticSanVolume.UpdateAsync(WaitUntil.Completed, patch); ElasticSanVolumeResource result = lro.Value; @@ -179,7 +182,7 @@ public async Task Update_VolumesUpdateMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task Update_VolumesUpdateMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Update_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Volumes_Update_MinimumSet_Gen.json // this example is just showing the usage of "Volumes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -208,5 +211,71 @@ public async Task Update_VolumesUpdateMinimumSetGen() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task RestoreVolume_RestoreVolumeMaximumSetGen() + { + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/RestoreVolume_MaximumSet_Gen.json + // this example is just showing the usage of "RestoreVolume" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticSanVolumeResource created on azure + // for more information of creating ElasticSanVolumeResource, please refer to the document of ElasticSanVolumeResource + string subscriptionId = "subscriptionid"; + string resourceGroupName = "resourcegroupname"; + string elasticSanName = "elasticsanname"; + string volumeGroupName = "volumegroupname"; + string volumeName = "volumename-1741526907"; + ResourceIdentifier elasticSanVolumeResourceId = ElasticSanVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, volumeName); + ElasticSanVolumeResource elasticSanVolume = client.GetElasticSanVolumeResource(elasticSanVolumeResourceId); + + // invoke the operation + ArmOperation lro = await elasticSanVolume.RestoreVolumeAsync(WaitUntil.Completed); + ElasticSanVolumeResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSanVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task RestoreVolume_RestoreVolumeMinimumSetGen() + { + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/RestoreVolume_MinimumSet_Gen.json + // this example is just showing the usage of "RestoreVolume" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticSanVolumeResource created on azure + // for more information of creating ElasticSanVolumeResource, please refer to the document of ElasticSanVolumeResource + string subscriptionId = "subscriptionid"; + string resourceGroupName = "resourcegroupname"; + string elasticSanName = "elasticsanname"; + string volumeGroupName = "volumegroupname"; + string volumeName = "volumename-1741526907"; + ResourceIdentifier elasticSanVolumeResourceId = ElasticSanVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, volumeName); + ElasticSanVolumeResource elasticSanVolume = client.GetElasticSanVolumeResource(elasticSanVolumeResourceId); + + // invoke the operation + ArmOperation lro = await elasticSanVolume.RestoreVolumeAsync(WaitUntil.Completed); + ElasticSanVolumeResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSanVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index c3ec638ac68e..a3580e27e58a 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetSkus_SkusListMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Skus_List_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Skus_List_MaximumSet_Gen.json // this example is just showing the usage of "Skus_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetSkus_SkusListMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetSkus_SkusListMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Skus_List_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/Skus_List_MinimumSet_Gen.json // this example is just showing the usage of "Skus_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task GetSkus_SkusListMinimumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetElasticSans_ElasticSansListBySubscriptionMaximumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json // this example is just showing the usage of "ElasticSans_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,7 +107,7 @@ public async Task GetElasticSans_ElasticSansListBySubscriptionMaximumSetGen() [Ignore("Only validating compilation of examples")] public async Task GetElasticSans_ElasticSansListBySubscriptionMinimumSetGen() { - // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json + // Generated from example definition: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json // this example is just showing the usage of "ElasticSans_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ArmElasticSanModelFactory.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ArmElasticSanModelFactory.cs index 400b1b5d726f..1016be91470b 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ArmElasticSanModelFactory.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ArmElasticSanModelFactory.cs @@ -150,8 +150,9 @@ public static ElasticSanPrivateEndpointConnectionData ElasticSanPrivateEndpointC /// A collection of rules governing the accessibility from specific network locations. /// The list of Private Endpoint Connections. /// A boolean indicating whether or not Data Integrity Check is enabled. + /// The retention policy for the soft deleted volume group and its associated resources. /// A new instance for mocking. - public static ElasticSanVolumeGroupData ElasticSanVolumeGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ManagedServiceIdentity identity = null, ElasticSanProvisioningState? provisioningState = null, ElasticSanStorageTargetType? protocolType = null, ElasticSanEncryptionType? encryption = null, ElasticSanEncryptionProperties encryptionProperties = null, IEnumerable virtualNetworkRules = null, IEnumerable privateEndpointConnections = null, bool? enforceDataIntegrityCheckForIscsi = null) + public static ElasticSanVolumeGroupData ElasticSanVolumeGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ManagedServiceIdentity identity = null, ElasticSanProvisioningState? provisioningState = null, ElasticSanStorageTargetType? protocolType = null, ElasticSanEncryptionType? encryption = null, ElasticSanEncryptionProperties encryptionProperties = null, IEnumerable virtualNetworkRules = null, IEnumerable privateEndpointConnections = null, bool? enforceDataIntegrityCheckForIscsi = null, DeleteRetentionPolicy deleteRetentionPolicy = null) { virtualNetworkRules ??= new List(); privateEndpointConnections ??= new List(); @@ -169,6 +170,7 @@ public static ElasticSanVolumeGroupData ElasticSanVolumeGroupData(ResourceIdenti virtualNetworkRules != null ? new NetworkRuleSet(virtualNetworkRules?.ToList(), serializedAdditionalRawData: null) : null, privateEndpointConnections?.ToList(), enforceDataIntegrityCheckForIscsi, + deleteRetentionPolicy, serializedAdditionalRawData: null); } @@ -287,6 +289,14 @@ public static ElasticSanSnapshotData ElasticSanSnapshotData(ResourceIdentifier i serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// a status value indicating success or failure of validation. + /// A new instance for mocking. + public static PreValidationResponse PreValidationResponse(string validationStatus = null) + { + return new PreValidationResponse(validationStatus, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -313,6 +323,26 @@ public static ElasticSanData ElasticSanData(ResourceIdentifier id, string name, return ElasticSanData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, sku: sku, availabilityZones: availabilityZones, provisioningState: provisioningState, baseSizeTiB: baseSizeTiB, extendedCapacitySizeTiB: extendedCapacitySizeTiB, totalVolumeSizeGiB: totalVolumeSizeGiB, volumeGroupCount: volumeGroupCount, totalIops: totalIops, totalMbps: totalMbps, totalSizeTiB: totalSizeTiB, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: publicNetworkAccess, scaleUpProperties: default); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The identity of the resource. Current supported identity types: None, SystemAssigned, UserAssigned. + /// State of the operation on the resource. + /// Type of storage target. + /// Type of encryption. + /// Encryption Properties describing Key Vault and Identity information. + /// A collection of rules governing the accessibility from specific network locations. + /// The list of Private Endpoint Connections. + /// A boolean indicating whether or not Data Integrity Check is enabled. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ElasticSanVolumeGroupData ElasticSanVolumeGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, ElasticSanProvisioningState? provisioningState, ElasticSanStorageTargetType? protocolType, ElasticSanEncryptionType? encryption, ElasticSanEncryptionProperties encryptionProperties, IEnumerable virtualNetworkRules, IEnumerable privateEndpointConnections, bool? enforceDataIntegrityCheckForIscsi) + { + return ElasticSanVolumeGroupData(id: id, name: name, resourceType: resourceType, systemData: systemData, identity: identity, provisioningState: provisioningState, protocolType: protocolType, encryption: encryption, encryptionProperties: encryptionProperties, virtualNetworkRules: virtualNetworkRules, privateEndpointConnections: privateEndpointConnections, enforceDataIntegrityCheckForIscsi: enforceDataIntegrityCheckForIscsi, deleteRetentionPolicy: default); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -329,7 +359,7 @@ public static ElasticSanData ElasticSanData(ResourceIdentifier id, string name, [EditorBrowsable(EditorBrowsableState.Never)] public static ElasticSanVolumeGroupData ElasticSanVolumeGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, ElasticSanProvisioningState? provisioningState, ElasticSanStorageTargetType? protocolType, ElasticSanEncryptionType? encryption, ElasticSanEncryptionProperties encryptionProperties, IEnumerable virtualNetworkRules, IEnumerable privateEndpointConnections) { - return ElasticSanVolumeGroupData(id: id, name: name, resourceType: resourceType, systemData: systemData, identity: identity, provisioningState: provisioningState, protocolType: protocolType, encryption: encryption, encryptionProperties: encryptionProperties, virtualNetworkRules: virtualNetworkRules, privateEndpointConnections: privateEndpointConnections, enforceDataIntegrityCheckForIscsi: default); + return ElasticSanVolumeGroupData(id: id, name: name, resourceType: resourceType, systemData: systemData, identity: identity, provisioningState: provisioningState, protocolType: protocolType, encryption: encryption, encryptionProperties: encryptionProperties, virtualNetworkRules: virtualNetworkRules, privateEndpointConnections: privateEndpointConnections, enforceDataIntegrityCheckForIscsi: default, deleteRetentionPolicy: default); } } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanCollection.cs index a59ebfddae71..47c28b19d7ee 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string elasticS /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string elasticSanName, Cancellat /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string elasticSanName, Can /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string elasticSanName, CancellationToken ca /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionCollection.cs index 76a1161e4f90..884d0390490d 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -441,7 +441,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionResource.cs index 6ca2995c72c4..672ce2a3b136 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanResource.cs index ad27eed54c6d..de4598dd7ab2 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanResource.cs @@ -115,7 +115,7 @@ public virtual ElasticSanVolumeGroupCollection GetElasticSanVolumeGroups() /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetElasticSan /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual ElasticSanPrivateEndpointConnectionCollection GetElasticSanPrivat /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -246,7 +246,7 @@ public virtual Response GetElasticS /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -410,7 +410,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -502,7 +502,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Elas /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// @@ -527,7 +527,7 @@ public virtual AsyncPageable GetPrivateLinkResour /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// @@ -552,7 +552,7 @@ public virtual Pageable GetPrivateLinkResources(C /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -614,7 +614,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -676,7 +676,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -733,7 +733,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -790,7 +790,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -850,7 +850,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotCollection.cs index 6c8a029a526e..14e9eff392e6 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string snapshotName, Can /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(string filt /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string snapshotName, Cance /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string snapshotName, CancellationToken canc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotResource.cs index b04bcb5a3337..33c1d2090fda 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeCollection.cs index 291314425c3a..679da24118cb 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeCollection.cs @@ -14,6 +14,7 @@ using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager.ElasticSan.Models; namespace Azure.ResourceManager.ElasticSan { @@ -64,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -113,7 +114,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -162,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -207,7 +208,7 @@ public virtual async Task> GetAsync(string vo /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -252,7 +253,7 @@ public virtual Response Get(string volumeName, Cancell /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -260,12 +261,13 @@ public virtual Response Get(string volumeName, Cancell /// /// /// + /// Optional, returns only soft deleted volumes if set to true. If set to false or if not specified, returns only active volumes. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSanVolumeVolumesRestClient.CreateListByVolumeGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSanVolumeVolumesRestClient.CreateListByVolumeGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSanVolumeVolumesRestClient.CreateListByVolumeGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, xmsAccessSoftDeletedResources); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSanVolumeVolumesRestClient.CreateListByVolumeGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, xmsAccessSoftDeletedResources); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ElasticSanVolumeResource(Client, ElasticSanVolumeData.DeserializeElasticSanVolumeData(e)), _elasticSanVolumeVolumesClientDiagnostics, Pipeline, "ElasticSanVolumeCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -282,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -290,12 +292,13 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// + /// Optional, returns only soft deleted volumes if set to true. If set to false or if not specified, returns only active volumes. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + public virtual Pageable GetAll(XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSanVolumeVolumesRestClient.CreateListByVolumeGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSanVolumeVolumesRestClient.CreateListByVolumeGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSanVolumeVolumesRestClient.CreateListByVolumeGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, xmsAccessSoftDeletedResources); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSanVolumeVolumesRestClient.CreateListByVolumeGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, xmsAccessSoftDeletedResources); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ElasticSanVolumeResource(Client, ElasticSanVolumeData.DeserializeElasticSanVolumeData(e)), _elasticSanVolumeVolumesClientDiagnostics, Pipeline, "ElasticSanVolumeCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -312,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -355,7 +358,7 @@ public virtual async Task> ExistsAsync(string volumeName, Cancell /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -398,7 +401,7 @@ public virtual Response Exists(string volumeName, CancellationToken cancel /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -443,7 +446,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupCollection.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupCollection.cs index b24296fde6ce..6070af341382 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupCollection.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupCollection.cs @@ -14,6 +14,7 @@ using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager.ElasticSan.Models; namespace Azure.ResourceManager.ElasticSan { @@ -64,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -113,7 +114,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -162,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -207,7 +208,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -252,7 +253,7 @@ public virtual Response Get(string volumeGroupNam /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -260,12 +261,13 @@ public virtual Response Get(string volumeGroupNam /// /// /// + /// Optional, returns only soft deleted volume groups if set to true. If set to false or if not specified, returns only active volume groups. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSanVolumeGroupVolumeGroupsRestClient.CreateListByElasticSanRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSanVolumeGroupVolumeGroupsRestClient.CreateListByElasticSanNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSanVolumeGroupVolumeGroupsRestClient.CreateListByElasticSanRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, xmsAccessSoftDeletedResources); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSanVolumeGroupVolumeGroupsRestClient.CreateListByElasticSanNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, xmsAccessSoftDeletedResources); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ElasticSanVolumeGroupResource(Client, ElasticSanVolumeGroupData.DeserializeElasticSanVolumeGroupData(e)), _elasticSanVolumeGroupVolumeGroupsClientDiagnostics, Pipeline, "ElasticSanVolumeGroupCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -282,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -290,12 +292,13 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// + /// Optional, returns only soft deleted volume groups if set to true. If set to false or if not specified, returns only active volume groups. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + public virtual Pageable GetAll(XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSanVolumeGroupVolumeGroupsRestClient.CreateListByElasticSanRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSanVolumeGroupVolumeGroupsRestClient.CreateListByElasticSanNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSanVolumeGroupVolumeGroupsRestClient.CreateListByElasticSanRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, xmsAccessSoftDeletedResources); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSanVolumeGroupVolumeGroupsRestClient.CreateListByElasticSanNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, xmsAccessSoftDeletedResources); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ElasticSanVolumeGroupResource(Client, ElasticSanVolumeGroupData.DeserializeElasticSanVolumeGroupData(e)), _elasticSanVolumeGroupVolumeGroupsClientDiagnostics, Pipeline, "ElasticSanVolumeGroupCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -312,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -355,7 +358,7 @@ public virtual async Task> ExistsAsync(string volumeGroupName, Ca /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -398,7 +401,7 @@ public virtual Response Exists(string volumeGroupName, CancellationToken c /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -443,7 +446,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupData.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupData.Serialization.cs index 3ebf929dd4fb..6fa6bb60b4e5 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupData.Serialization.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupData.Serialization.cs @@ -84,6 +84,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("enforceDataIntegrityCheckForIscsi"u8); writer.WriteBooleanValue(EnforceDataIntegrityCheckForIscsi.Value); } + if (Optional.IsDefined(DeleteRetentionPolicy)) + { + writer.WritePropertyName("deleteRetentionPolicy"u8); + writer.WriteObjectValue(DeleteRetentionPolicy, options); + } writer.WriteEndObject(); } @@ -119,6 +124,7 @@ internal static ElasticSanVolumeGroupData DeserializeElasticSanVolumeGroupData(J NetworkRuleSet networkAcls = default; IReadOnlyList privateEndpointConnections = default; bool? enforceDataIntegrityCheckForIscsi = default; + DeleteRetentionPolicy deleteRetentionPolicy = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -233,6 +239,15 @@ internal static ElasticSanVolumeGroupData DeserializeElasticSanVolumeGroupData(J enforceDataIntegrityCheckForIscsi = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("deleteRetentionPolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deleteRetentionPolicy = DeleteRetentionPolicy.DeserializeDeleteRetentionPolicy(property0.Value, options); + continue; + } } continue; } @@ -255,6 +270,7 @@ internal static ElasticSanVolumeGroupData DeserializeElasticSanVolumeGroupData(J networkAcls, privateEndpointConnections ?? new ChangeTrackingList(), enforceDataIntegrityCheckForIscsi, + deleteRetentionPolicy, serializedAdditionalRawData); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupData.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupData.cs index 262b679448ab..1c1e1d97b608 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupData.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupData.cs @@ -70,8 +70,9 @@ public ElasticSanVolumeGroupData() /// A collection of rules governing the accessibility from specific network locations. /// The list of Private Endpoint Connections. /// A boolean indicating whether or not Data Integrity Check is enabled. + /// The retention policy for the soft deleted volume group and its associated resources. /// Keeps track of any properties unknown to the library. - internal ElasticSanVolumeGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, ElasticSanProvisioningState? provisioningState, ElasticSanStorageTargetType? protocolType, ElasticSanEncryptionType? encryption, ElasticSanEncryptionProperties encryptionProperties, NetworkRuleSet networkAcls, IReadOnlyList privateEndpointConnections, bool? enforceDataIntegrityCheckForIscsi, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ElasticSanVolumeGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, ElasticSanProvisioningState? provisioningState, ElasticSanStorageTargetType? protocolType, ElasticSanEncryptionType? encryption, ElasticSanEncryptionProperties encryptionProperties, NetworkRuleSet networkAcls, IReadOnlyList privateEndpointConnections, bool? enforceDataIntegrityCheckForIscsi, DeleteRetentionPolicy deleteRetentionPolicy, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Identity = identity; ProvisioningState = provisioningState; @@ -81,6 +82,7 @@ internal ElasticSanVolumeGroupData(ResourceIdentifier id, string name, ResourceT NetworkAcls = networkAcls; PrivateEndpointConnections = privateEndpointConnections; EnforceDataIntegrityCheckForIscsi = enforceDataIntegrityCheckForIscsi; + DeleteRetentionPolicy = deleteRetentionPolicy; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -111,5 +113,7 @@ public IList VirtualNetworkRules public IReadOnlyList PrivateEndpointConnections { get; } /// A boolean indicating whether or not Data Integrity Check is enabled. public bool? EnforceDataIntegrityCheckForIscsi { get; set; } + /// The retention policy for the soft deleted volume group and its associated resources. + public DeleteRetentionPolicy DeleteRetentionPolicy { get; set; } } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupResource.cs index 11e63e4cace3..aa1f8881f914 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupResource.cs @@ -36,6 +36,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _elasticSanVolumeGroupVolumeGroupsClientDiagnostics; private readonly VolumeGroupsRestOperations _elasticSanVolumeGroupVolumeGroupsRestClient; + private readonly ClientDiagnostics _elasticSanVolumeVolumesClientDiagnostics; + private readonly VolumesRestOperations _elasticSanVolumeVolumesRestClient; private readonly ElasticSanVolumeGroupData _data; /// Gets the resource type for the operations. @@ -63,6 +65,9 @@ internal ElasticSanVolumeGroupResource(ArmClient client, ResourceIdentifier id) _elasticSanVolumeGroupVolumeGroupsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ElasticSan", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string elasticSanVolumeGroupVolumeGroupsApiVersion); _elasticSanVolumeGroupVolumeGroupsRestClient = new VolumeGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticSanVolumeGroupVolumeGroupsApiVersion); + _elasticSanVolumeVolumesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ElasticSan", ElasticSanVolumeResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ElasticSanVolumeResource.ResourceType, out string elasticSanVolumeVolumesApiVersion); + _elasticSanVolumeVolumesRestClient = new VolumesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticSanVolumeVolumesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -109,7 +114,7 @@ public virtual ElasticSanVolumeCollection GetElasticSanVolumes() /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -140,7 +145,7 @@ public virtual async Task> GetElasticSanVolum /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -178,7 +183,7 @@ public virtual ElasticSanSnapshotCollection GetElasticSanSnapshots() /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -209,7 +214,7 @@ public virtual async Task> GetElasticSanSna /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -240,7 +245,7 @@ public virtual Response GetElasticSanSnapshot(string /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -280,7 +285,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -320,7 +325,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -362,7 +367,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -404,7 +409,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -450,7 +455,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -482,5 +487,189 @@ public virtual ArmOperation Update(WaitUntil wait throw; } } + + /// + /// Validate whether a disk snapshot backup can be taken for list of volumes. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/preBackup + /// + /// + /// Operation Id + /// Volumes_PreBackup + /// + /// + /// Default Api Version + /// 2024-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Volume Name List (currently only one volume name in the list is supported. Server would return error if list is bigger). + /// The cancellation token to use. + /// is null. + public virtual async Task> PreBackupVolumeAsync(WaitUntil waitUntil, VolumeNameList volumeNameList, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(volumeNameList, nameof(volumeNameList)); + + using var scope = _elasticSanVolumeVolumesClientDiagnostics.CreateScope("ElasticSanVolumeGroupResource.PreBackupVolume"); + scope.Start(); + try + { + var response = await _elasticSanVolumeVolumesRestClient.PreBackupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeNameList, cancellationToken).ConfigureAwait(false); + var operation = new ElasticSanArmOperation(new PreValidationResponseOperationSource(), _elasticSanVolumeVolumesClientDiagnostics, Pipeline, _elasticSanVolumeVolumesRestClient.CreatePreBackupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeNameList).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validate whether a disk snapshot backup can be taken for list of volumes. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/preBackup + /// + /// + /// Operation Id + /// Volumes_PreBackup + /// + /// + /// Default Api Version + /// 2024-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Volume Name List (currently only one volume name in the list is supported. Server would return error if list is bigger). + /// The cancellation token to use. + /// is null. + public virtual ArmOperation PreBackupVolume(WaitUntil waitUntil, VolumeNameList volumeNameList, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(volumeNameList, nameof(volumeNameList)); + + using var scope = _elasticSanVolumeVolumesClientDiagnostics.CreateScope("ElasticSanVolumeGroupResource.PreBackupVolume"); + scope.Start(); + try + { + var response = _elasticSanVolumeVolumesRestClient.PreBackup(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeNameList, cancellationToken); + var operation = new ElasticSanArmOperation(new PreValidationResponseOperationSource(), _elasticSanVolumeVolumesClientDiagnostics, Pipeline, _elasticSanVolumeVolumesRestClient.CreatePreBackupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeNameList).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validate whether a list of backed up disk snapshots can be restored into ElasticSan volumes. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/preRestore + /// + /// + /// Operation Id + /// Volumes_PreRestore + /// + /// + /// Default Api Version + /// 2024-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Disk Snapshot List (currently only one Disk Snapshot in the list is supported and that the Disk Snapshot must be in same azure region as the ElasticSan. Server would return error if list is bigger). + /// The cancellation token to use. + /// is null. + public virtual async Task> PreRestoreVolumeAsync(WaitUntil waitUntil, DiskSnapshotList diskSnapshotList, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(diskSnapshotList, nameof(diskSnapshotList)); + + using var scope = _elasticSanVolumeVolumesClientDiagnostics.CreateScope("ElasticSanVolumeGroupResource.PreRestoreVolume"); + scope.Start(); + try + { + var response = await _elasticSanVolumeVolumesRestClient.PreRestoreAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diskSnapshotList, cancellationToken).ConfigureAwait(false); + var operation = new ElasticSanArmOperation(new PreValidationResponseOperationSource(), _elasticSanVolumeVolumesClientDiagnostics, Pipeline, _elasticSanVolumeVolumesRestClient.CreatePreRestoreRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diskSnapshotList).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validate whether a list of backed up disk snapshots can be restored into ElasticSan volumes. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/preRestore + /// + /// + /// Operation Id + /// Volumes_PreRestore + /// + /// + /// Default Api Version + /// 2024-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Disk Snapshot List (currently only one Disk Snapshot in the list is supported and that the Disk Snapshot must be in same azure region as the ElasticSan. Server would return error if list is bigger). + /// The cancellation token to use. + /// is null. + public virtual ArmOperation PreRestoreVolume(WaitUntil waitUntil, DiskSnapshotList diskSnapshotList, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(diskSnapshotList, nameof(diskSnapshotList)); + + using var scope = _elasticSanVolumeVolumesClientDiagnostics.CreateScope("ElasticSanVolumeGroupResource.PreRestoreVolume"); + scope.Start(); + try + { + var response = _elasticSanVolumeVolumesRestClient.PreRestore(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diskSnapshotList, cancellationToken); + var operation = new ElasticSanArmOperation(new PreValidationResponseOperationSource(), _elasticSanVolumeVolumesClientDiagnostics, Pipeline, _elasticSanVolumeVolumesRestClient.CreatePreRestoreRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diskSnapshotList).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeResource.cs index 6d292f51bae8..8760a6122752 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeResource.cs @@ -37,6 +37,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _elasticSanVolumeVolumesClientDiagnostics; private readonly VolumesRestOperations _elasticSanVolumeVolumesRestClient; + private readonly ClientDiagnostics _defaultClientDiagnostics; + private readonly ElasticSanManagementRestOperations _defaultRestClient; private readonly ElasticSanVolumeData _data; /// Gets the resource type for the operations. @@ -64,6 +66,8 @@ internal ElasticSanVolumeResource(ArmClient client, ResourceIdentifier id) : bas _elasticSanVolumeVolumesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ElasticSan", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string elasticSanVolumeVolumesApiVersion); _elasticSanVolumeVolumesRestClient = new VolumesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticSanVolumeVolumesApiVersion); + _defaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ElasticSan", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _defaultRestClient = new ElasticSanManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -103,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -143,7 +147,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -183,7 +187,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -194,15 +198,16 @@ public virtual Response Get(CancellationToken cancella /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Optional, used to delete snapshots under volume. Allowed value are only true or false. Default value is false. /// Optional, used to delete volume if active sessions present. Allowed value are only true or false. Default value is false. + /// Optional. Specifies that the delete operation should be a permanent delete for the soft deleted volume. The value of deleteType can only be 'permanent'. /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, XmsDeleteSnapshot? xmsDeleteSnapshots = null, XmsForceDelete? xmsForceDelete = null, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, XmsDeleteSnapshot? xmsDeleteSnapshots = null, XmsForceDelete? xmsForceDelete = null, DeleteType? deleteType = null, CancellationToken cancellationToken = default) { using var scope = _elasticSanVolumeVolumesClientDiagnostics.CreateScope("ElasticSanVolumeResource.Delete"); scope.Start(); try { - var response = await _elasticSanVolumeVolumesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, xmsDeleteSnapshots, xmsForceDelete, cancellationToken).ConfigureAwait(false); - var operation = new ElasticSanArmOperation(_elasticSanVolumeVolumesClientDiagnostics, Pipeline, _elasticSanVolumeVolumesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, xmsDeleteSnapshots, xmsForceDelete).Request, response, OperationFinalStateVia.Location); + var response = await _elasticSanVolumeVolumesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, xmsDeleteSnapshots, xmsForceDelete, deleteType, cancellationToken).ConfigureAwait(false); + var operation = new ElasticSanArmOperation(_elasticSanVolumeVolumesClientDiagnostics, Pipeline, _elasticSanVolumeVolumesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, xmsDeleteSnapshots, xmsForceDelete, deleteType).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -227,7 +232,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, XmsDele /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -238,15 +243,16 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, XmsDele /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Optional, used to delete snapshots under volume. Allowed value are only true or false. Default value is false. /// Optional, used to delete volume if active sessions present. Allowed value are only true or false. Default value is false. + /// Optional. Specifies that the delete operation should be a permanent delete for the soft deleted volume. The value of deleteType can only be 'permanent'. /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, XmsDeleteSnapshot? xmsDeleteSnapshots = null, XmsForceDelete? xmsForceDelete = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, XmsDeleteSnapshot? xmsDeleteSnapshots = null, XmsForceDelete? xmsForceDelete = null, DeleteType? deleteType = null, CancellationToken cancellationToken = default) { using var scope = _elasticSanVolumeVolumesClientDiagnostics.CreateScope("ElasticSanVolumeResource.Delete"); scope.Start(); try { - var response = _elasticSanVolumeVolumesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, xmsDeleteSnapshots, xmsForceDelete, cancellationToken); - var operation = new ElasticSanArmOperation(_elasticSanVolumeVolumesClientDiagnostics, Pipeline, _elasticSanVolumeVolumesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, xmsDeleteSnapshots, xmsForceDelete).Request, response, OperationFinalStateVia.Location); + var response = _elasticSanVolumeVolumesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, xmsDeleteSnapshots, xmsForceDelete, deleteType, cancellationToken); + var operation = new ElasticSanArmOperation(_elasticSanVolumeVolumesClientDiagnostics, Pipeline, _elasticSanVolumeVolumesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, xmsDeleteSnapshots, xmsForceDelete, deleteType).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -271,7 +277,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, XmsDeleteSnapshot? xmsDe /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -317,7 +323,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -349,5 +355,81 @@ public virtual ArmOperation Update(WaitUntil waitUntil throw; } } + + /// + /// Restore Soft Deleted Volumes. The volume name is obtained by using the API to list soft deleted volumes by volume group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}/restore + /// + /// + /// Operation Id + /// RestoreVolume + /// + /// + /// Default Api Version + /// 2024-07-01-preview + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> RestoreVolumeAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _defaultClientDiagnostics.CreateScope("ElasticSanVolumeResource.RestoreVolume"); + scope.Start(); + try + { + var response = await _defaultRestClient.RestoreVolumeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ElasticSanArmOperation(new ElasticSanVolumeOperationSource(Client), _defaultClientDiagnostics, Pipeline, _defaultRestClient.CreateRestoreVolumeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Restore Soft Deleted Volumes. The volume name is obtained by using the API to list soft deleted volumes by volume group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}/restore + /// + /// + /// Operation Id + /// RestoreVolume + /// + /// + /// Default Api Version + /// 2024-07-01-preview + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation RestoreVolume(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _defaultClientDiagnostics.CreateScope("ElasticSanVolumeResource.RestoreVolume"); + scope.Start(); + try + { + var response = _defaultRestClient.RestoreVolume(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ElasticSanArmOperation(new ElasticSanVolumeOperationSource(Client), _defaultClientDiagnostics, Pipeline, _defaultRestClient.CreateRestoreVolumeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/ElasticSanExtensions.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/ElasticSanExtensions.cs index fb50b9b834ca..a3518f9eb62c 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/ElasticSanExtensions.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/ElasticSanExtensions.cs @@ -158,7 +158,7 @@ public static ElasticSanCollection GetElasticSans(this ResourceGroupResource res /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -196,7 +196,7 @@ public static async Task> GetElasticSanAsync(this R /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -234,7 +234,7 @@ public static Response GetElasticSan(this ResourceGroupResou /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// @@ -267,7 +267,7 @@ public static AsyncPageable GetSkusAsync(this Subscrip /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// @@ -300,7 +300,7 @@ public static Pageable GetSkus(this SubscriptionResour /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -336,7 +336,7 @@ public static AsyncPageable GetElasticSansAsync(this Subscri /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanResourceGroupResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanResourceGroupResource.cs index eb482308a3b7..58bcb51320ea 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanResourceGroupResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual ElasticSanCollection GetElasticSans() /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetElasticSanAsync(strin /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanSubscriptionResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanSubscriptionResource.cs index 6e3996d7bc75..1c9425fe60d5 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanSubscriptionResource.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Extensions/MockableElasticSanSubscriptionResource.cs @@ -57,7 +57,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// @@ -83,7 +83,7 @@ public virtual AsyncPageable GetSkusAsync(string filte /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// @@ -109,7 +109,7 @@ public virtual Pageable GetSkus(string filter = null, /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual AsyncPageable GetElasticSansAsync(Cancellatio /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-07-01-preview /// /// /// Resource diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/LongRunningOperation/PreValidationResponseOperationSource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/LongRunningOperation/PreValidationResponseOperationSource.cs new file mode 100644 index 000000000000..4ce76dd99ba4 --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/LongRunningOperation/PreValidationResponseOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.ElasticSan.Models; + +namespace Azure.ResourceManager.ElasticSan +{ + internal class PreValidationResponseOperationSource : IOperationSource + { + PreValidationResponse IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return PreValidationResponse.DeserializePreValidationResponse(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return PreValidationResponse.DeserializePreValidationResponse(document.RootElement); + } + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DeleteRetentionPolicy.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DeleteRetentionPolicy.Serialization.cs new file mode 100644 index 000000000000..d50c94678138 --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DeleteRetentionPolicy.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + public partial class DeleteRetentionPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeleteRetentionPolicy)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(PolicyState)) + { + writer.WritePropertyName("policyState"u8); + writer.WriteStringValue(PolicyState.Value.ToString()); + } + if (Optional.IsDefined(RetentionPeriodDays)) + { + writer.WritePropertyName("retentionPeriodDays"u8); + writer.WriteNumberValue(RetentionPeriodDays.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeleteRetentionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeleteRetentionPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeleteRetentionPolicy(document.RootElement, options); + } + + internal static DeleteRetentionPolicy DeserializeDeleteRetentionPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PolicyState? policyState = default; + int? retentionPeriodDays = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policyState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policyState = new PolicyState(property.Value.GetString()); + continue; + } + if (property.NameEquals("retentionPeriodDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + retentionPeriodDays = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeleteRetentionPolicy(policyState, retentionPeriodDays, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeleteRetentionPolicy)} does not support writing '{options.Format}' format."); + } + } + + DeleteRetentionPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDeleteRetentionPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeleteRetentionPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DeleteRetentionPolicy.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DeleteRetentionPolicy.cs new file mode 100644 index 000000000000..a228c0473d95 --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DeleteRetentionPolicy.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + /// Response for Delete Retention Policy object. + public partial class DeleteRetentionPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeleteRetentionPolicy() + { + } + + /// Initializes a new instance of . + /// + /// The number of days to retain the resources after deletion. + /// Keeps track of any properties unknown to the library. + internal DeleteRetentionPolicy(PolicyState? policyState, int? retentionPeriodDays, IDictionary serializedAdditionalRawData) + { + PolicyState = policyState; + RetentionPeriodDays = retentionPeriodDays; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the policy state. + public PolicyState? PolicyState { get; set; } + /// The number of days to retain the resources after deletion. + public int? RetentionPeriodDays { get; set; } + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DeleteType.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DeleteType.cs new file mode 100644 index 000000000000..679e221e6698 --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DeleteType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + /// The DeleteType. + public readonly partial struct DeleteType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DeleteType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PermanentValue = "permanent"; + + /// permanent. + public static DeleteType Permanent { get; } = new DeleteType(PermanentValue); + /// Determines if two values are the same. + public static bool operator ==(DeleteType left, DeleteType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DeleteType left, DeleteType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DeleteType(string value) => new DeleteType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DeleteType other && Equals(other); + /// + public bool Equals(DeleteType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DiskSnapshotList.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DiskSnapshotList.Serialization.cs new file mode 100644 index 000000000000..2d6d3511ed1e --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DiskSnapshotList.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + public partial class DiskSnapshotList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskSnapshotList)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("diskSnapshotIds"u8); + writer.WriteStartArray(); + foreach (var item in DiskSnapshotIds) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskSnapshotList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskSnapshotList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskSnapshotList(document.RootElement, options); + } + + internal static DiskSnapshotList DeserializeDiskSnapshotList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList diskSnapshotIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskSnapshotIds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } + } + diskSnapshotIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskSnapshotList(diskSnapshotIds, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskSnapshotList)} does not support writing '{options.Format}' format."); + } + } + + DiskSnapshotList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiskSnapshotList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskSnapshotList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DiskSnapshotList.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DiskSnapshotList.cs new file mode 100644 index 000000000000..e6137a4310d3 --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/DiskSnapshotList.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + /// object to hold array of Disk Snapshot ARM IDs. + public partial class DiskSnapshotList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// array of DiskSnapshot ARM IDs. + /// is null. + public DiskSnapshotList(IEnumerable diskSnapshotIds) + { + Argument.AssertNotNull(diskSnapshotIds, nameof(diskSnapshotIds)); + + DiskSnapshotIds = diskSnapshotIds.ToList(); + } + + /// Initializes a new instance of . + /// array of DiskSnapshot ARM IDs. + /// Keeps track of any properties unknown to the library. + internal DiskSnapshotList(IList diskSnapshotIds, IDictionary serializedAdditionalRawData) + { + DiskSnapshotIds = diskSnapshotIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DiskSnapshotList() + { + } + + /// array of DiskSnapshot ARM IDs. + public IList DiskSnapshotIds { get; } + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanProvisioningState.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanProvisioningState.cs index f7831aa92b51..b747c2f17eea 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanProvisioningState.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanProvisioningState.cs @@ -30,6 +30,9 @@ public ElasticSanProvisioningState(string value) private const string CreatingValue = "Creating"; private const string UpdatingValue = "Updating"; private const string DeletingValue = "Deleting"; + private const string DeletedValue = "Deleted"; + private const string RestoringValue = "Restoring"; + private const string SoftDeletingValue = "SoftDeleting"; /// Invalid. public static ElasticSanProvisioningState Invalid { get; } = new ElasticSanProvisioningState(InvalidValue); @@ -47,6 +50,12 @@ public ElasticSanProvisioningState(string value) public static ElasticSanProvisioningState Updating { get; } = new ElasticSanProvisioningState(UpdatingValue); /// Deleting. public static ElasticSanProvisioningState Deleting { get; } = new ElasticSanProvisioningState(DeletingValue); + /// Deleted. + public static ElasticSanProvisioningState Deleted { get; } = new ElasticSanProvisioningState(DeletedValue); + /// Restoring. + public static ElasticSanProvisioningState Restoring { get; } = new ElasticSanProvisioningState(RestoringValue); + /// SoftDeleting. + public static ElasticSanProvisioningState SoftDeleting { get; } = new ElasticSanProvisioningState(SoftDeletingValue); /// Determines if two values are the same. public static bool operator ==(ElasticSanProvisioningState left, ElasticSanProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanVolumeGroupPatch.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanVolumeGroupPatch.Serialization.cs index 5cf3b3eabce5..046e374f6ed2 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanVolumeGroupPatch.Serialization.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanVolumeGroupPatch.Serialization.cs @@ -67,6 +67,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("enforceDataIntegrityCheckForIscsi"u8); writer.WriteBooleanValue(EnforceDataIntegrityCheckForIscsi.Value); } + if (Optional.IsDefined(DeleteRetentionPolicy)) + { + writer.WritePropertyName("deleteRetentionPolicy"u8); + writer.WriteObjectValue(DeleteRetentionPolicy, options); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -111,6 +116,7 @@ internal static ElasticSanVolumeGroupPatch DeserializeElasticSanVolumeGroupPatch ElasticSanEncryptionProperties encryptionProperties = default; NetworkRuleSet networkAcls = default; bool? enforceDataIntegrityCheckForIscsi = default; + DeleteRetentionPolicy deleteRetentionPolicy = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -178,6 +184,15 @@ internal static ElasticSanVolumeGroupPatch DeserializeElasticSanVolumeGroupPatch enforceDataIntegrityCheckForIscsi = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("deleteRetentionPolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deleteRetentionPolicy = DeleteRetentionPolicy.DeserializeDeleteRetentionPolicy(property0.Value, options); + continue; + } } continue; } @@ -194,6 +209,7 @@ internal static ElasticSanVolumeGroupPatch DeserializeElasticSanVolumeGroupPatch encryptionProperties, networkAcls, enforceDataIntegrityCheckForIscsi, + deleteRetentionPolicy, serializedAdditionalRawData); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanVolumeGroupPatch.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanVolumeGroupPatch.cs index e71890741710..c2cd4c26073f 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanVolumeGroupPatch.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/ElasticSanVolumeGroupPatch.cs @@ -58,8 +58,9 @@ public ElasticSanVolumeGroupPatch() /// Encryption Properties describing Key Vault and Identity information. /// A collection of rules governing the accessibility from specific network locations. /// A boolean indicating whether or not Data Integrity Check is enabled. + /// The retention policy for the soft deleted volume group and its associated resources. /// Keeps track of any properties unknown to the library. - internal ElasticSanVolumeGroupPatch(ManagedServiceIdentity identity, ElasticSanStorageTargetType? protocolType, ElasticSanEncryptionType? encryption, ElasticSanEncryptionProperties encryptionProperties, NetworkRuleSet networkAcls, bool? enforceDataIntegrityCheckForIscsi, IDictionary serializedAdditionalRawData) + internal ElasticSanVolumeGroupPatch(ManagedServiceIdentity identity, ElasticSanStorageTargetType? protocolType, ElasticSanEncryptionType? encryption, ElasticSanEncryptionProperties encryptionProperties, NetworkRuleSet networkAcls, bool? enforceDataIntegrityCheckForIscsi, DeleteRetentionPolicy deleteRetentionPolicy, IDictionary serializedAdditionalRawData) { Identity = identity; ProtocolType = protocolType; @@ -67,6 +68,7 @@ internal ElasticSanVolumeGroupPatch(ManagedServiceIdentity identity, ElasticSanS EncryptionProperties = encryptionProperties; NetworkAcls = networkAcls; EnforceDataIntegrityCheckForIscsi = enforceDataIntegrityCheckForIscsi; + DeleteRetentionPolicy = deleteRetentionPolicy; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -93,5 +95,7 @@ public IList VirtualNetworkRules /// A boolean indicating whether or not Data Integrity Check is enabled. public bool? EnforceDataIntegrityCheckForIscsi { get; set; } + /// The retention policy for the soft deleted volume group and its associated resources. + public DeleteRetentionPolicy DeleteRetentionPolicy { get; set; } } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/PolicyState.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/PolicyState.cs new file mode 100644 index 000000000000..fa5e48aac5cd --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/PolicyState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + /// The PolicyState. + public readonly partial struct PolicyState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PolicyState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static PolicyState Enabled { get; } = new PolicyState(EnabledValue); + /// Disabled. + public static PolicyState Disabled { get; } = new PolicyState(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(PolicyState left, PolicyState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PolicyState left, PolicyState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PolicyState(string value) => new PolicyState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PolicyState other && Equals(other); + /// + public bool Equals(PolicyState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/PreValidationResponse.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/PreValidationResponse.Serialization.cs new file mode 100644 index 000000000000..b784afa2baa6 --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/PreValidationResponse.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + public partial class PreValidationResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PreValidationResponse)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ValidationStatus)) + { + writer.WritePropertyName("validationStatus"u8); + writer.WriteStringValue(ValidationStatus); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PreValidationResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PreValidationResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePreValidationResponse(document.RootElement, options); + } + + internal static PreValidationResponse DeserializePreValidationResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string validationStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("validationStatus"u8)) + { + validationStatus = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PreValidationResponse(validationStatus, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PreValidationResponse)} does not support writing '{options.Format}' format."); + } + } + + PreValidationResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePreValidationResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PreValidationResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/PreValidationResponse.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/PreValidationResponse.cs new file mode 100644 index 000000000000..3d852cf2f61f --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/PreValidationResponse.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + /// response object for pre validation api. + public partial class PreValidationResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal PreValidationResponse() + { + } + + /// Initializes a new instance of . + /// a status value indicating success or failure of validation. + /// Keeps track of any properties unknown to the library. + internal PreValidationResponse(string validationStatus, IDictionary serializedAdditionalRawData) + { + ValidationStatus = validationStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// a status value indicating success or failure of validation. + public string ValidationStatus { get; } + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/VolumeNameList.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/VolumeNameList.Serialization.cs new file mode 100644 index 000000000000..525a871f8bcf --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/VolumeNameList.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + public partial class VolumeNameList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VolumeNameList)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("volumeNames"u8); + writer.WriteStartArray(); + foreach (var item in VolumeNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VolumeNameList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VolumeNameList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVolumeNameList(document.RootElement, options); + } + + internal static VolumeNameList DeserializeVolumeNameList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList volumeNames = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("volumeNames"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + volumeNames = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VolumeNameList(volumeNames, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VolumeNameList)} does not support writing '{options.Format}' format."); + } + } + + VolumeNameList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVolumeNameList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VolumeNameList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/VolumeNameList.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/VolumeNameList.cs new file mode 100644 index 000000000000..df0a4210c509 --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/VolumeNameList.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + /// object to hold array of volume names. + public partial class VolumeNameList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// array of volume names. + /// is null. + public VolumeNameList(IEnumerable volumeNames) + { + Argument.AssertNotNull(volumeNames, nameof(volumeNames)); + + VolumeNames = volumeNames.ToList(); + } + + /// Initializes a new instance of . + /// array of volume names. + /// Keeps track of any properties unknown to the library. + internal VolumeNameList(IList volumeNames, IDictionary serializedAdditionalRawData) + { + VolumeNames = volumeNames; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VolumeNameList() + { + } + + /// array of volume names. + public IList VolumeNames { get; } + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/XmsAccessSoftDeletedResource.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/XmsAccessSoftDeletedResource.cs new file mode 100644 index 000000000000..0c00ad9eef8f --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/Models/XmsAccessSoftDeletedResource.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ElasticSan.Models +{ + /// The XmsAccessSoftDeletedResource. + public readonly partial struct XmsAccessSoftDeletedResource : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public XmsAccessSoftDeletedResource(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TrueValue = "true"; + private const string FalseValue = "false"; + + /// true. + public static XmsAccessSoftDeletedResource True { get; } = new XmsAccessSoftDeletedResource(TrueValue); + /// false. + public static XmsAccessSoftDeletedResource False { get; } = new XmsAccessSoftDeletedResource(FalseValue); + /// Determines if two values are the same. + public static bool operator ==(XmsAccessSoftDeletedResource left, XmsAccessSoftDeletedResource right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(XmsAccessSoftDeletedResource left, XmsAccessSoftDeletedResource right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator XmsAccessSoftDeletedResource(string value) => new XmsAccessSoftDeletedResource(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is XmsAccessSoftDeletedResource other && Equals(other); + /// + public bool Equals(XmsAccessSoftDeletedResource other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/ElasticSanManagementRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/ElasticSanManagementRestOperations.cs new file mode 100644 index 000000000000..b7571ef2fe7c --- /dev/null +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/ElasticSanManagementRestOperations.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ElasticSan +{ + internal partial class ElasticSanManagementRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ElasticSanManagementRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ElasticSanManagementRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateRestoreVolumeRequestUri(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ElasticSan/elasticSans/", false); + uri.AppendPath(elasticSanName, true); + uri.AppendPath("/volumegroups/", false); + uri.AppendPath(volumeGroupName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/restore", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRestoreVolumeRequest(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ElasticSan/elasticSans/", false); + uri.AppendPath(elasticSanName, true); + uri.AppendPath("/volumegroups/", false); + uri.AppendPath(volumeGroupName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/restore", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Restore Soft Deleted Volumes. The volume name is obtained by using the API to list soft deleted volumes by volume group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticSan. + /// The name of the VolumeGroup. + /// The name of the Volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task RestoreVolumeAsync(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); + Argument.AssertNotNullOrEmpty(volumeGroupName, nameof(volumeGroupName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateRestoreVolumeRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, volumeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Restore Soft Deleted Volumes. The volume name is obtained by using the API to list soft deleted volumes by volume group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticSan. + /// The name of the VolumeGroup. + /// The name of the Volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response RestoreVolume(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); + Argument.AssertNotNullOrEmpty(volumeGroupName, nameof(volumeGroupName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateRestoreVolumeRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, volumeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/ElasticSansRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/ElasticSansRestOperations.cs index 3e8ad4b47d00..0d99a2becdaa 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/ElasticSansRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/ElasticSansRestOperations.cs @@ -32,7 +32,7 @@ public ElasticSansRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-06-01-preview"; + _apiVersion = apiVersion ?? "2024-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index a6f9ea17ef3d..66c3b1916943 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-06-01-preview"; + _apiVersion = apiVersion ?? "2024-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index ce8b451fcf43..5c737432467d 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-06-01-preview"; + _apiVersion = apiVersion ?? "2024-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/SkusRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/SkusRestOperations.cs index c261091e2139..d6584367e0c5 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/SkusRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/SkusRestOperations.cs @@ -32,7 +32,7 @@ public SkusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-06-01-preview"; + _apiVersion = apiVersion ?? "2024-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeGroupsRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeGroupsRestOperations.cs index 0b595a173c3b..bbce96b32d3f 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeGroupsRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeGroupsRestOperations.cs @@ -32,11 +32,11 @@ public VolumeGroupsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-06-01-preview"; + _apiVersion = apiVersion ?? "2024-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByElasticSanRequestUri(string subscriptionId, string resourceGroupName, string elasticSanName) + internal RequestUriBuilder CreateListByElasticSanRequestUri(string subscriptionId, string resourceGroupName, string elasticSanName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -51,7 +51,7 @@ internal RequestUriBuilder CreateListByElasticSanRequestUri(string subscriptionI return uri; } - internal HttpMessage CreateListByElasticSanRequest(string subscriptionId, string resourceGroupName, string elasticSanName) + internal HttpMessage CreateListByElasticSanRequest(string subscriptionId, string resourceGroupName, string elasticSanName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -67,6 +67,10 @@ internal HttpMessage CreateListByElasticSanRequest(string subscriptionId, string uri.AppendPath("/volumeGroups", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xmsAccessSoftDeletedResources != null) + { + request.Headers.Add("x-ms-access-soft-deleted-resources", xmsAccessSoftDeletedResources.Value.ToString()); + } request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; @@ -76,16 +80,17 @@ internal HttpMessage CreateListByElasticSanRequest(string subscriptionId, string /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the ElasticSan. + /// Optional, returns only soft deleted volume groups if set to true. If set to false or if not specified, returns only active volume groups. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByElasticSanAsync(string subscriptionId, string resourceGroupName, string elasticSanName, CancellationToken cancellationToken = default) + public async Task> ListByElasticSanAsync(string subscriptionId, string resourceGroupName, string elasticSanName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); - using var message = CreateListByElasticSanRequest(subscriptionId, resourceGroupName, elasticSanName); + using var message = CreateListByElasticSanRequest(subscriptionId, resourceGroupName, elasticSanName, xmsAccessSoftDeletedResources); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -105,16 +110,17 @@ public async Task> ListByElasticSanAsync(str /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the ElasticSan. + /// Optional, returns only soft deleted volume groups if set to true. If set to false or if not specified, returns only active volume groups. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByElasticSan(string subscriptionId, string resourceGroupName, string elasticSanName, CancellationToken cancellationToken = default) + public Response ListByElasticSan(string subscriptionId, string resourceGroupName, string elasticSanName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); - using var message = CreateListByElasticSanRequest(subscriptionId, resourceGroupName, elasticSanName); + using var message = CreateListByElasticSanRequest(subscriptionId, resourceGroupName, elasticSanName, xmsAccessSoftDeletedResources); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -528,7 +534,7 @@ public Response Get(string subscriptionId, string res } } - internal RequestUriBuilder CreateListByElasticSanNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName) + internal RequestUriBuilder CreateListByElasticSanNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -536,7 +542,7 @@ internal RequestUriBuilder CreateListByElasticSanNextPageRequestUri(string nextL return uri; } - internal HttpMessage CreateListByElasticSanNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName) + internal HttpMessage CreateListByElasticSanNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -545,6 +551,10 @@ internal HttpMessage CreateListByElasticSanNextPageRequest(string nextLink, stri uri.Reset(_endpoint); uri.AppendRawNextLink(nextLink, false); request.Uri = uri; + if (xmsAccessSoftDeletedResources != null) + { + request.Headers.Add("x-ms-access-soft-deleted-resources", xmsAccessSoftDeletedResources.Value.ToString()); + } request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; @@ -555,17 +565,18 @@ internal HttpMessage CreateListByElasticSanNextPageRequest(string nextLink, stri /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the ElasticSan. + /// Optional, returns only soft deleted volume groups if set to true. If set to false or if not specified, returns only active volume groups. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByElasticSanNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, CancellationToken cancellationToken = default) + public async Task> ListByElasticSanNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); - using var message = CreateListByElasticSanNextPageRequest(nextLink, subscriptionId, resourceGroupName, elasticSanName); + using var message = CreateListByElasticSanNextPageRequest(nextLink, subscriptionId, resourceGroupName, elasticSanName, xmsAccessSoftDeletedResources); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -586,17 +597,18 @@ public async Task> ListByElasticSanNextPageA /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the ElasticSan. + /// Optional, returns only soft deleted volume groups if set to true. If set to false or if not specified, returns only active volume groups. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByElasticSanNextPage(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, CancellationToken cancellationToken = default) + public Response ListByElasticSanNextPage(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); - using var message = CreateListByElasticSanNextPageRequest(nextLink, subscriptionId, resourceGroupName, elasticSanName); + using var message = CreateListByElasticSanNextPageRequest(nextLink, subscriptionId, resourceGroupName, elasticSanName, xmsAccessSoftDeletedResources); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeSnapshotsRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeSnapshotsRestOperations.cs index 194e10b32127..e332490a61d2 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeSnapshotsRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumeSnapshotsRestOperations.cs @@ -32,7 +32,7 @@ public VolumeSnapshotsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-06-01-preview"; + _apiVersion = apiVersion ?? "2024-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumesRestOperations.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumesRestOperations.cs index 51501eb4854e..bc8780233327 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumesRestOperations.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/RestOperations/VolumesRestOperations.cs @@ -32,7 +32,7 @@ public VolumesRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-06-01-preview"; + _apiVersion = apiVersion ?? "2024-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -252,7 +252,7 @@ public Response Update(string subscriptionId, string resourceGroupName, string e } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName, XmsDeleteSnapshot? xmsDeleteSnapshots, XmsForceDelete? xmsForceDelete) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName, XmsDeleteSnapshot? xmsDeleteSnapshots, XmsForceDelete? xmsForceDelete, DeleteType? deleteType) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -267,10 +267,14 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath("/volumes/", false); uri.AppendPath(volumeName, true); uri.AppendQuery("api-version", _apiVersion, true); + if (deleteType != null) + { + uri.AppendQuery("deleteType", deleteType.Value.ToString(), true); + } return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName, XmsDeleteSnapshot? xmsDeleteSnapshots, XmsForceDelete? xmsForceDelete) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName, XmsDeleteSnapshot? xmsDeleteSnapshots, XmsForceDelete? xmsForceDelete, DeleteType? deleteType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -288,6 +292,10 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/volumes/", false); uri.AppendPath(volumeName, true); uri.AppendQuery("api-version", _apiVersion, true); + if (deleteType != null) + { + uri.AppendQuery("deleteType", deleteType.Value.ToString(), true); + } request.Uri = uri; if (xmsDeleteSnapshots != null) { @@ -310,10 +318,11 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// The name of the Volume. /// Optional, used to delete snapshots under volume. Allowed value are only true or false. Default value is false. /// Optional, used to delete volume if active sessions present. Allowed value are only true or false. Default value is false. + /// Optional. Specifies that the delete operation should be a permanent delete for the soft deleted volume. The value of deleteType can only be 'permanent'. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName, XmsDeleteSnapshot? xmsDeleteSnapshots = null, XmsForceDelete? xmsForceDelete = null, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName, XmsDeleteSnapshot? xmsDeleteSnapshots = null, XmsForceDelete? xmsForceDelete = null, DeleteType? deleteType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -321,7 +330,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr Argument.AssertNotNullOrEmpty(volumeGroupName, nameof(volumeGroupName)); Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, volumeName, xmsDeleteSnapshots, xmsForceDelete); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, volumeName, xmsDeleteSnapshots, xmsForceDelete, deleteType); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -342,10 +351,11 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// The name of the Volume. /// Optional, used to delete snapshots under volume. Allowed value are only true or false. Default value is false. /// Optional, used to delete volume if active sessions present. Allowed value are only true or false. Default value is false. + /// Optional. Specifies that the delete operation should be a permanent delete for the soft deleted volume. The value of deleteType can only be 'permanent'. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName, XmsDeleteSnapshot? xmsDeleteSnapshots = null, XmsForceDelete? xmsForceDelete = null, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, string volumeName, XmsDeleteSnapshot? xmsDeleteSnapshots = null, XmsForceDelete? xmsForceDelete = null, DeleteType? deleteType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -353,7 +363,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string e Argument.AssertNotNullOrEmpty(volumeGroupName, nameof(volumeGroupName)); Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, volumeName, xmsDeleteSnapshots, xmsForceDelete); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, volumeName, xmsDeleteSnapshots, xmsForceDelete, deleteType); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -478,7 +488,7 @@ public Response Get(string subscriptionId, string resource } } - internal RequestUriBuilder CreateListByVolumeGroupRequestUri(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName) + internal RequestUriBuilder CreateListByVolumeGroupRequestUri(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -495,7 +505,7 @@ internal RequestUriBuilder CreateListByVolumeGroupRequestUri(string subscription return uri; } - internal HttpMessage CreateListByVolumeGroupRequest(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName) + internal HttpMessage CreateListByVolumeGroupRequest(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -513,6 +523,10 @@ internal HttpMessage CreateListByVolumeGroupRequest(string subscriptionId, strin uri.AppendPath("/volumes", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xmsAccessSoftDeletedResources != null) + { + request.Headers.Add("x-ms-access-soft-deleted-resources", xmsAccessSoftDeletedResources.Value.ToString()); + } request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; @@ -523,17 +537,18 @@ internal HttpMessage CreateListByVolumeGroupRequest(string subscriptionId, strin /// The name of the resource group. The name is case insensitive. /// The name of the ElasticSan. /// The name of the VolumeGroup. + /// Optional, returns only soft deleted volumes if set to true. If set to false or if not specified, returns only active volumes. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListByVolumeGroupAsync(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, CancellationToken cancellationToken = default) + public async Task> ListByVolumeGroupAsync(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); Argument.AssertNotNullOrEmpty(volumeGroupName, nameof(volumeGroupName)); - using var message = CreateListByVolumeGroupRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName); + using var message = CreateListByVolumeGroupRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, xmsAccessSoftDeletedResources); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -554,17 +569,18 @@ public async Task> ListByVolumeGroupAsync(string /// The name of the resource group. The name is case insensitive. /// The name of the ElasticSan. /// The name of the VolumeGroup. + /// Optional, returns only soft deleted volumes if set to true. If set to false or if not specified, returns only active volumes. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListByVolumeGroup(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, CancellationToken cancellationToken = default) + public Response ListByVolumeGroup(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); Argument.AssertNotNullOrEmpty(volumeGroupName, nameof(volumeGroupName)); - using var message = CreateListByVolumeGroupRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName); + using var message = CreateListByVolumeGroupRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, xmsAccessSoftDeletedResources); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -580,7 +596,211 @@ public Response ListByVolumeGroup(string subscriptionId, s } } - internal RequestUriBuilder CreateListByVolumeGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName) + internal RequestUriBuilder CreatePreBackupRequestUri(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, VolumeNameList volumeNameList) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ElasticSan/elasticSans/", false); + uri.AppendPath(elasticSanName, true); + uri.AppendPath("/volumegroups/", false); + uri.AppendPath(volumeGroupName, true); + uri.AppendPath("/preBackup", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePreBackupRequest(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, VolumeNameList volumeNameList) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ElasticSan/elasticSans/", false); + uri.AppendPath(elasticSanName, true); + uri.AppendPath("/volumegroups/", false); + uri.AppendPath(volumeGroupName, true); + uri.AppendPath("/preBackup", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(volumeNameList, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Validate whether a disk snapshot backup can be taken for list of volumes. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticSan. + /// The name of the VolumeGroup. + /// Volume Name List (currently only one volume name in the list is supported. Server would return error if list is bigger). + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task PreBackupAsync(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, VolumeNameList volumeNameList, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); + Argument.AssertNotNullOrEmpty(volumeGroupName, nameof(volumeGroupName)); + Argument.AssertNotNull(volumeNameList, nameof(volumeNameList)); + + using var message = CreatePreBackupRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, volumeNameList); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Validate whether a disk snapshot backup can be taken for list of volumes. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticSan. + /// The name of the VolumeGroup. + /// Volume Name List (currently only one volume name in the list is supported. Server would return error if list is bigger). + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response PreBackup(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, VolumeNameList volumeNameList, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); + Argument.AssertNotNullOrEmpty(volumeGroupName, nameof(volumeGroupName)); + Argument.AssertNotNull(volumeNameList, nameof(volumeNameList)); + + using var message = CreatePreBackupRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, volumeNameList); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreatePreRestoreRequestUri(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, DiskSnapshotList diskSnapshotList) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ElasticSan/elasticSans/", false); + uri.AppendPath(elasticSanName, true); + uri.AppendPath("/volumegroups/", false); + uri.AppendPath(volumeGroupName, true); + uri.AppendPath("/preRestore", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePreRestoreRequest(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, DiskSnapshotList diskSnapshotList) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ElasticSan/elasticSans/", false); + uri.AppendPath(elasticSanName, true); + uri.AppendPath("/volumegroups/", false); + uri.AppendPath(volumeGroupName, true); + uri.AppendPath("/preRestore", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(diskSnapshotList, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Validate whether a list of backed up disk snapshots can be restored into ElasticSan volumes. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticSan. + /// The name of the VolumeGroup. + /// Disk Snapshot List (currently only one Disk Snapshot in the list is supported and that the Disk Snapshot must be in same azure region as the ElasticSan. Server would return error if list is bigger). + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task PreRestoreAsync(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, DiskSnapshotList diskSnapshotList, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); + Argument.AssertNotNullOrEmpty(volumeGroupName, nameof(volumeGroupName)); + Argument.AssertNotNull(diskSnapshotList, nameof(diskSnapshotList)); + + using var message = CreatePreRestoreRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, diskSnapshotList); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Validate whether a list of backed up disk snapshots can be restored into ElasticSan volumes. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticSan. + /// The name of the VolumeGroup. + /// Disk Snapshot List (currently only one Disk Snapshot in the list is supported and that the Disk Snapshot must be in same azure region as the ElasticSan. Server would return error if list is bigger). + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response PreRestore(string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, DiskSnapshotList diskSnapshotList, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); + Argument.AssertNotNullOrEmpty(volumeGroupName, nameof(volumeGroupName)); + Argument.AssertNotNull(diskSnapshotList, nameof(diskSnapshotList)); + + using var message = CreatePreRestoreRequest(subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, diskSnapshotList); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByVolumeGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -588,7 +808,7 @@ internal RequestUriBuilder CreateListByVolumeGroupNextPageRequestUri(string next return uri; } - internal HttpMessage CreateListByVolumeGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName) + internal HttpMessage CreateListByVolumeGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -597,6 +817,10 @@ internal HttpMessage CreateListByVolumeGroupNextPageRequest(string nextLink, str uri.Reset(_endpoint); uri.AppendRawNextLink(nextLink, false); request.Uri = uri; + if (xmsAccessSoftDeletedResources != null) + { + request.Headers.Add("x-ms-access-soft-deleted-resources", xmsAccessSoftDeletedResources.Value.ToString()); + } request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; @@ -608,10 +832,11 @@ internal HttpMessage CreateListByVolumeGroupNextPageRequest(string nextLink, str /// The name of the resource group. The name is case insensitive. /// The name of the ElasticSan. /// The name of the VolumeGroup. + /// Optional, returns only soft deleted volumes if set to true. If set to false or if not specified, returns only active volumes. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListByVolumeGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, CancellationToken cancellationToken = default) + public async Task> ListByVolumeGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -619,7 +844,7 @@ public async Task> ListByVolumeGroupNextPageAsync Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); Argument.AssertNotNullOrEmpty(volumeGroupName, nameof(volumeGroupName)); - using var message = CreateListByVolumeGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, elasticSanName, volumeGroupName); + using var message = CreateListByVolumeGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, xmsAccessSoftDeletedResources); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -641,10 +866,11 @@ public async Task> ListByVolumeGroupNextPageAsync /// The name of the resource group. The name is case insensitive. /// The name of the ElasticSan. /// The name of the VolumeGroup. + /// Optional, returns only soft deleted volumes if set to true. If set to false or if not specified, returns only active volumes. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListByVolumeGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, CancellationToken cancellationToken = default) + public Response ListByVolumeGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, string elasticSanName, string volumeGroupName, XmsAccessSoftDeletedResource? xmsAccessSoftDeletedResources = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -652,7 +878,7 @@ public Response ListByVolumeGroupNextPage(string nextLink, Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName)); Argument.AssertNotNullOrEmpty(volumeGroupName, nameof(volumeGroupName)); - using var message = CreateListByVolumeGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, elasticSanName, volumeGroupName); + using var message = CreateListByVolumeGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, elasticSanName, volumeGroupName, xmsAccessSoftDeletedResources); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/autorest.md b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/autorest.md index 6203d85310ed..ee3cd186b0a4 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/autorest.md +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/autorest.md @@ -9,7 +9,7 @@ csharp: true library-name: ElasticSan namespace: Azure.ResourceManager.ElasticSan # default tag is a preview version -require: https://github.com/Azure/azure-rest-api-specs/blob/9a8af2acfafc4d7a23eff41b859d2d332f51b0bc/specification/elasticsan/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/elasticsan/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..4e749e6b85b1 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -12,6 +12,8 @@ trigger: - sdk/storage/Azure.Storage.DataMovement/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/