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..42c45cf8e421 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; } @@ -185,6 +187,12 @@ public static partial class ArmRedisEnterpriseModelFactory 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 { public ExportRedisEnterpriseDatabaseContent(System.Uri sasUri) { } @@ -193,7 +201,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 { @@ -319,6 +327,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; } @@ -562,6 +572,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..15d3fb9900f3 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 @@ -50,7 +50,7 @@ public async Task GetRedisEnterpriseOperationsStatus_OperationsStatusGet() [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 + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-10-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 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..e36bf38e3f47 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/RedisEnterpriseExtensions.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/RedisEnterpriseExtensions.cs @@ -257,6 +257,54 @@ public static Pageable GetRedisEnterpriseCluster return GetSubscriptionResourceExtensionClient(subscriptionResource).GetRedisEnterpriseClusters(cancellationToken); } + /// + /// Checks that the Redis Enterprise cache name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Cache/checkNameAvailability + /// + /// + /// Operation Id + /// RedisEnterprise_CheckNameAvailability + /// + /// + /// + /// The instance the method will execute against. + /// Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redisenterprise'. + /// The cancellation token to use. + /// is null. + public static async Task CheckNameAvailabilityRedisEnterpriseAsync(this SubscriptionResource subscriptionResource, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + return await GetSubscriptionResourceExtensionClient(subscriptionResource).CheckNameAvailabilityRedisEnterpriseAsync(content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Checks that the Redis Enterprise cache name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Cache/checkNameAvailability + /// + /// + /// Operation Id + /// RedisEnterprise_CheckNameAvailability + /// + /// + /// + /// The instance the method will execute against. + /// Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redisenterprise'. + /// The cancellation token to use. + /// is null. + public static Response CheckNameAvailabilityRedisEnterprise(this SubscriptionResource subscriptionResource, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + return GetSubscriptionResourceExtensionClient(subscriptionResource).CheckNameAvailabilityRedisEnterprise(content, cancellationToken); + } + /// /// Gets information about skus in specified location for the given subscription id /// 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..b165b18f4dab 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -160,6 +160,68 @@ public virtual Pageable GetRedisEnterpriseCluste return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RedisEnterpriseClusterResource(Client, RedisEnterpriseClusterData.DeserializeRedisEnterpriseClusterData(e)), RedisEnterpriseClusterRedisEnterpriseClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetRedisEnterpriseClusters", "value", "nextLink", cancellationToken); } + /// + /// Checks that the Redis Enterprise cache name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Cache/checkNameAvailability + /// + /// + /// Operation Id + /// RedisEnterprise_CheckNameAvailability + /// + /// + /// + /// Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redisenterprise'. + /// The cancellation token to use. + public virtual async Task CheckNameAvailabilityRedisEnterpriseAsync(CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + 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; + } + } + + /// + /// Checks that the Redis Enterprise cache name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Cache/checkNameAvailability + /// + /// + /// Operation Id + /// RedisEnterprise_CheckNameAvailability + /// + /// + /// + /// Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redisenterprise'. + /// The cancellation token to use. + public virtual Response CheckNameAvailabilityRedisEnterprise(CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + 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; + } + } + /// /// Gets information about skus in specified location for the given subscription id /// 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/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/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/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 index 64b942deac13..095760f8a5eb 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/SkusRestOperations.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/SkusRestOperations.cs @@ -33,7 +33,7 @@ public SkusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "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/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: