diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/api/Azure.ResourceManager.RedisEnterprise.netstandard2.0.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/api/Azure.ResourceManager.RedisEnterprise.netstandard2.0.cs index 1b16e1d41fd8..1ccd17d4f9ec 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/api/Azure.ResourceManager.RedisEnterprise.netstandard2.0.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/api/Azure.ResourceManager.RedisEnterprise.netstandard2.0.cs @@ -117,6 +117,8 @@ protected RedisEnterpriseDatabaseResource() { } } public static partial class RedisEnterpriseExtensions { + public static Azure.Response CheckNameAvailabilityRedisEnterprise(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.RedisEnterprise.Models.CheckNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task CheckNameAvailabilityRedisEnterpriseAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.RedisEnterprise.Models.CheckNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetRedisEnterpriseCluster(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetRedisEnterpriseClusterAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.RedisEnterprise.RedisEnterpriseClusterResource GetRedisEnterpriseClusterResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -127,8 +129,6 @@ public static partial class RedisEnterpriseExtensions public static Azure.Response GetRedisEnterpriseOperationsStatus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetRedisEnterpriseOperationsStatusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.RedisEnterprise.RedisEnterprisePrivateEndpointConnectionResource GetRedisEnterprisePrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Pageable GetRedisEnterpriseSkus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetRedisEnterpriseSkusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class RedisEnterprisePrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -173,17 +173,20 @@ namespace Azure.ResourceManager.RedisEnterprise.Models { public static partial class ArmRedisEnterpriseModelFactory { - public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCapability RedisEnterpriseCapability(string name = null, bool? value = default(bool?)) { throw null; } public static Azure.ResourceManager.RedisEnterprise.RedisEnterpriseClusterData RedisEnterpriseClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption = null, string hostName = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState?), string redisVersion = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseDataAccessKeys RedisEnterpriseDataAccessKeys(string primaryKey = null, string secondaryKey = null) { throw null; } public static Azure.ResourceManager.RedisEnterprise.RedisEnterpriseDatabaseData RedisEnterpriseDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClientProtocol? clientProtocol = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClientProtocol?), int? port = default(int?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusteringPolicy? clusteringPolicy = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusteringPolicy?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseEvictionPolicy? evictionPolicy = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseEvictionPolicy?), Azure.ResourceManager.RedisEnterprise.Models.RedisPersistenceSettings persistence = null, System.Collections.Generic.IEnumerable modules = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseDatabaseGeoReplication geoReplication = null) { throw null; } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseLinkedDatabase RedisEnterpriseLinkedDatabase(Azure.Core.ResourceIdentifier id = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseDatabaseLinkState? state = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseDatabaseLinkState?)) { throw null; } - public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseLocationInfo RedisEnterpriseLocationInfo(Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IEnumerable capabilities = null) { throw null; } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseModule RedisEnterpriseModule(string name = null, string args = null, string version = null) { throw null; } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseOperationStatus RedisEnterpriseOperationStatus(Azure.Core.ResourceIdentifier id = null, string name = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string status = null, Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.RedisEnterprise.RedisEnterprisePrivateEndpointConnectionData RedisEnterprisePrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePrivateEndpointConnectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePrivateLinkResource RedisEnterprisePrivateLinkResource(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } - public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRegionSkuDetail RedisEnterpriseRegionSkuDetail(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseLocationInfo locationInfo = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuName? skuDetailsName = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuName?)) { throw null; } + } + public partial class CheckNameAvailabilityContent + { + public CheckNameAvailabilityContent(string name, string resourceType) { } + public string Name { get { throw null; } } + public string ResourceType { get { throw null; } } } public partial class ExportRedisEnterpriseDatabaseContent { @@ -193,7 +196,7 @@ public ExportRedisEnterpriseDatabaseContent(System.Uri sasUri) { } public partial class FlushRedisEnterpriseDatabaseContent { public FlushRedisEnterpriseDatabaseContent() { } - public System.Collections.Generic.IList Ids { get { throw null; } } + public System.Collections.Generic.IList Ids { get { throw null; } } } public partial class ForceUnlinkRedisEnterpriseDatabaseContent { @@ -247,12 +250,6 @@ public enum RedisEnterpriseAccessKeyType Primary = 0, Secondary = 1, } - public partial class RedisEnterpriseCapability - { - internal RedisEnterpriseCapability() { } - public string Name { get { throw null; } } - public bool? Value { get { throw null; } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RedisEnterpriseClientProtocol : System.IEquatable { @@ -319,6 +316,8 @@ public RedisEnterpriseClusterPatch() { } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState EnableFailed { get { throw null; } } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState Enabling { get { throw null; } } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState Running { get { throw null; } } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState Scaling { get { throw null; } } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState ScalingFailed { get { throw null; } } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState UpdateFailed { get { throw null; } } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState Updating { get { throw null; } } public bool Equals(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState other) { throw null; } @@ -437,12 +436,6 @@ public RedisEnterpriseLinkedDatabase() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseDatabaseLinkState? State { get { throw null; } } } - public partial class RedisEnterpriseLocationInfo - { - internal RedisEnterpriseLocationInfo() { } - public System.Collections.Generic.IReadOnlyList Capabilities { get { throw null; } } - public Azure.Core.AzureLocation? Location { get { throw null; } } - } public partial class RedisEnterpriseModule { public RedisEnterpriseModule(string name) { } @@ -540,13 +533,6 @@ public partial class RedisEnterpriseRegenerateKeyContent public RedisEnterpriseRegenerateKeyContent(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseAccessKeyType keyType) { } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseAccessKeyType KeyType { get { throw null; } } } - public partial class RedisEnterpriseRegionSkuDetail - { - internal RedisEnterpriseRegionSkuDetail() { } - public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseLocationInfo LocationInfo { get { throw null; } } - public Azure.Core.ResourceType? ResourceType { get { throw null; } } - public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuName? SkuDetailsName { get { throw null; } } - } public partial class RedisEnterpriseSku { public RedisEnterpriseSku(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuName name) { } @@ -562,6 +548,9 @@ public RedisEnterpriseSku(Azure.ResourceManager.RedisEnterprise.Models.RedisEnte public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuName EnterpriseE10 { get { throw null; } } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuName EnterpriseE100 { get { throw null; } } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuName EnterpriseE20 { get { throw null; } } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuName EnterpriseE200 { get { throw null; } } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuName EnterpriseE400 { get { throw null; } } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuName EnterpriseE5 { get { throw null; } } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuName EnterpriseE50 { get { throw null; } } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuName EnterpriseFlashF1500 { get { throw null; } } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuName EnterpriseFlashF300 { get { throw null; } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseClusterCollection.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseClusterCollection.cs index 658fb91e8380..d592bac2f0de 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseClusterCollection.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseClusterCollection.cs @@ -25,7 +25,7 @@ public partial class Sample_RedisEnterpriseClusterCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RedisEnterpriseCreate() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseCreate.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseCreate.json // this example is just showing the usage of "RedisEnterprise_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 @@ -91,7 +91,7 @@ public async Task CreateOrUpdate_RedisEnterpriseCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RedisEnterpriseGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseGet.json // this example is just showing the usage of "RedisEnterprise_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 @@ -125,7 +125,7 @@ public async Task Get_RedisEnterpriseGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RedisEnterpriseGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseGet.json // this example is just showing the usage of "RedisEnterprise_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 @@ -155,7 +155,7 @@ public async Task Exists_RedisEnterpriseGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_RedisEnterpriseGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseGet.json // this example is just showing the usage of "RedisEnterprise_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 @@ -197,7 +197,7 @@ public async Task GetIfExists_RedisEnterpriseGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RedisEnterpriseListByResourceGroup() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseListByResourceGroup.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseListByResourceGroup.json // this example is just showing the usage of "RedisEnterprise_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 diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseClusterResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseClusterResource.cs index 76e0c9a28e88..9ebaab4800fb 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseClusterResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseClusterResource.cs @@ -24,7 +24,7 @@ public partial class Sample_RedisEnterpriseClusterResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RedisEnterpriseUpdate() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseUpdate.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseUpdate.json // this example is just showing the usage of "RedisEnterprise_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 @@ -68,7 +68,7 @@ public async Task Update_RedisEnterpriseUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RedisEnterpriseDelete() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDelete.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDelete.json // this example is just showing the usage of "RedisEnterprise_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 @@ -95,7 +95,7 @@ public async Task Delete_RedisEnterpriseDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RedisEnterpriseGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseGet.json // this example is just showing the usage of "RedisEnterprise_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 @@ -126,7 +126,7 @@ public async Task Get_RedisEnterpriseGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetRedisEnterpriseClusters_RedisEnterpriseList() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseList.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseList.json // this example is just showing the usage of "RedisEnterprise_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 @@ -153,12 +153,38 @@ public async Task GetRedisEnterpriseClusters_RedisEnterpriseList() Console.WriteLine($"Succeeded"); } + // RedisCacheList + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CheckNameAvailabilityRedisEnterprise_RedisCacheList() + { + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseCheckNameAvailability.json + // this example is just showing the usage of "RedisEnterprise_CheckNameAvailability" 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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "subid"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + CheckNameAvailabilityContent content = new CheckNameAvailabilityContent("cacheName", "Microsoft.Cache/redisenterprise"); + await subscriptionResource.CheckNameAvailabilityRedisEnterpriseAsync(content); + + Console.WriteLine($"Succeeded"); + } + // RedisEnterpriseListPrivateLinkResources [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResourcesByCluster_RedisEnterpriseListPrivateLinkResources() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseListPrivateLinkResources.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseListPrivateLinkResources.json // this example is just showing the usage of "PrivateLinkResources_ListByCluster" 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/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseDatabaseCollection.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseDatabaseCollection.cs index e626250913a7..f34601b5895d 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseDatabaseCollection.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseDatabaseCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_RedisEnterpriseDatabaseCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RedisEnterpriseDatabasesListByCluster() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesListByCluster.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesListByCluster.json // this example is just showing the usage of "Databases_ListByCluster" 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 @@ -60,7 +60,7 @@ public async Task GetAll_RedisEnterpriseDatabasesListByCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RedisEnterpriseDatabasesCreate() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesCreate.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesCreate.json // this example is just showing the usage of "Databases_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 @@ -118,7 +118,7 @@ public async Task CreateOrUpdate_RedisEnterpriseDatabasesCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RedisEnterpriseDatabasesCreateWithActiveGeoReplication() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json // this example is just showing the usage of "Databases_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 @@ -175,7 +175,7 @@ public async Task CreateOrUpdate_RedisEnterpriseDatabasesCreateWithActiveGeoRepl [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RedisEnterpriseDatabasesGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesGet.json // this example is just showing the usage of "Databases_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 @@ -210,7 +210,7 @@ public async Task Get_RedisEnterpriseDatabasesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RedisEnterpriseDatabasesGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesGet.json // this example is just showing the usage of "Databases_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 @@ -241,7 +241,7 @@ public async Task Exists_RedisEnterpriseDatabasesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_RedisEnterpriseDatabasesGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesGet.json // this example is just showing the usage of "Databases_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/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseDatabaseResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseDatabaseResource.cs index 54fab6873d2e..dbf2ce702c48 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseDatabaseResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterpriseDatabaseResource.cs @@ -23,7 +23,7 @@ public partial class Sample_RedisEnterpriseDatabaseResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RedisEnterpriseDatabasesUpdate() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesUpdate.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesUpdate.json // this example is just showing the usage of "Databases_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 @@ -66,7 +66,7 @@ public async Task Update_RedisEnterpriseDatabasesUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RedisEnterpriseDatabasesGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesGet.json // this example is just showing the usage of "Databases_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 @@ -98,7 +98,7 @@ public async Task Get_RedisEnterpriseDatabasesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RedisEnterpriseDatabasesDelete() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesDelete.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesDelete.json // this example is just showing the usage of "Databases_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 @@ -126,7 +126,7 @@ public async Task Delete_RedisEnterpriseDatabasesDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKeys_RedisEnterpriseDatabasesListKeys() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesListKeys.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesListKeys.json // this example is just showing the usage of "Databases_ListKeys" 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 @@ -154,7 +154,7 @@ public async Task GetKeys_RedisEnterpriseDatabasesListKeys() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegenerateKey_RedisEnterpriseDatabasesRegenerateKey() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesRegenerateKey.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesRegenerateKey.json // this example is just showing the usage of "Databases_RegenerateKey" 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 @@ -184,7 +184,7 @@ public async Task RegenerateKey_RedisEnterpriseDatabasesRegenerateKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Import_RedisEnterpriseDatabasesImport() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesImport.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesImport.json // this example is just showing the usage of "Databases_Import" 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 @@ -216,7 +216,7 @@ public async Task Import_RedisEnterpriseDatabasesImport() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Export_RedisEnterpriseDatabasesExport() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesExport.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesExport.json // this example is just showing the usage of "Databases_Export" 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 Export_RedisEnterpriseDatabasesExport() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ForceUnlink_HowToUnlinkADatabaseDuringARegionalOutage() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesForceUnlink.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesForceUnlink.json // this example is just showing the usage of "Databases_ForceUnlink" 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 +277,7 @@ public async Task ForceUnlink_HowToUnlinkADatabaseDuringARegionalOutage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Flush_HowToFlushAllTheKeysInTheDatabase() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDatabasesFlush.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDatabasesFlush.json // this example is just showing the usage of "Databases_Flush" 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 @@ -299,7 +299,7 @@ public async Task Flush_HowToFlushAllTheKeysInTheDatabase() { Ids = { -"/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default" +new ResourceIdentifier("/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default") }, }; await redisEnterpriseDatabase.FlushAsync(WaitUntil.Completed, content); diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionCollection.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionCollection.cs index 5d7530f7d0d3..dbe8c5a33391 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionCollection.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_RedisEnterprisePrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RedisEnterpriseListPrivateEndpointConnections() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseListPrivateEndpointConnections.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseListPrivateEndpointConnections.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 @@ -60,7 +60,7 @@ public async Task GetAll_RedisEnterpriseListPrivateEndpointConnections() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RedisEnterpriseGetPrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.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 @@ -95,7 +95,7 @@ public async Task Get_RedisEnterpriseGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RedisEnterpriseGetPrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.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 @@ -126,7 +126,7 @@ public async Task Exists_RedisEnterpriseGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_RedisEnterpriseGetPrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.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 @@ -169,7 +169,7 @@ public async Task GetIfExists_RedisEnterpriseGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RedisEnterprisePutPrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Put" 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/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionResource.cs index 04012a8ecbac..aa689bd81402 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionResource.cs @@ -23,7 +23,7 @@ public partial class Sample_RedisEnterprisePrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RedisEnterpriseGetPrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseGetPrivateEndpointConnection.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 @@ -55,7 +55,7 @@ public async Task Get_RedisEnterpriseGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RedisEnterprisePutPrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterprisePutPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Put" 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 @@ -96,7 +96,7 @@ public async Task Update_RedisEnterprisePutPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RedisEnterpriseDeletePrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseDeletePrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/RedisEnterpriseDeletePrivateEndpointConnection.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 diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index fb5fc5e657e0..239e52a5c783 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -23,7 +23,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetRedisEnterpriseOperationsStatus_OperationsStatusGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/OperationsStatusGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-01-preview/examples/OperationsStatusGet.json // this example is just showing the usage of "OperationsStatus_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 @@ -44,34 +44,5 @@ public async Task GetRedisEnterpriseOperationsStatus_OperationsStatusGet() Console.WriteLine($"Succeeded: {result}"); } - - // SkusList - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetRedisEnterpriseSkus_SkusList() - { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterpriseSkusList.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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subid"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - AzureLocation location = new AzureLocation("westus2"); - await foreach (RedisEnterpriseRegionSkuDetail item in subscriptionResource.GetRedisEnterpriseSkusAsync(location)) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine($"Succeeded"); - } } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/ArmRedisEnterpriseModelFactory.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/ArmRedisEnterpriseModelFactory.cs index a4b7ac758c99..ea498a369ff4 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/ArmRedisEnterpriseModelFactory.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/ArmRedisEnterpriseModelFactory.cs @@ -138,35 +138,5 @@ public static RedisEnterprisePrivateLinkResource RedisEnterprisePrivateLinkResou return new RedisEnterprisePrivateLinkResource(id, name, resourceType, systemData, groupId, requiredMembers?.ToList(), requiredZoneNames?.ToList()); } - - /// Initializes a new instance of RedisEnterpriseRegionSkuDetail. - /// Resource type which has the SKU, such as Microsoft.Cache/redisEnterprise. - /// Details about location and its capabilities. - /// Details about available skus. - /// A new instance for mocking. - public static RedisEnterpriseRegionSkuDetail RedisEnterpriseRegionSkuDetail(ResourceType? resourceType = null, RedisEnterpriseLocationInfo locationInfo = null, RedisEnterpriseSkuName? skuDetailsName = null) - { - return new RedisEnterpriseRegionSkuDetail(resourceType, locationInfo, skuDetailsName != null ? new SkuDetail(skuDetailsName) : null); - } - - /// Initializes a new instance of RedisEnterpriseLocationInfo. - /// Location name. - /// List of capabilities. - /// A new instance for mocking. - public static RedisEnterpriseLocationInfo RedisEnterpriseLocationInfo(AzureLocation? location = null, IEnumerable capabilities = null) - { - capabilities ??= new List(); - - return new RedisEnterpriseLocationInfo(location, capabilities?.ToList()); - } - - /// Initializes a new instance of RedisEnterpriseCapability. - /// Feature name. - /// Indicates whether feature is supported or not. - /// A new instance for mocking. - public static RedisEnterpriseCapability RedisEnterpriseCapability(string name = null, bool? value = null) - { - return new RedisEnterpriseCapability(name, value); - } } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/RedisEnterpriseExtensions.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/RedisEnterpriseExtensions.cs index 9d821d222bb4..f8e2dee5da19 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/RedisEnterpriseExtensions.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/RedisEnterpriseExtensions.cs @@ -258,47 +258,51 @@ public static Pageable GetRedisEnterpriseCluster } /// - /// Gets information about skus in specified location for the given subscription id + /// Checks that the Redis Enterprise cache name is valid and is not already in use. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/skus + /// /subscriptions/{subscriptionId}/providers/Microsoft.Cache/checkNameAvailability /// /// /// Operation Id - /// Skus_List + /// RedisEnterprise_CheckNameAvailability /// /// /// /// The instance the method will execute against. - /// The name of Azure region. + /// Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redisenterprise'. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetRedisEnterpriseSkusAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + /// is null. + public static async Task CheckNameAvailabilityRedisEnterpriseAsync(this SubscriptionResource subscriptionResource, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetRedisEnterpriseSkusAsync(location, cancellationToken); + Argument.AssertNotNull(content, nameof(content)); + + return await GetSubscriptionResourceExtensionClient(subscriptionResource).CheckNameAvailabilityRedisEnterpriseAsync(content, cancellationToken).ConfigureAwait(false); } /// - /// Gets information about skus in specified location for the given subscription id + /// Checks that the Redis Enterprise cache name is valid and is not already in use. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/skus + /// /subscriptions/{subscriptionId}/providers/Microsoft.Cache/checkNameAvailability /// /// /// Operation Id - /// Skus_List + /// RedisEnterprise_CheckNameAvailability /// /// /// /// The instance the method will execute against. - /// The name of Azure region. + /// Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redisenterprise'. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetRedisEnterpriseSkus(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + /// is null. + public static Response CheckNameAvailabilityRedisEnterprise(this SubscriptionResource subscriptionResource, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetRedisEnterpriseSkus(location, cancellationToken); + Argument.AssertNotNull(content, nameof(content)); + + return GetSubscriptionResourceExtensionClient(subscriptionResource).CheckNameAvailabilityRedisEnterprise(content, cancellationToken); } } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 03154ad913ef..1dc5cc1afda6 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -24,8 +24,6 @@ internal partial class SubscriptionResourceExtensionClient : ArmResource private OperationsStatusRestOperations _operationsStatusRestClient; private ClientDiagnostics _redisEnterpriseClusterRedisEnterpriseClientDiagnostics; private RedisEnterpriseRestOperations _redisEnterpriseClusterRedisEnterpriseRestClient; - private ClientDiagnostics _skusClientDiagnostics; - private SkusRestOperations _skusRestClient; /// Initializes a new instance of the class for mocking. protected SubscriptionResourceExtensionClient() @@ -43,8 +41,6 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie private OperationsStatusRestOperations OperationsStatusRestClient => _operationsStatusRestClient ??= new OperationsStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics RedisEnterpriseClusterRedisEnterpriseClientDiagnostics => _redisEnterpriseClusterRedisEnterpriseClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RedisEnterprise", RedisEnterpriseClusterResource.ResourceType.Namespace, Diagnostics); private RedisEnterpriseRestOperations RedisEnterpriseClusterRedisEnterpriseRestClient => _redisEnterpriseClusterRedisEnterpriseRestClient ??= new RedisEnterpriseRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(RedisEnterpriseClusterResource.ResourceType)); - private ClientDiagnostics SkusClientDiagnostics => _skusClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RedisEnterprise", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private SkusRestOperations SkusRestClient => _skusRestClient ??= new SkusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -161,47 +157,65 @@ public virtual Pageable GetRedisEnterpriseCluste } /// - /// Gets information about skus in specified location for the given subscription id + /// Checks that the Redis Enterprise cache name is valid and is not already in use. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/skus + /// /subscriptions/{subscriptionId}/providers/Microsoft.Cache/checkNameAvailability /// /// /// Operation Id - /// Skus_List + /// RedisEnterprise_CheckNameAvailability /// /// /// - /// The name of Azure region. + /// Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redisenterprise'. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetRedisEnterpriseSkusAsync(AzureLocation location, CancellationToken cancellationToken = default) + public virtual async Task CheckNameAvailabilityRedisEnterpriseAsync(CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => SkusRestClient.CreateListRequest(Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, RedisEnterpriseRegionSkuDetail.DeserializeRedisEnterpriseRegionSkuDetail, SkusClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetRedisEnterpriseSkus", "value", null, cancellationToken); + using var scope = RedisEnterpriseClusterRedisEnterpriseClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckNameAvailabilityRedisEnterprise"); + scope.Start(); + try + { + var response = await RedisEnterpriseClusterRedisEnterpriseRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Gets information about skus in specified location for the given subscription id + /// Checks that the Redis Enterprise cache name is valid and is not already in use. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/skus + /// /subscriptions/{subscriptionId}/providers/Microsoft.Cache/checkNameAvailability /// /// /// Operation Id - /// Skus_List + /// RedisEnterprise_CheckNameAvailability /// /// /// - /// The name of Azure region. + /// Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redisenterprise'. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetRedisEnterpriseSkus(AzureLocation location, CancellationToken cancellationToken = default) + public virtual Response CheckNameAvailabilityRedisEnterprise(CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => SkusRestClient.CreateListRequest(Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, RedisEnterpriseRegionSkuDetail.DeserializeRedisEnterpriseRegionSkuDetail, SkusClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetRedisEnterpriseSkus", "value", null, cancellationToken); + using var scope = RedisEnterpriseClusterRedisEnterpriseClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckNameAvailabilityRedisEnterprise"); + scope.Start(); + try + { + var response = RedisEnterpriseClusterRedisEnterpriseRestClient.CheckNameAvailability(Id.SubscriptionId, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/CheckNameAvailabilityContent.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/CheckNameAvailabilityContent.Serialization.cs new file mode 100644 index 000000000000..d4eada7e62c4 --- /dev/null +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/CheckNameAvailabilityContent.Serialization.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RedisEnterprise.Models +{ + public partial class CheckNameAvailabilityContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/CheckNameAvailabilityContent.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/CheckNameAvailabilityContent.cs new file mode 100644 index 000000000000..138ab86d5cad --- /dev/null +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/CheckNameAvailabilityContent.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RedisEnterprise.Models +{ + /// Parameters body to pass for resource name availability check. + public partial class CheckNameAvailabilityContent + { + /// Initializes a new instance of CheckNameAvailabilityContent. + /// Resource name. + /// Resource type. The only legal value of this property for checking redis enterprise cache name availability is 'Microsoft.Cache/redisenterprise'. + /// or is null. + public CheckNameAvailabilityContent(string name, string resourceType) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(resourceType, nameof(resourceType)); + + Name = name; + ResourceType = resourceType; + } + + /// Resource name. + public string Name { get; } + /// Resource type. The only legal value of this property for checking redis enterprise cache name availability is 'Microsoft.Cache/redisenterprise'. + public string ResourceType { get; } + } +} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/FlushRedisEnterpriseDatabaseContent.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/FlushRedisEnterpriseDatabaseContent.Serialization.cs index 329de887b9fe..d495ebc8ce95 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/FlushRedisEnterpriseDatabaseContent.Serialization.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/FlushRedisEnterpriseDatabaseContent.Serialization.cs @@ -21,6 +21,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartArray(); foreach (var item in Ids) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/FlushRedisEnterpriseDatabaseContent.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/FlushRedisEnterpriseDatabaseContent.cs index 5b98594bb6e7..598b16056151 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/FlushRedisEnterpriseDatabaseContent.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/FlushRedisEnterpriseDatabaseContent.cs @@ -16,10 +16,10 @@ public partial class FlushRedisEnterpriseDatabaseContent /// Initializes a new instance of FlushRedisEnterpriseDatabaseContent. public FlushRedisEnterpriseDatabaseContent() { - Ids = new ChangeTrackingList(); + Ids = new ChangeTrackingList(); } - /// The resource identifiers of all the other database resources in the georeplication group to be flushed. - public IList Ids { get; } + /// The identifiers of all the other database resources in the georeplication group to be flushed. + public IList Ids { get; } } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseCapability.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseCapability.Serialization.cs deleted file mode 100644 index b8d873c3636f..000000000000 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseCapability.Serialization.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.RedisEnterprise.Models -{ - public partial class RedisEnterpriseCapability - { - internal static RedisEnterpriseCapability DeserializeRedisEnterpriseCapability(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - value = property.Value.GetBoolean(); - continue; - } - } - return new RedisEnterpriseCapability(name.Value, Optional.ToNullable(value)); - } - } -} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseCapability.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseCapability.cs deleted file mode 100644 index cd3d90af8e7c..000000000000 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseCapability.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.RedisEnterprise.Models -{ - /// Information about the features the location supports. - public partial class RedisEnterpriseCapability - { - /// Initializes a new instance of RedisEnterpriseCapability. - internal RedisEnterpriseCapability() - { - } - - /// Initializes a new instance of RedisEnterpriseCapability. - /// Feature name. - /// Indicates whether feature is supported or not. - internal RedisEnterpriseCapability(string name, bool? value) - { - Name = name; - Value = value; - } - - /// Feature name. - public string Name { get; } - /// Indicates whether feature is supported or not. - public bool? Value { get; } - } -} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusterResourceState.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusterResourceState.cs index 2ec8b89ea97a..1462935ceb5c 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusterResourceState.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusterResourceState.cs @@ -34,6 +34,8 @@ public RedisEnterpriseClusterResourceState(string value) private const string DisablingValue = "Disabling"; private const string DisableFailedValue = "DisableFailed"; private const string DisabledValue = "Disabled"; + private const string ScalingValue = "Scaling"; + private const string ScalingFailedValue = "ScalingFailed"; /// Running. public static RedisEnterpriseClusterResourceState Running { get; } = new RedisEnterpriseClusterResourceState(RunningValue); @@ -59,6 +61,10 @@ public RedisEnterpriseClusterResourceState(string value) public static RedisEnterpriseClusterResourceState DisableFailed { get; } = new RedisEnterpriseClusterResourceState(DisableFailedValue); /// Disabled. public static RedisEnterpriseClusterResourceState Disabled { get; } = new RedisEnterpriseClusterResourceState(DisabledValue); + /// Scaling. + public static RedisEnterpriseClusterResourceState Scaling { get; } = new RedisEnterpriseClusterResourceState(ScalingValue); + /// ScalingFailed. + public static RedisEnterpriseClusterResourceState ScalingFailed { get; } = new RedisEnterpriseClusterResourceState(ScalingFailedValue); /// Determines if two values are the same. public static bool operator ==(RedisEnterpriseClusterResourceState left, RedisEnterpriseClusterResourceState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseLocationInfo.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseLocationInfo.Serialization.cs deleted file mode 100644 index 3ea1d606a904..000000000000 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseLocationInfo.Serialization.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.RedisEnterprise.Models -{ - public partial class RedisEnterpriseLocationInfo - { - internal static RedisEnterpriseLocationInfo DeserializeRedisEnterpriseLocationInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional location = default; - Optional> capabilities = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("capabilities"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RedisEnterpriseCapability.DeserializeRedisEnterpriseCapability(item)); - } - capabilities = array; - continue; - } - } - return new RedisEnterpriseLocationInfo(Optional.ToNullable(location), Optional.ToList(capabilities)); - } - } -} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseLocationInfo.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseLocationInfo.cs deleted file mode 100644 index 4affa1c79258..000000000000 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseLocationInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.RedisEnterprise.Models -{ - /// Information about location (for example: features that it supports). - public partial class RedisEnterpriseLocationInfo - { - /// Initializes a new instance of RedisEnterpriseLocationInfo. - internal RedisEnterpriseLocationInfo() - { - Capabilities = new ChangeTrackingList(); - } - - /// Initializes a new instance of RedisEnterpriseLocationInfo. - /// Location name. - /// List of capabilities. - internal RedisEnterpriseLocationInfo(AzureLocation? location, IReadOnlyList capabilities) - { - Location = location; - Capabilities = capabilities; - } - - /// Location name. - public AzureLocation? Location { get; } - /// List of capabilities. - public IReadOnlyList Capabilities { get; } - } -} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseRegionSkuDetail.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseRegionSkuDetail.Serialization.cs deleted file mode 100644 index 7d8bc95be506..000000000000 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseRegionSkuDetail.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.RedisEnterprise.Models -{ - public partial class RedisEnterpriseRegionSkuDetail - { - internal static RedisEnterpriseRegionSkuDetail DeserializeRedisEnterpriseRegionSkuDetail(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional resourceType = default; - Optional locationInfo = default; - Optional skuDetails = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("resourceType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resourceType = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("locationInfo"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - locationInfo = RedisEnterpriseLocationInfo.DeserializeRedisEnterpriseLocationInfo(property.Value); - continue; - } - if (property.NameEquals("skuDetails"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - skuDetails = SkuDetail.DeserializeSkuDetail(property.Value); - continue; - } - } - return new RedisEnterpriseRegionSkuDetail(Optional.ToNullable(resourceType), locationInfo.Value, skuDetails.Value); - } - } -} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseRegionSkuDetail.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseRegionSkuDetail.cs deleted file mode 100644 index 965ae18f15bd..000000000000 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseRegionSkuDetail.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.ResourceManager.RedisEnterprise.Models -{ - /// Details about the location requested and the available skus in the location. - public partial class RedisEnterpriseRegionSkuDetail - { - /// Initializes a new instance of RedisEnterpriseRegionSkuDetail. - internal RedisEnterpriseRegionSkuDetail() - { - } - - /// Initializes a new instance of RedisEnterpriseRegionSkuDetail. - /// Resource type which has the SKU, such as Microsoft.Cache/redisEnterprise. - /// Details about location and its capabilities. - /// Details about available skus. - internal RedisEnterpriseRegionSkuDetail(ResourceType? resourceType, RedisEnterpriseLocationInfo locationInfo, SkuDetail skuDetails) - { - ResourceType = resourceType; - LocationInfo = locationInfo; - SkuDetails = skuDetails; - } - - /// Resource type which has the SKU, such as Microsoft.Cache/redisEnterprise. - public ResourceType? ResourceType { get; } - /// Details about location and its capabilities. - public RedisEnterpriseLocationInfo LocationInfo { get; } - /// Details about available skus. - internal SkuDetail SkuDetails { get; } - /// The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.). - public RedisEnterpriseSkuName? SkuDetailsName - { - get => SkuDetails?.Name; - } - } -} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuName.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuName.cs index 0a12ed58c1fc..aadeb7ae6be9 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuName.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuName.cs @@ -22,14 +22,19 @@ public RedisEnterpriseSkuName(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } + private const string EnterpriseE5Value = "Enterprise_E5"; private const string EnterpriseE10Value = "Enterprise_E10"; private const string EnterpriseE20Value = "Enterprise_E20"; private const string EnterpriseE50Value = "Enterprise_E50"; private const string EnterpriseE100Value = "Enterprise_E100"; + private const string EnterpriseE200Value = "Enterprise_E200"; + private const string EnterpriseE400Value = "Enterprise_E400"; private const string EnterpriseFlashF300Value = "EnterpriseFlash_F300"; private const string EnterpriseFlashF700Value = "EnterpriseFlash_F700"; private const string EnterpriseFlashF1500Value = "EnterpriseFlash_F1500"; + /// Enterprise_E5. + public static RedisEnterpriseSkuName EnterpriseE5 { get; } = new RedisEnterpriseSkuName(EnterpriseE5Value); /// Enterprise_E10. public static RedisEnterpriseSkuName EnterpriseE10 { get; } = new RedisEnterpriseSkuName(EnterpriseE10Value); /// Enterprise_E20. @@ -38,6 +43,10 @@ public RedisEnterpriseSkuName(string value) public static RedisEnterpriseSkuName EnterpriseE50 { get; } = new RedisEnterpriseSkuName(EnterpriseE50Value); /// Enterprise_E100. public static RedisEnterpriseSkuName EnterpriseE100 { get; } = new RedisEnterpriseSkuName(EnterpriseE100Value); + /// Enterprise_E200. + public static RedisEnterpriseSkuName EnterpriseE200 { get; } = new RedisEnterpriseSkuName(EnterpriseE200Value); + /// Enterprise_E400. + public static RedisEnterpriseSkuName EnterpriseE400 { get; } = new RedisEnterpriseSkuName(EnterpriseE400Value); /// EnterpriseFlash_F300. public static RedisEnterpriseSkuName EnterpriseFlashF300 { get; } = new RedisEnterpriseSkuName(EnterpriseFlashF300Value); /// EnterpriseFlash_F700. diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RegionSkuDetails.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RegionSkuDetails.Serialization.cs deleted file mode 100644 index d6bb04c745b5..000000000000 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RegionSkuDetails.Serialization.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.RedisEnterprise.Models -{ - internal partial class RegionSkuDetails - { - internal static RegionSkuDetails DeserializeRegionSkuDetails(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RedisEnterpriseRegionSkuDetail.DeserializeRedisEnterpriseRegionSkuDetail(item)); - } - value = array; - continue; - } - } - return new RegionSkuDetails(Optional.ToList(value)); - } - } -} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RegionSkuDetails.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RegionSkuDetails.cs deleted file mode 100644 index 214ba8a9cebe..000000000000 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RegionSkuDetails.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.RedisEnterprise.Models -{ - /// List of details about all the available SKUs. - internal partial class RegionSkuDetails - { - /// Initializes a new instance of RegionSkuDetails. - internal RegionSkuDetails() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of RegionSkuDetails. - /// List of Sku Detail. - internal RegionSkuDetails(IReadOnlyList value) - { - Value = value; - } - - /// List of Sku Detail. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/SkuDetail.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/SkuDetail.Serialization.cs deleted file mode 100644 index 57f07578596a..000000000000 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/SkuDetail.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.RedisEnterprise.Models -{ - internal partial class SkuDetail - { - internal static SkuDetail DeserializeSkuDetail(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - name = new RedisEnterpriseSkuName(property.Value.GetString()); - continue; - } - } - return new SkuDetail(Optional.ToNullable(name)); - } - } -} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/SkuDetail.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/SkuDetail.cs deleted file mode 100644 index b5b34cca9ac1..000000000000 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/SkuDetail.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.RedisEnterprise.Models -{ - /// Information about Sku. - internal partial class SkuDetail - { - /// Initializes a new instance of SkuDetail. - internal SkuDetail() - { - } - - /// Initializes a new instance of SkuDetail. - /// The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.). - internal SkuDetail(RedisEnterpriseSkuName? name) - { - Name = name; - } - - /// The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.). - public RedisEnterpriseSkuName? Name { get; } - } -} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionResource.cs index 4241fe463a87..fe1df1280d06 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionResource.cs @@ -172,7 +172,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _redisEnterprisePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new RedisEnterpriseArmOperation(response); + var operation = new RedisEnterpriseArmOperation(_redisEnterprisePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _redisEnterprisePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -206,7 +206,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _redisEnterprisePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new RedisEnterpriseArmOperation(response); + var operation = new RedisEnterpriseArmOperation(_redisEnterprisePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _redisEnterprisePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/DatabasesRestOperations.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/DatabasesRestOperations.cs index a0462fb9e5f4..a28a03cee68a 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/DatabasesRestOperations.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/DatabasesRestOperations.cs @@ -33,7 +33,7 @@ public DatabasesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2023-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/OperationsStatusRestOperations.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/OperationsStatusRestOperations.cs index 5ac3f25c34fe..33d556543284 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/OperationsStatusRestOperations.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/OperationsStatusRestOperations.cs @@ -33,7 +33,7 @@ public OperationsStatusRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2023-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 112aff0d22d5..2024e04276b5 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -33,7 +33,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2023-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -328,6 +328,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr switch (message.Response.Status) { case 200: + case 202: case 204: return message.Response; default: @@ -355,6 +356,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string c switch (message.Response.Status) { case 200: + case 202: case 204: return message.Response; default: diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 5260de88bfca..327ff45a9d1c 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -33,7 +33,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2023-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/RedisEnterpriseRestOperations.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/RedisEnterpriseRestOperations.cs index 03d2c4deb529..45e846cb92ed 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/RedisEnterpriseRestOperations.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/RedisEnterpriseRestOperations.cs @@ -33,7 +33,7 @@ public RedisEnterpriseRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2023-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -487,6 +487,71 @@ public Response List(string subscriptionId, Cancella } } + internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, CheckNameAvailabilityContent content) + { + 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("/providers/Microsoft.Cache/checkNameAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Checks that the Redis Enterprise cache name is valid and is not already in use. + /// The ID of the target subscription. + /// Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redisenterprise'. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task CheckNameAvailabilityAsync(string subscriptionId, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Checks that the Redis Enterprise cache name is valid and is not already in use. + /// The ID of the target subscription. + /// Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redisenterprise'. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response CheckNameAvailability(string subscriptionId, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/SkusRestOperations.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/SkusRestOperations.cs deleted file mode 100644 index 64b942deac13..000000000000 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/SkusRestOperations.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.RedisEnterprise.Models; - -namespace Azure.ResourceManager.RedisEnterprise -{ - internal partial class SkusRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of SkusRestOperations. - /// 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 SkusRestOperations(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 ?? "2023-03-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation location) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Cache/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/skus", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets information about skus in specified location for the given subscription id. - /// The ID of the target subscription. - /// The name of Azure region. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId, location); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RegionSkuDetails value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RegionSkuDetails.DeserializeRegionSkuDetails(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets information about skus in specified location for the given subscription id. - /// The ID of the target subscription. - /// The name of Azure region. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId, location); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RegionSkuDetails value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RegionSkuDetails.DeserializeRegionSkuDetails(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/autorest.md b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/autorest.md index f7e24c6fc1a2..6becb0730d21 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/autorest.md +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: RedisEnterprise namespace: Azure.ResourceManager.RedisEnterprise -require: https://github.com/Azure/azure-rest-api-specs/blob/969fd0c2634fbcc1975d7abe3749330a5145a97c/specification/redisenterprise/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/redisenterprise/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: