From f3c748c63963d6e4a18f8b80894359a78eb5bc9a Mon Sep 17 00:00:00 2001 From: aandukuria <102808825+aandukuria@users.noreply.github.com> Date: Thu, 19 Dec 2024 08:37:23 +0530 Subject: [PATCH] Azure Redis .Net SDK update for new api v2024-11-01 (#47570) * update redis sdk with 2024-11-01 api version * Update tests * update tes * record tests and update assets file * update changelog and csproj version --- .../Azure.ResourceManager.Redis/CHANGELOG.md | 11 +- .../api/Azure.ResourceManager.Redis.net8.0.cs | 30 +++- ...re.ResourceManager.Redis.netstandard2.0.cs | 30 +++- .../Azure.ResourceManager.Redis/assets.json | 2 +- ...isCacheAccessPolicyAssignmentCollection.cs | 10 +- ...edisCacheAccessPolicyAssignmentResource.cs | 6 +- ...Sample_RedisCacheAccessPolicyCollection.cs | 10 +- .../Sample_RedisCacheAccessPolicyResource.cs | 6 +- .../Samples/Sample_RedisCollection.cs | 166 +++++++++++++++-- .../Sample_RedisFirewallRuleCollection.cs | 10 +- .../Sample_RedisFirewallRuleResource.cs | 6 +- ...RedisLinkedServerWithPropertyCollection.cs | 10 +- ...e_RedisLinkedServerWithPropertyResource.cs | 6 +- .../Sample_RedisPatchScheduleCollection.cs | 10 +- .../Sample_RedisPatchScheduleResource.cs | 6 +- ...edisPrivateEndpointConnectionCollection.cs | 10 +- ..._RedisPrivateEndpointConnectionResource.cs | 6 +- .../Generated/Samples/Sample_RedisResource.cs | 22 +-- .../Sample_SubscriptionResourceExtensions.cs | 6 +- .../src/Azure.ResourceManager.Redis.csproj | 2 +- .../src/Generated/ArmRedisModelFactory.cs | 76 +++++++- .../MockableRedisResourceGroupResource.cs | 4 +- .../MockableRedisSubscriptionResource.cs | 12 +- .../Generated/Extensions/RedisExtensions.cs | 16 +- ...edisCreateOrUpdateContent.Serialization.cs | 16 ++ .../Models/RedisCreateOrUpdateContent.cs | 7 +- .../Models/RedisPatch.Serialization.cs | 16 ++ .../src/Generated/Models/RedisPatch.cs | 7 +- .../Generated/Models/ZonalAllocationPolicy.cs | 54 ++++++ ...isCacheAccessPolicyAssignmentCollection.cs | 20 +-- ...edisCacheAccessPolicyAssignmentResource.cs | 12 +- .../RedisCacheAccessPolicyCollection.cs | 20 +-- .../RedisCacheAccessPolicyResource.cs | 12 +- .../src/Generated/RedisCollection.cs | 20 +-- .../src/Generated/RedisData.Serialization.cs | 31 ++++ .../src/Generated/RedisData.cs | 7 +- .../Generated/RedisFirewallRuleCollection.cs | 20 +-- .../Generated/RedisFirewallRuleResource.cs | 12 +- ...RedisLinkedServerWithPropertyCollection.cs | 20 +-- .../RedisLinkedServerWithPropertyResource.cs | 12 +- .../Generated/RedisPatchScheduleCollection.cs | 20 +-- .../Generated/RedisPatchScheduleResource.cs | 12 +- ...edisPrivateEndpointConnectionCollection.cs | 20 +-- .../RedisPrivateEndpointConnectionResource.cs | 12 +- .../src/Generated/RedisResource.cs | 80 ++++----- .../AccessPolicyAssignmentRestOperations.cs | 2 +- .../AccessPolicyRestOperations.cs | 2 +- .../AsyncOperationStatusRestOperations.cs | 2 +- .../FirewallRulesRestOperations.cs | 2 +- .../LinkedServerRestOperations.cs | 2 +- .../PatchSchedulesRestOperations.cs | 2 +- ...rivateEndpointConnectionsRestOperations.cs | 2 +- .../PrivateLinkResourcesRestOperations.cs | 2 +- .../RestOperations/RedisRestOperations.cs | 2 +- .../src/autorest.md | 3 +- .../ScenarioTests/FirewallFunctionalTests.cs | 5 +- .../ZonalAllocationPolicyFunctionalTests.cs | 169 ++++++++++++++++++ 57 files changed, 831 insertions(+), 267 deletions(-) create mode 100644 sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/ZonalAllocationPolicy.cs create mode 100644 sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/ZonalAllocationPolicyFunctionalTests.cs diff --git a/sdk/redis/Azure.ResourceManager.Redis/CHANGELOG.md b/sdk/redis/Azure.ResourceManager.Redis/CHANGELOG.md index 6b7bd672098d1..3ffe044efff31 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/CHANGELOG.md +++ b/sdk/redis/Azure.ResourceManager.Redis/CHANGELOG.md @@ -1,16 +1,11 @@ # Release History -## 1.5.0-beta.1 (Unreleased) +## 1.5.0 (2024-12-18) ### Features Added -- Exposed `JsonModelWriteCore` for model serialization procedure. - -### Breaking Changes - -### Bugs Fixed - -### Other Changes + - Exposed `JsonModelWriteCore` for model serialization procedure. + - Adds support for choosing ZonalAllocationPolicy for your Azure Cache for Redis instance. ## 1.4.0 (2024-07-11) diff --git a/sdk/redis/Azure.ResourceManager.Redis/api/Azure.ResourceManager.Redis.net8.0.cs b/sdk/redis/Azure.ResourceManager.Redis/api/Azure.ResourceManager.Redis.net8.0.cs index e27043acab5ba..8af39ce525462 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/api/Azure.ResourceManager.Redis.net8.0.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/api/Azure.ResourceManager.Redis.net8.0.cs @@ -142,6 +142,7 @@ public RedisData(Azure.Core.AzureLocation location, Azure.ResourceManager.Redis. public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public System.Collections.Generic.IDictionary TenantSettings { get { throw null; } } public Azure.ResourceManager.Redis.Models.UpdateChannel? UpdateChannel { get { throw null; } set { } } + public Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy? ZonalAllocationPolicy { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Redis.RedisData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -540,12 +541,16 @@ public static partial class ArmRedisModelFactory public static Azure.ResourceManager.Redis.Models.RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBackupEnabled = default(bool?), string rdbBackupFrequency = null, int? rdbBackupMaxSnapshotCount = default(int?), string rdbStorageConnectionString = null, bool? isAofBackupEnabled = default(bool?), string aofStorageConnectionString0 = null, string aofStorageConnectionString1 = null, string maxFragmentationMemoryReserved = null, string maxMemoryPolicy = null, string maxMemoryReserved = null, string maxMemoryDelta = null, string maxClients = null, string notifyKeyspaceEvents = null, string preferredDataArchiveAuthMethod = null, string preferredDataPersistenceAuthMethod = null, string zonalConfiguration = null, string authNotRequired = null, string storageSubscriptionId = null, string isAadEnabled = null, System.Collections.Generic.IDictionary additionalProperties = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Redis.Models.RedisCreateOrUpdateContent RedisCreateOrUpdateContent(System.Collections.Generic.IEnumerable zones, Azure.Core.AzureLocation location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, System.Collections.Generic.IDictionary tenantSettings, int? shardCount, Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion, Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel, Azure.ResourceManager.Redis.Models.RedisSku sku, Azure.Core.ResourceIdentifier subnetId, System.Net.IPAddress staticIP) { throw null; } - public static Azure.ResourceManager.Redis.Models.RedisCreateOrUpdateContent RedisCreateOrUpdateContent(System.Collections.Generic.IEnumerable zones = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel = default(Azure.ResourceManager.Redis.Models.UpdateChannel?), bool? isAccessKeyAuthenticationDisabled = default(bool?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Redis.Models.RedisCreateOrUpdateContent RedisCreateOrUpdateContent(System.Collections.Generic.IEnumerable zones, Azure.Core.AzureLocation location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, System.Collections.Generic.IDictionary tenantSettings, int? shardCount, Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion, Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, Azure.ResourceManager.Redis.Models.RedisSku sku, Azure.Core.ResourceIdentifier subnetId, System.Net.IPAddress staticIP) { throw null; } + public static Azure.ResourceManager.Redis.Models.RedisCreateOrUpdateContent RedisCreateOrUpdateContent(System.Collections.Generic.IEnumerable zones = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel = default(Azure.ResourceManager.Redis.Models.UpdateChannel?), bool? isAccessKeyAuthenticationDisabled = default(bool?), Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy? zonalAllocationPolicy = default(Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Redis.RedisData RedisData(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), System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState = default(Azure.ResourceManager.Redis.Models.RedisProvisioningState?), string hostName = null, int? port = default(int?), int? sslPort = default(int?), Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys = null, System.Collections.Generic.IEnumerable linkedServers = null, System.Collections.Generic.IEnumerable instances = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Redis.RedisData RedisData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, System.Collections.Generic.IDictionary tenantSettings, int? shardCount, Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion, Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel, Azure.ResourceManager.Redis.Models.RedisSku sku, Azure.Core.ResourceIdentifier subnetId, System.Net.IPAddress staticIP, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys, System.Collections.Generic.IEnumerable linkedServers, System.Collections.Generic.IEnumerable instances, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } - public static Azure.ResourceManager.Redis.RedisData RedisData(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), System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel = default(Azure.ResourceManager.Redis.Models.UpdateChannel?), bool? isAccessKeyAuthenticationDisabled = default(bool?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState = default(Azure.ResourceManager.Redis.Models.RedisProvisioningState?), string hostName = null, int? port = default(int?), int? sslPort = default(int?), Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys = null, System.Collections.Generic.IEnumerable linkedServers = null, System.Collections.Generic.IEnumerable instances = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Redis.RedisData RedisData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, System.Collections.Generic.IDictionary tenantSettings, int? shardCount, Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion, Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, Azure.ResourceManager.Redis.Models.RedisSku sku, Azure.Core.ResourceIdentifier subnetId, System.Net.IPAddress staticIP, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys, System.Collections.Generic.IEnumerable linkedServers, System.Collections.Generic.IEnumerable instances, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } + public static Azure.ResourceManager.Redis.RedisData RedisData(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), System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel = default(Azure.ResourceManager.Redis.Models.UpdateChannel?), bool? isAccessKeyAuthenticationDisabled = default(bool?), Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy? zonalAllocationPolicy = default(Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState = default(Azure.ResourceManager.Redis.Models.RedisProvisioningState?), string hostName = null, int? port = default(int?), int? sslPort = default(int?), Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys = null, System.Collections.Generic.IEnumerable linkedServers = null, System.Collections.Generic.IEnumerable instances = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } public static Azure.ResourceManager.Redis.RedisFirewallRuleData RedisFirewallRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Net.IPAddress startIP = null, System.Net.IPAddress endIP = null) { throw null; } public static Azure.ResourceManager.Redis.Models.RedisForceRebootResult RedisForceRebootResult(string message = null) { throw null; } public static Azure.ResourceManager.Redis.Models.RedisInstanceDetails RedisInstanceDetails(int? sslPort = default(int?), int? nonSslPort = default(int?), string zone = null, int? shardId = default(int?), bool? isMaster = default(bool?), bool? isPrimary = default(bool?)) { throw null; } @@ -648,6 +653,7 @@ public RedisCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.Resou public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IDictionary TenantSettings { get { throw null; } } public Azure.ResourceManager.Redis.Models.UpdateChannel? UpdateChannel { get { throw null; } set { } } + public Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy? ZonalAllocationPolicy { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Redis.Models.RedisCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -755,6 +761,7 @@ public RedisPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IDictionary TenantSettings { get { throw null; } } public Azure.ResourceManager.Redis.Models.UpdateChannel? UpdateChannel { get { throw null; } set { } } + public Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy? ZonalAllocationPolicy { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Redis.Models.RedisPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1052,4 +1059,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Redis.Models.UpdateChannel left, Azure.ResourceManager.Redis.Models.UpdateChannel right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ZonalAllocationPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ZonalAllocationPolicy(string value) { throw null; } + public static Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy Automatic { get { throw null; } } + public static Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy NoZones { get { throw null; } } + public static Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy UserDefined { get { throw null; } } + public bool Equals(Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy left, Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy left, Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy right) { throw null; } + public override string ToString() { throw null; } + } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/api/Azure.ResourceManager.Redis.netstandard2.0.cs b/sdk/redis/Azure.ResourceManager.Redis/api/Azure.ResourceManager.Redis.netstandard2.0.cs index e27043acab5ba..8af39ce525462 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/api/Azure.ResourceManager.Redis.netstandard2.0.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/api/Azure.ResourceManager.Redis.netstandard2.0.cs @@ -142,6 +142,7 @@ public RedisData(Azure.Core.AzureLocation location, Azure.ResourceManager.Redis. public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public System.Collections.Generic.IDictionary TenantSettings { get { throw null; } } public Azure.ResourceManager.Redis.Models.UpdateChannel? UpdateChannel { get { throw null; } set { } } + public Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy? ZonalAllocationPolicy { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Redis.RedisData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -540,12 +541,16 @@ public static partial class ArmRedisModelFactory public static Azure.ResourceManager.Redis.Models.RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBackupEnabled = default(bool?), string rdbBackupFrequency = null, int? rdbBackupMaxSnapshotCount = default(int?), string rdbStorageConnectionString = null, bool? isAofBackupEnabled = default(bool?), string aofStorageConnectionString0 = null, string aofStorageConnectionString1 = null, string maxFragmentationMemoryReserved = null, string maxMemoryPolicy = null, string maxMemoryReserved = null, string maxMemoryDelta = null, string maxClients = null, string notifyKeyspaceEvents = null, string preferredDataArchiveAuthMethod = null, string preferredDataPersistenceAuthMethod = null, string zonalConfiguration = null, string authNotRequired = null, string storageSubscriptionId = null, string isAadEnabled = null, System.Collections.Generic.IDictionary additionalProperties = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Redis.Models.RedisCreateOrUpdateContent RedisCreateOrUpdateContent(System.Collections.Generic.IEnumerable zones, Azure.Core.AzureLocation location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, System.Collections.Generic.IDictionary tenantSettings, int? shardCount, Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion, Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel, Azure.ResourceManager.Redis.Models.RedisSku sku, Azure.Core.ResourceIdentifier subnetId, System.Net.IPAddress staticIP) { throw null; } - public static Azure.ResourceManager.Redis.Models.RedisCreateOrUpdateContent RedisCreateOrUpdateContent(System.Collections.Generic.IEnumerable zones = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel = default(Azure.ResourceManager.Redis.Models.UpdateChannel?), bool? isAccessKeyAuthenticationDisabled = default(bool?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Redis.Models.RedisCreateOrUpdateContent RedisCreateOrUpdateContent(System.Collections.Generic.IEnumerable zones, Azure.Core.AzureLocation location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, System.Collections.Generic.IDictionary tenantSettings, int? shardCount, Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion, Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, Azure.ResourceManager.Redis.Models.RedisSku sku, Azure.Core.ResourceIdentifier subnetId, System.Net.IPAddress staticIP) { throw null; } + public static Azure.ResourceManager.Redis.Models.RedisCreateOrUpdateContent RedisCreateOrUpdateContent(System.Collections.Generic.IEnumerable zones = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel = default(Azure.ResourceManager.Redis.Models.UpdateChannel?), bool? isAccessKeyAuthenticationDisabled = default(bool?), Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy? zonalAllocationPolicy = default(Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Redis.RedisData RedisData(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), System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState = default(Azure.ResourceManager.Redis.Models.RedisProvisioningState?), string hostName = null, int? port = default(int?), int? sslPort = default(int?), Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys = null, System.Collections.Generic.IEnumerable linkedServers = null, System.Collections.Generic.IEnumerable instances = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Redis.RedisData RedisData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, System.Collections.Generic.IDictionary tenantSettings, int? shardCount, Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion, Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel, Azure.ResourceManager.Redis.Models.RedisSku sku, Azure.Core.ResourceIdentifier subnetId, System.Net.IPAddress staticIP, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys, System.Collections.Generic.IEnumerable linkedServers, System.Collections.Generic.IEnumerable instances, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } - public static Azure.ResourceManager.Redis.RedisData RedisData(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), System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel = default(Azure.ResourceManager.Redis.Models.UpdateChannel?), bool? isAccessKeyAuthenticationDisabled = default(bool?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState = default(Azure.ResourceManager.Redis.Models.RedisProvisioningState?), string hostName = null, int? port = default(int?), int? sslPort = default(int?), Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys = null, System.Collections.Generic.IEnumerable linkedServers = null, System.Collections.Generic.IEnumerable instances = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Redis.RedisData RedisData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, System.Collections.Generic.IDictionary tenantSettings, int? shardCount, Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion, Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, Azure.ResourceManager.Redis.Models.RedisSku sku, Azure.Core.ResourceIdentifier subnetId, System.Net.IPAddress staticIP, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys, System.Collections.Generic.IEnumerable linkedServers, System.Collections.Generic.IEnumerable instances, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } + public static Azure.ResourceManager.Redis.RedisData RedisData(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), System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel = default(Azure.ResourceManager.Redis.Models.UpdateChannel?), bool? isAccessKeyAuthenticationDisabled = default(bool?), Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy? zonalAllocationPolicy = default(Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState = default(Azure.ResourceManager.Redis.Models.RedisProvisioningState?), string hostName = null, int? port = default(int?), int? sslPort = default(int?), Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys = null, System.Collections.Generic.IEnumerable linkedServers = null, System.Collections.Generic.IEnumerable instances = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } public static Azure.ResourceManager.Redis.RedisFirewallRuleData RedisFirewallRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Net.IPAddress startIP = null, System.Net.IPAddress endIP = null) { throw null; } public static Azure.ResourceManager.Redis.Models.RedisForceRebootResult RedisForceRebootResult(string message = null) { throw null; } public static Azure.ResourceManager.Redis.Models.RedisInstanceDetails RedisInstanceDetails(int? sslPort = default(int?), int? nonSslPort = default(int?), string zone = null, int? shardId = default(int?), bool? isMaster = default(bool?), bool? isPrimary = default(bool?)) { throw null; } @@ -648,6 +653,7 @@ public RedisCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.Resou public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IDictionary TenantSettings { get { throw null; } } public Azure.ResourceManager.Redis.Models.UpdateChannel? UpdateChannel { get { throw null; } set { } } + public Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy? ZonalAllocationPolicy { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Redis.Models.RedisCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -755,6 +761,7 @@ public RedisPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IDictionary TenantSettings { get { throw null; } } public Azure.ResourceManager.Redis.Models.UpdateChannel? UpdateChannel { get { throw null; } set { } } + public Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy? ZonalAllocationPolicy { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Redis.Models.RedisPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1052,4 +1059,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Redis.Models.UpdateChannel left, Azure.ResourceManager.Redis.Models.UpdateChannel right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ZonalAllocationPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ZonalAllocationPolicy(string value) { throw null; } + public static Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy Automatic { get { throw null; } } + public static Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy NoZones { get { throw null; } } + public static Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy UserDefined { get { throw null; } } + public bool Equals(Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy left, Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy left, Azure.ResourceManager.Redis.Models.ZonalAllocationPolicy right) { throw null; } + public override string ToString() { throw null; } + } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/assets.json b/sdk/redis/Azure.ResourceManager.Redis/assets.json index 2f0eb378b21ce..04b5a33c08ca2 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/assets.json +++ b/sdk/redis/Azure.ResourceManager.Redis/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/redis/Azure.ResourceManager.Redis", - "Tag": "net/redis/Azure.ResourceManager.Redis_9f9dcdb5df" + "Tag": "net/redis/Azure.ResourceManager.Redis_14b33586e3" } diff --git a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyAssignmentCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyAssignmentCollection.cs index 8136fcb2fd0cd..f8d771500278f 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyAssignmentCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyAssignmentCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_RedisCacheAccessPolicyAssignmentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RedisCacheAccessPolicyAssignmentCreateUpdate() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyAssignmentCreateUpdate.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyAssignmentCreateUpdate.json // this example is just showing the usage of "AccessPolicyAssignment_CreateUpdate" 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 CreateOrUpdate_RedisCacheAccessPolicyAssignmentCreateUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_RedisCacheAccessPolicyAssignmentGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyAssignmentGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyAssignmentGet.json // this example is just showing the usage of "AccessPolicyAssignment_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 @@ -94,7 +94,7 @@ public async Task Get_RedisCacheAccessPolicyAssignmentGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RedisCacheAccessPolicyAssignmentList() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyAssignmentList.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyAssignmentList.json // this example is just showing the usage of "AccessPolicyAssignment_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 @@ -130,7 +130,7 @@ public async Task GetAll_RedisCacheAccessPolicyAssignmentList() [Ignore("Only validating compilation of examples")] public async Task Exists_RedisCacheAccessPolicyAssignmentGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyAssignmentGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyAssignmentGet.json // this example is just showing the usage of "AccessPolicyAssignment_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 @@ -160,7 +160,7 @@ public async Task Exists_RedisCacheAccessPolicyAssignmentGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RedisCacheAccessPolicyAssignmentGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyAssignmentGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyAssignmentGet.json // this example is just showing the usage of "AccessPolicyAssignment_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/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyAssignmentResource.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyAssignmentResource.cs index 107beeb2e8637..cb50385c82086 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyAssignmentResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyAssignmentResource.cs @@ -19,7 +19,7 @@ public partial class Sample_RedisCacheAccessPolicyAssignmentResource [Ignore("Only validating compilation of examples")] public async Task Get_RedisCacheAccessPolicyAssignmentGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyAssignmentGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyAssignmentGet.json // this example is just showing the usage of "AccessPolicyAssignment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_RedisCacheAccessPolicyAssignmentGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RedisCacheAccessPolicyAssignmentDelete() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyAssignmentDelete.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyAssignmentDelete.json // this example is just showing the usage of "AccessPolicyAssignment_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 @@ -77,7 +77,7 @@ public async Task Delete_RedisCacheAccessPolicyAssignmentDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RedisCacheAccessPolicyAssignmentCreateUpdate() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyAssignmentCreateUpdate.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyAssignmentCreateUpdate.json // this example is just showing the usage of "AccessPolicyAssignment_CreateUpdate" 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/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyCollection.cs index a747d2488a80a..38756975d0cbf 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_RedisCacheAccessPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RedisCacheAccessPolicyCreateUpdate() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyCreateUpdate.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyCreateUpdate.json // this example is just showing the usage of "AccessPolicy_CreateUpdate" 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 @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_RedisCacheAccessPolicyCreateUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_RedisCacheAccessPolicyGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyGet.json // this example is just showing the usage of "AccessPolicy_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 @@ -92,7 +92,7 @@ public async Task Get_RedisCacheAccessPolicyGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RedisCacheAccessPolicyList() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyList.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyList.json // this example is just showing the usage of "AccessPolicy_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 @@ -128,7 +128,7 @@ public async Task GetAll_RedisCacheAccessPolicyList() [Ignore("Only validating compilation of examples")] public async Task Exists_RedisCacheAccessPolicyGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyGet.json // this example is just showing the usage of "AccessPolicy_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 @@ -158,7 +158,7 @@ public async Task Exists_RedisCacheAccessPolicyGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RedisCacheAccessPolicyGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyGet.json // this example is just showing the usage of "AccessPolicy_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/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyResource.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyResource.cs index f970bb58d76f2..ca75be9e6f69d 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCacheAccessPolicyResource.cs @@ -19,7 +19,7 @@ public partial class Sample_RedisCacheAccessPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_RedisCacheAccessPolicyGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyGet.json // this example is just showing the usage of "AccessPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_RedisCacheAccessPolicyGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RedisCacheAccessPolicyDelete() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyDelete.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyDelete.json // this example is just showing the usage of "AccessPolicy_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 @@ -77,7 +77,7 @@ public async Task Delete_RedisCacheAccessPolicyDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RedisCacheAccessPolicyCreateUpdate() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAccessPolicyCreateUpdate.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAccessPolicyCreateUpdate.json // this example is just showing the usage of "AccessPolicy_CreateUpdate" 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/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCollection.cs index 26c9f9f7521b4..0dc2b284a28aa 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_RedisCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RedisCacheCreate() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheCreate.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheCreate.json // this example is just showing the usage of "Redis_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -42,7 +42,7 @@ public async Task CreateOrUpdate_RedisCacheCreate() // invoke the operation string name = "cache1"; - RedisCreateOrUpdateContent content = new RedisCreateOrUpdateContent(new AzureLocation("West US"), new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) + RedisCreateOrUpdateContent content = new RedisCreateOrUpdateContent(new AzureLocation("East US"), new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) { Zones = { "1" }, RedisConfiguration = new RedisCommonConfiguration @@ -67,11 +67,59 @@ public async Task CreateOrUpdate_RedisCacheCreate() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RedisCacheCreateAutomaticZonalAllocationPolicy() + { + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheCreateAutomaticZonalAllocationPolicy.json + // this example is just showing the usage of "Redis_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this RedisResource + RedisCollection collection = resourceGroupResource.GetAllRedis(); + + // invoke the operation + string name = "cache1"; + RedisCreateOrUpdateContent content = new RedisCreateOrUpdateContent(new AzureLocation("East US"), new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) + { + RedisConfiguration = new RedisCommonConfiguration + { + MaxMemoryPolicy = "allkeys-lru", + }, + EnableNonSslPort = true, + ReplicasPerPrimary = 2, + ShardCount = 2, + MinimumTlsVersion = RedisTlsVersion.Tls1_2, + ZonalAllocationPolicy = ZonalAllocationPolicy.Automatic, + SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1"), + StaticIP = IPAddress.Parse("192.168.0.5"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, content); + RedisResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RedisData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RedisCacheCreateDefaultVersion() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheCreateDefaultVersion.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheCreateDefaultVersion.json // this example is just showing the usage of "Redis_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 +139,7 @@ public async Task CreateOrUpdate_RedisCacheCreateDefaultVersion() // invoke the operation string name = "cache1"; - RedisCreateOrUpdateContent content = new RedisCreateOrUpdateContent(new AzureLocation("West US"), new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) + RedisCreateOrUpdateContent content = new RedisCreateOrUpdateContent(new AzureLocation("East US"), new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) { Zones = { "1" }, RedisConfiguration = new RedisCommonConfiguration @@ -119,7 +167,104 @@ public async Task CreateOrUpdate_RedisCacheCreateDefaultVersion() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RedisCacheCreateLatestVersion() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheCreateLatestVersion.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheCreateLatestVersion.json + // this example is just showing the usage of "Redis_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this RedisResource + RedisCollection collection = resourceGroupResource.GetAllRedis(); + + // invoke the operation + string name = "cache1"; + RedisCreateOrUpdateContent content = new RedisCreateOrUpdateContent(new AzureLocation("East US"), new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) + { + Zones = { "1" }, + RedisConfiguration = new RedisCommonConfiguration + { + MaxMemoryPolicy = "allkeys-lru", + }, + RedisVersion = "Latest", + EnableNonSslPort = true, + ReplicasPerPrimary = 2, + ShardCount = 2, + MinimumTlsVersion = RedisTlsVersion.Tls1_2, + SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1"), + StaticIP = IPAddress.Parse("192.168.0.5"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, content); + RedisResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RedisData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RedisCacheCreateNoZonesZonalAllocationPolicy() + { + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheCreateNoZonesZonalAllocationPolicy.json + // this example is just showing the usage of "Redis_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this RedisResource + RedisCollection collection = resourceGroupResource.GetAllRedis(); + + // invoke the operation + string name = "cache1"; + RedisCreateOrUpdateContent content = new RedisCreateOrUpdateContent(new AzureLocation("East US"), new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) + { + RedisConfiguration = new RedisCommonConfiguration + { + MaxMemoryPolicy = "allkeys-lru", + }, + EnableNonSslPort = true, + ReplicasPerPrimary = 2, + ShardCount = 2, + MinimumTlsVersion = RedisTlsVersion.Tls1_2, + ZonalAllocationPolicy = ZonalAllocationPolicy.NoZones, + SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1"), + StaticIP = IPAddress.Parse("192.168.0.5"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, content); + RedisResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RedisData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RedisCacheCreateUserDefinedZonalAllocationPolicy() + { + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheCreateUserDefinedZonalAllocationPolicy.json // this example is just showing the usage of "Redis_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 @@ -139,7 +284,7 @@ public async Task CreateOrUpdate_RedisCacheCreateLatestVersion() // invoke the operation string name = "cache1"; - RedisCreateOrUpdateContent content = new RedisCreateOrUpdateContent(new AzureLocation("West US"), new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) + RedisCreateOrUpdateContent content = new RedisCreateOrUpdateContent(new AzureLocation("East US"), new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) { Zones = { "1" }, RedisConfiguration = new RedisCommonConfiguration @@ -151,6 +296,7 @@ public async Task CreateOrUpdate_RedisCacheCreateLatestVersion() ReplicasPerPrimary = 2, ShardCount = 2, MinimumTlsVersion = RedisTlsVersion.Tls1_2, + ZonalAllocationPolicy = ZonalAllocationPolicy.UserDefined, SubnetId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1"), StaticIP = IPAddress.Parse("192.168.0.5"), }; @@ -168,7 +314,7 @@ public async Task CreateOrUpdate_RedisCacheCreateLatestVersion() [Ignore("Only validating compilation of examples")] public async Task Get_RedisCacheGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheGet.json // this example is just showing the usage of "Redis_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 @@ -201,7 +347,7 @@ public async Task Get_RedisCacheGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RedisCacheListByResourceGroup() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheListByResourceGroup.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheListByResourceGroup.json // this example is just showing the usage of "Redis_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 @@ -236,7 +382,7 @@ public async Task GetAll_RedisCacheListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_RedisCacheGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheGet.json // this example is just showing the usage of "Redis_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 @@ -265,7 +411,7 @@ public async Task Exists_RedisCacheGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RedisCacheGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheGet.json // this example is just showing the usage of "Redis_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/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisFirewallRuleCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisFirewallRuleCollection.cs index 85113b993f496..beb16f44dba32 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisFirewallRuleCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisFirewallRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RedisFirewallRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RedisCacheFirewallRuleCreate() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheFirewallRuleCreate.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheFirewallRuleCreate.json // this example is just showing the usage of "FirewallRules_CreateOrUpdate" 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 @@ -56,7 +56,7 @@ public async Task CreateOrUpdate_RedisCacheFirewallRuleCreate() [Ignore("Only validating compilation of examples")] public async Task Get_RedisCacheFirewallRuleGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheFirewallRuleGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheFirewallRuleGet.json // this example is just showing the usage of "FirewallRules_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 @@ -90,7 +90,7 @@ public async Task Get_RedisCacheFirewallRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RedisCacheFirewallRulesList() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheFirewallRulesList.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheFirewallRulesList.json // this example is just showing the usage of "FirewallRules_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 @@ -126,7 +126,7 @@ public async Task GetAll_RedisCacheFirewallRulesList() [Ignore("Only validating compilation of examples")] public async Task Exists_RedisCacheFirewallRuleGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheFirewallRuleGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheFirewallRuleGet.json // this example is just showing the usage of "FirewallRules_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 @@ -156,7 +156,7 @@ public async Task Exists_RedisCacheFirewallRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RedisCacheFirewallRuleGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheFirewallRuleGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheFirewallRuleGet.json // this example is just showing the usage of "FirewallRules_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/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisFirewallRuleResource.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisFirewallRuleResource.cs index 6ba2391377f1e..e5d1902509d4f 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisFirewallRuleResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisFirewallRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RedisFirewallRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_RedisCacheFirewallRuleGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheFirewallRuleGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheFirewallRuleGet.json // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_RedisCacheFirewallRuleGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RedisCacheFirewallRuleDelete() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheFirewallRuleDelete.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheFirewallRuleDelete.json // this example is just showing the usage of "FirewallRules_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 @@ -78,7 +78,7 @@ public async Task Delete_RedisCacheFirewallRuleDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RedisCacheFirewallRuleCreate() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheFirewallRuleCreate.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheFirewallRuleCreate.json // this example is just showing the usage of "FirewallRules_CreateOrUpdate" 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/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisLinkedServerWithPropertyCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisLinkedServerWithPropertyCollection.cs index c9da194390d7b..67bd945b34e52 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisLinkedServerWithPropertyCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisLinkedServerWithPropertyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RedisLinkedServerWithPropertyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_LinkedServerCreate() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheLinkedServer_Create.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheLinkedServer_Create.json // this example is just showing the usage of "LinkedServer_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 @@ -56,7 +56,7 @@ public async Task CreateOrUpdate_LinkedServerCreate() [Ignore("Only validating compilation of examples")] public async Task Get_LinkedServerGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheLinkedServer_Get.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheLinkedServer_Get.json // this example is just showing the usage of "LinkedServer_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 @@ -90,7 +90,7 @@ public async Task Get_LinkedServerGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_LinkedServerList() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheLinkedServer_List.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheLinkedServer_List.json // this example is just showing the usage of "LinkedServer_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 @@ -126,7 +126,7 @@ public async Task GetAll_LinkedServerList() [Ignore("Only validating compilation of examples")] public async Task Exists_LinkedServerGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheLinkedServer_Get.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheLinkedServer_Get.json // this example is just showing the usage of "LinkedServer_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 @@ -156,7 +156,7 @@ public async Task Exists_LinkedServerGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_LinkedServerGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheLinkedServer_Get.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheLinkedServer_Get.json // this example is just showing the usage of "LinkedServer_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/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisLinkedServerWithPropertyResource.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisLinkedServerWithPropertyResource.cs index a2d361faed58e..ca8a069eff22b 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisLinkedServerWithPropertyResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisLinkedServerWithPropertyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RedisLinkedServerWithPropertyResource [Ignore("Only validating compilation of examples")] public async Task Get_LinkedServerGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheLinkedServer_Get.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheLinkedServer_Get.json // this example is just showing the usage of "LinkedServer_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_LinkedServerGet() [Ignore("Only validating compilation of examples")] public async Task Delete_LinkedServerDelete() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheLinkedServer_Delete.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheLinkedServer_Delete.json // this example is just showing the usage of "LinkedServer_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 @@ -78,7 +78,7 @@ public async Task Delete_LinkedServerDelete() [Ignore("Only validating compilation of examples")] public async Task Update_LinkedServerCreate() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheLinkedServer_Create.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheLinkedServer_Create.json // this example is just showing the usage of "LinkedServer_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPatchScheduleCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPatchScheduleCollection.cs index 87d459f0f7905..b82c091e7f769 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPatchScheduleCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPatchScheduleCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_RedisPatchScheduleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RedisCachePatchSchedulesCreateOrUpdate() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCachePatchSchedulesCreateOrUpdate.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCachePatchSchedulesCreateOrUpdate.json // this example is just showing the usage of "PatchSchedules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_RedisCachePatchSchedulesCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_RedisCachePatchSchedulesGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCachePatchSchedulesGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCachePatchSchedulesGet.json // this example is just showing the usage of "PatchSchedules_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_RedisCachePatchSchedulesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RedisCachePatchSchedulesList() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCachePatchSchedulesList.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCachePatchSchedulesList.json // this example is just showing the usage of "PatchSchedules_ListByRedisResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task GetAll_RedisCachePatchSchedulesList() [Ignore("Only validating compilation of examples")] public async Task Exists_RedisCachePatchSchedulesGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCachePatchSchedulesGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCachePatchSchedulesGet.json // this example is just showing the usage of "PatchSchedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task Exists_RedisCachePatchSchedulesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RedisCachePatchSchedulesGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCachePatchSchedulesGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCachePatchSchedulesGet.json // this example is just showing the usage of "PatchSchedules_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/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPatchScheduleResource.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPatchScheduleResource.cs index 2e806a78eec31..aa403ba1940d8 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPatchScheduleResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPatchScheduleResource.cs @@ -21,7 +21,7 @@ public partial class Sample_RedisPatchScheduleResource [Ignore("Only validating compilation of examples")] public async Task Get_RedisCachePatchSchedulesGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCachePatchSchedulesGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCachePatchSchedulesGet.json // this example is just showing the usage of "PatchSchedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_RedisCachePatchSchedulesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RedisCachePatchSchedulesDelete() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCachePatchSchedulesDelete.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCachePatchSchedulesDelete.json // this example is just showing the usage of "PatchSchedules_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 @@ -79,7 +79,7 @@ public async Task Delete_RedisCachePatchSchedulesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RedisCachePatchSchedulesCreateOrUpdate() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCachePatchSchedulesCreateOrUpdate.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCachePatchSchedulesCreateOrUpdate.json // this example is just showing the usage of "PatchSchedules_CreateOrUpdate" 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/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPrivateEndpointConnectionCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPrivateEndpointConnectionCollection.cs index 3ff512e79e23b..684c599d1a01c 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPrivateEndpointConnectionCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RedisPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RedisCachePutPrivateEndpointConnection() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCachePutPrivateEndpointConnection.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCachePutPrivateEndpointConnection.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 @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_RedisCachePutPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Get_RedisCacheGetPrivateEndpointConnection() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheGetPrivateEndpointConnection.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheGetPrivateEndpointConnection.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 @@ -97,7 +97,7 @@ public async Task Get_RedisCacheGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_RedisCacheListPrivateEndpointConnection() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheListPrivateEndpointConnections.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheListPrivateEndpointConnections.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 @@ -133,7 +133,7 @@ public async Task GetAll_RedisCacheListPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Exists_RedisCacheGetPrivateEndpointConnection() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheGetPrivateEndpointConnection.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheGetPrivateEndpointConnection.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 @@ -163,7 +163,7 @@ public async Task Exists_RedisCacheGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RedisCacheGetPrivateEndpointConnection() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheGetPrivateEndpointConnection.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPrivateEndpointConnectionResource.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPrivateEndpointConnectionResource.cs index 0220526db1f16..fc202ebd38454 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPrivateEndpointConnectionResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RedisPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_RedisCacheGetPrivateEndpointConnection() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheGetPrivateEndpointConnection.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_RedisCacheGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_RedisCacheDeletePrivateEndpointConnection() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheDeletePrivateEndpointConnection.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheDeletePrivateEndpointConnection.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 @@ -78,7 +78,7 @@ public async Task Delete_RedisCacheDeletePrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Update_RedisCachePutPrivateEndpointConnection() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCachePutPrivateEndpointConnection.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCachePutPrivateEndpointConnection.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/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisResource.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisResource.cs index 46b10e68d6b31..92bfbfa04f462 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_RedisResource.cs @@ -21,7 +21,7 @@ public partial class Sample_RedisResource [Ignore("Only validating compilation of examples")] public async Task Get_RedisCacheGet() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheGet.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheGet.json // this example is just showing the usage of "Redis_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_RedisCacheGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RedisCacheDelete() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheDelete.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheDelete.json // this example is just showing the usage of "Redis_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 @@ -77,7 +77,7 @@ public async Task Delete_RedisCacheDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RedisCacheUpdate() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheUpdate.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheUpdate.json // this example is just showing the usage of "Redis_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 @@ -113,7 +113,7 @@ public async Task Update_RedisCacheUpdate() [Ignore("Only validating compilation of examples")] public async Task GetUpgradeNotifications_RedisCacheListUpgradeNotifications() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheListUpgradeNotifications.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheListUpgradeNotifications.json // this example is just showing the usage of "Redis_ListUpgradeNotifications" 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 @@ -143,7 +143,7 @@ public async Task GetUpgradeNotifications_RedisCacheListUpgradeNotifications() [Ignore("Only validating compilation of examples")] public async Task GetKeys_RedisCacheListKeys() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheListKeys.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheListKeys.json // this example is just showing the usage of "Redis_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 @@ -169,7 +169,7 @@ public async Task GetKeys_RedisCacheListKeys() [Ignore("Only validating compilation of examples")] public async Task RegenerateKey_RedisCacheRegenerateKey() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheRegenerateKey.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheRegenerateKey.json // this example is just showing the usage of "Redis_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 @@ -196,7 +196,7 @@ public async Task RegenerateKey_RedisCacheRegenerateKey() [Ignore("Only validating compilation of examples")] public async Task ForceReboot_RedisCacheForceReboot() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheForceReboot.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheForceReboot.json // this example is just showing the usage of "Redis_ForceReboot" 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 @@ -228,7 +228,7 @@ public async Task ForceReboot_RedisCacheForceReboot() [Ignore("Only validating compilation of examples")] public async Task ImportData_RedisCacheImport() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheImport.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheImport.json // this example is just showing the usage of "Redis_ImportData" 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 @@ -259,7 +259,7 @@ public async Task ImportData_RedisCacheImport() [Ignore("Only validating compilation of examples")] public async Task ExportData_RedisCacheExport() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheExport.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheExport.json // this example is just showing the usage of "Redis_ExportData" 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 @@ -290,7 +290,7 @@ public async Task ExportData_RedisCacheExport() [Ignore("Only validating compilation of examples")] public async Task FlushCache_RedisCacheFlush() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheFlush.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheFlush.json // this example is just showing the usage of "Redis_FlushCache" 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 @@ -317,7 +317,7 @@ public async Task FlushCache_RedisCacheFlush() [Ignore("Only validating compilation of examples")] public async Task GetPrivateLinkResourcesByRedisCache_StorageAccountListPrivateLinkResources() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheListPrivateLinkResources.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheListPrivateLinkResources.json // this example is just showing the usage of "PrivateLinkResources_ListByRedisCache" 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/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 160092cc27446..e950416c04fea 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task CheckRedisNameAvailability_RedisCacheCheckNameAvailability() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheCheckNameAvailability.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheCheckNameAvailability.json // this example is just showing the usage of "Redis_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 @@ -46,7 +46,7 @@ public async Task CheckRedisNameAvailability_RedisCacheCheckNameAvailability() [Ignore("Only validating compilation of examples")] public async Task GetAllRedis_RedisCacheList() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheList.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheList.json // this example is just showing the usage of "Redis_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,7 +77,7 @@ public async Task GetAllRedis_RedisCacheList() [Ignore("Only validating compilation of examples")] public async Task GetAsyncOperationStatus_RedisCacheAsyncOperationStatus() { - // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-03-01/examples/RedisCacheAsyncOperationStatus.json + // Generated from example definition: specification/redis/resource-manager/Microsoft.Cache/stable/2024-11-01/examples/RedisCacheAsyncOperationStatus.json // this example is just showing the usage of "AsyncOperationStatus_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/redis/Azure.ResourceManager.Redis/src/Azure.ResourceManager.Redis.csproj b/sdk/redis/Azure.ResourceManager.Redis/src/Azure.ResourceManager.Redis.csproj index 04fcea2d32ac0..272aadde6a7b4 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Azure.ResourceManager.Redis.csproj +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Azure.ResourceManager.Redis.csproj @@ -1,6 +1,6 @@ - 1.5.0-beta.1 + 1.5.0 1.4.0 Azure.ResourceManager.Redis diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/ArmRedisModelFactory.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/ArmRedisModelFactory.cs index c72b40465d465..6eee442a43e20 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/ArmRedisModelFactory.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/ArmRedisModelFactory.cs @@ -47,11 +47,12 @@ public static RedisUpgradeNotification RedisUpgradeNotification(string name = nu /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + /// Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported. /// The SKU of the Redis cache to deploy. /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. /// A new instance for mocking. - public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable zones = null, AzureLocation location = default, IDictionary tags = null, ManagedServiceIdentity identity = null, RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = null, int? replicasPerMaster = null, int? replicasPerPrimary = null, IDictionary tenantSettings = null, int? shardCount = null, RedisTlsVersion? minimumTlsVersion = null, RedisPublicNetworkAccess? publicNetworkAccess = null, UpdateChannel? updateChannel = null, bool? isAccessKeyAuthenticationDisabled = null, RedisSku sku = null, ResourceIdentifier subnetId = null, IPAddress staticIP = null) + public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable zones = null, AzureLocation location = default, IDictionary tags = null, ManagedServiceIdentity identity = null, RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = null, int? replicasPerMaster = null, int? replicasPerPrimary = null, IDictionary tenantSettings = null, int? shardCount = null, RedisTlsVersion? minimumTlsVersion = null, RedisPublicNetworkAccess? publicNetworkAccess = null, UpdateChannel? updateChannel = null, bool? isAccessKeyAuthenticationDisabled = null, ZonalAllocationPolicy? zonalAllocationPolicy = null, RedisSku sku = null, ResourceIdentifier subnetId = null, IPAddress staticIP = null) { zones ??= new List(); tags ??= new Dictionary(); @@ -73,6 +74,7 @@ public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable< publicNetworkAccess, updateChannel, isAccessKeyAuthenticationDisabled, + zonalAllocationPolicy, sku, subnetId, staticIP, @@ -148,6 +150,7 @@ public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBacku /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + /// Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported. /// The SKU of the Redis cache to deploy. /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. @@ -160,7 +163,7 @@ public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBacku /// List of the Redis instances associated with the cache. /// List of private endpoint connection associated with the specified redis cache. /// A new instance for mocking. - public static RedisData RedisData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable zones = null, ManagedServiceIdentity identity = null, RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = null, int? replicasPerMaster = null, int? replicasPerPrimary = null, IDictionary tenantSettings = null, int? shardCount = null, RedisTlsVersion? minimumTlsVersion = null, RedisPublicNetworkAccess? publicNetworkAccess = null, UpdateChannel? updateChannel = null, bool? isAccessKeyAuthenticationDisabled = null, RedisSku sku = null, ResourceIdentifier subnetId = null, IPAddress staticIP = null, RedisProvisioningState? provisioningState = null, string hostName = null, int? port = null, int? sslPort = null, RedisAccessKeys accessKeys = null, IEnumerable linkedServers = null, IEnumerable instances = null, IEnumerable privateEndpointConnections = null) + public static RedisData RedisData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable zones = null, ManagedServiceIdentity identity = null, RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = null, int? replicasPerMaster = null, int? replicasPerPrimary = null, IDictionary tenantSettings = null, int? shardCount = null, RedisTlsVersion? minimumTlsVersion = null, RedisPublicNetworkAccess? publicNetworkAccess = null, UpdateChannel? updateChannel = null, bool? isAccessKeyAuthenticationDisabled = null, ZonalAllocationPolicy? zonalAllocationPolicy = null, RedisSku sku = null, ResourceIdentifier subnetId = null, IPAddress staticIP = null, RedisProvisioningState? provisioningState = null, string hostName = null, int? port = null, int? sslPort = null, RedisAccessKeys accessKeys = null, IEnumerable linkedServers = null, IEnumerable instances = null, IEnumerable privateEndpointConnections = null) { tags ??= new Dictionary(); zones ??= new List(); @@ -189,6 +192,7 @@ public static RedisData RedisData(ResourceIdentifier id = null, string name = nu publicNetworkAccess, updateChannel, isAccessKeyAuthenticationDisabled, + zonalAllocationPolicy, sku, subnetId, staticIP, @@ -468,6 +472,70 @@ public static RedisCacheAccessPolicyAssignmentData RedisCacheAccessPolicyAssignm serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// A list of availability zones denoting where the resource needs to come from. + /// The geo-location where the resource lives. + /// Resource tags. + /// The identity of the resource. + /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. + /// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. + /// Specifies whether the non-ssl Redis server port (6379) is enabled. + /// The number of replicas to be created per primary. + /// The number of replicas to be created per primary. + /// A dictionary of tenant settings. + /// The number of shards to be created on a Premium Cluster Cache. + /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). + /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + /// The SKU of the Redis cache to deploy. + /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. + /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable zones, AzureLocation location, IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP) + { + return RedisCreateOrUpdateContent(zones: zones, location: location, tags: tags, identity: identity, redisConfiguration: redisConfiguration, redisVersion: redisVersion, enableNonSslPort: enableNonSslPort, replicasPerMaster: replicasPerMaster, replicasPerPrimary: replicasPerPrimary, tenantSettings: tenantSettings, shardCount: shardCount, minimumTlsVersion: minimumTlsVersion, publicNetworkAccess: publicNetworkAccess, updateChannel: updateChannel, isAccessKeyAuthenticationDisabled: isAccessKeyAuthenticationDisabled, zonalAllocationPolicy: default, sku: sku, subnetId: subnetId, staticIP: staticIP); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// A list of availability zones denoting where the resource needs to come from. + /// The identity of the resource. + /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. + /// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. + /// Specifies whether the non-ssl Redis server port (6379) is enabled. + /// The number of replicas to be created per primary. + /// The number of replicas to be created per primary. + /// A dictionary of tenant settings. + /// The number of shards to be created on a Premium Cluster Cache. + /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). + /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + /// The SKU of the Redis cache to deploy. + /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. + /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. + /// Redis instance provisioning status. + /// Redis host name. + /// Redis non-SSL port. + /// Redis SSL port. + /// The keys of the Redis cache - not set if this object is not the response to Create or Update redis cache. + /// List of the linked servers associated with the cache. + /// List of the Redis instances associated with the cache. + /// List of private endpoint connection associated with the specified redis cache. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RedisData RedisData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IEnumerable zones, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, RedisAccessKeys accessKeys, IEnumerable linkedServers, IEnumerable instances, IEnumerable privateEndpointConnections) + { + return RedisData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, zones: zones, identity: identity, redisConfiguration: redisConfiguration, redisVersion: redisVersion, enableNonSslPort: enableNonSslPort, replicasPerMaster: replicasPerMaster, replicasPerPrimary: replicasPerPrimary, tenantSettings: tenantSettings, shardCount: shardCount, minimumTlsVersion: minimumTlsVersion, publicNetworkAccess: publicNetworkAccess, updateChannel: updateChannel, isAccessKeyAuthenticationDisabled: isAccessKeyAuthenticationDisabled, zonalAllocationPolicy: default, sku: sku, subnetId: subnetId, staticIP: staticIP, provisioningState: provisioningState, hostName: hostName, port: port, sslPort: sslPort, accessKeys: accessKeys, linkedServers: linkedServers, instances: instances, privateEndpointConnections: privateEndpointConnections); + } + /// Initializes a new instance of . /// A list of availability zones denoting where the resource needs to come from. /// The geo-location where the resource lives. @@ -490,7 +558,7 @@ public static RedisCacheAccessPolicyAssignmentData RedisCacheAccessPolicyAssignm [EditorBrowsable(EditorBrowsableState.Never)] public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable zones, AzureLocation location, IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP) { - return RedisCreateOrUpdateContent(zones: zones, location: location, tags: tags, identity: identity, redisConfiguration: redisConfiguration, redisVersion: redisVersion, enableNonSslPort: enableNonSslPort, replicasPerMaster: replicasPerMaster, replicasPerPrimary: replicasPerPrimary, tenantSettings: tenantSettings, shardCount: shardCount, minimumTlsVersion: minimumTlsVersion, publicNetworkAccess: publicNetworkAccess, updateChannel: updateChannel, isAccessKeyAuthenticationDisabled: default, sku: sku, subnetId: subnetId, staticIP: staticIP); + return RedisCreateOrUpdateContent(zones: zones, location: location, tags: tags, identity: identity, redisConfiguration: redisConfiguration, redisVersion: redisVersion, enableNonSslPort: enableNonSslPort, replicasPerMaster: replicasPerMaster, replicasPerPrimary: replicasPerPrimary, tenantSettings: tenantSettings, shardCount: shardCount, minimumTlsVersion: minimumTlsVersion, publicNetworkAccess: publicNetworkAccess, updateChannel: updateChannel, isAccessKeyAuthenticationDisabled: default, zonalAllocationPolicy: default, sku: sku, subnetId: subnetId, staticIP: staticIP); } /// Initializes a new instance of . @@ -554,7 +622,7 @@ public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBacku [EditorBrowsable(EditorBrowsableState.Never)] public static RedisData RedisData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IEnumerable zones, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, RedisAccessKeys accessKeys, IEnumerable linkedServers, IEnumerable instances, IEnumerable privateEndpointConnections) { - return RedisData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, zones: zones, identity: identity, redisConfiguration: redisConfiguration, redisVersion: redisVersion, enableNonSslPort: enableNonSslPort, replicasPerMaster: replicasPerMaster, replicasPerPrimary: replicasPerPrimary, tenantSettings: tenantSettings, shardCount: shardCount, minimumTlsVersion: minimumTlsVersion, publicNetworkAccess: publicNetworkAccess, updateChannel: updateChannel, isAccessKeyAuthenticationDisabled: default, sku: sku, subnetId: subnetId, staticIP: staticIP, provisioningState: provisioningState, hostName: hostName, port: port, sslPort: sslPort, accessKeys: accessKeys, linkedServers: linkedServers, instances: instances, privateEndpointConnections: privateEndpointConnections); + return RedisData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, zones: zones, identity: identity, redisConfiguration: redisConfiguration, redisVersion: redisVersion, enableNonSslPort: enableNonSslPort, replicasPerMaster: replicasPerMaster, replicasPerPrimary: replicasPerPrimary, tenantSettings: tenantSettings, shardCount: shardCount, minimumTlsVersion: minimumTlsVersion, publicNetworkAccess: publicNetworkAccess, updateChannel: updateChannel, isAccessKeyAuthenticationDisabled: default, zonalAllocationPolicy: default, sku: sku, subnetId: subnetId, staticIP: staticIP, provisioningState: provisioningState, hostName: hostName, port: port, sslPort: sslPort, accessKeys: accessKeys, linkedServers: linkedServers, instances: instances, privateEndpointConnections: privateEndpointConnections); } } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisResourceGroupResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisResourceGroupResource.cs index 94c881d1ef869..9e73be9b6305c 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisResourceGroupResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual RedisCollection GetAllRedis() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetRedisAsync(string name, Ca /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisSubscriptionResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisSubscriptionResource.cs index f940dd0bd9f35..a341e54aaa08b 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisSubscriptionResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisSubscriptionResource.cs @@ -59,7 +59,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -101,7 +101,7 @@ public virtual async Task CheckRedisNameAvailabilityAsync(RedisNameAva /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual Response CheckRedisNameAvailability(RedisNameAvailabilityContent /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -173,7 +173,7 @@ public virtual AsyncPageable GetAllRedisAsync(CancellationToken c /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -203,7 +203,7 @@ public virtual Pageable GetAllRedis(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// @@ -243,7 +243,7 @@ public virtual async Task> GetAsyncOperationStatu /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/RedisExtensions.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/RedisExtensions.cs index 71e6edf9a5b88..c15adfc30d891 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/RedisExtensions.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/RedisExtensions.cs @@ -196,7 +196,7 @@ public static RedisCollection GetAllRedis(this ResourceGroupResource resourceGro /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -234,7 +234,7 @@ public static async Task> GetRedisAsync(this ResourceGro /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -272,7 +272,7 @@ public static Response GetRedis(this ResourceGroupResource resour /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -308,7 +308,7 @@ public static async Task CheckRedisNameAvailabilityAsync(this Subscrip /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -344,7 +344,7 @@ public static Response CheckRedisNameAvailability(this SubscriptionResource subs /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -380,7 +380,7 @@ public static AsyncPageable GetAllRedisAsync(this SubscriptionRes /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -416,7 +416,7 @@ public static Pageable GetAllRedis(this SubscriptionResource subs /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// @@ -450,7 +450,7 @@ public static async Task> GetAsyncOperationStatus /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.Serialization.cs index bfc66dca18480..dea8bc74684f7 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.Serialization.cs @@ -127,6 +127,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("disableAccessKeyAuthentication"u8); writer.WriteBooleanValue(IsAccessKeyAuthenticationDisabled.Value); } + if (Optional.IsDefined(ZonalAllocationPolicy)) + { + writer.WritePropertyName("zonalAllocationPolicy"u8); + writer.WriteStringValue(ZonalAllocationPolicy.Value.ToString()); + } writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); if (Optional.IsDefined(SubnetId)) @@ -192,6 +197,7 @@ internal static RedisCreateOrUpdateContent DeserializeRedisCreateOrUpdateContent RedisPublicNetworkAccess? publicNetworkAccess = default; UpdateChannel? updateChannel = default; bool? disableAccessKeyAuthentication = default; + ZonalAllocationPolicy? zonalAllocationPolicy = default; RedisSku sku = default; ResourceIdentifier subnetId = default; IPAddress staticIP = default; @@ -350,6 +356,15 @@ internal static RedisCreateOrUpdateContent DeserializeRedisCreateOrUpdateContent disableAccessKeyAuthentication = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("zonalAllocationPolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zonalAllocationPolicy = new ZonalAllocationPolicy(property0.Value.GetString()); + continue; + } if (property0.NameEquals("sku"u8)) { sku = RedisSku.DeserializeRedisSku(property0.Value, options); @@ -398,6 +413,7 @@ internal static RedisCreateOrUpdateContent DeserializeRedisCreateOrUpdateContent publicNetworkAccess, updateChannel, disableAccessKeyAuthentication, + zonalAllocationPolicy, sku, subnetId, staticIP, diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.cs index c57665f72e3e5..aaa0dc7901542 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.cs @@ -79,11 +79,12 @@ public RedisCreateOrUpdateContent(AzureLocation location, RedisSku sku) /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + /// Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported. /// The SKU of the Redis cache to deploy. /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. /// Keeps track of any properties unknown to the library. - internal RedisCreateOrUpdateContent(IList zones, AzureLocation location, IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, IDictionary serializedAdditionalRawData) + internal RedisCreateOrUpdateContent(IList zones, AzureLocation location, IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, ZonalAllocationPolicy? zonalAllocationPolicy, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, IDictionary serializedAdditionalRawData) { Zones = zones; Location = location; @@ -100,6 +101,7 @@ internal RedisCreateOrUpdateContent(IList zones, AzureLocation location, PublicNetworkAccess = publicNetworkAccess; UpdateChannel = updateChannel; IsAccessKeyAuthenticationDisabled = isAccessKeyAuthenticationDisabled; + ZonalAllocationPolicy = zonalAllocationPolicy; Sku = sku; SubnetId = subnetId; StaticIP = staticIP; @@ -156,6 +158,9 @@ internal RedisCreateOrUpdateContent() /// Authentication to Redis through access keys is disabled when set as true. Default value is false. [WirePath("properties.disableAccessKeyAuthentication")] public bool? IsAccessKeyAuthenticationDisabled { get; set; } + /// Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported. + [WirePath("properties.zonalAllocationPolicy")] + public ZonalAllocationPolicy? ZonalAllocationPolicy { get; set; } /// The SKU of the Redis cache to deploy. [WirePath("properties.sku")] public RedisSku Sku { get; } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.Serialization.cs index f6ba2b2c3c00c..f384ed2c2b653 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.Serialization.cs @@ -114,6 +114,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("disableAccessKeyAuthentication"u8); writer.WriteBooleanValue(IsAccessKeyAuthenticationDisabled.Value); } + if (Optional.IsDefined(ZonalAllocationPolicy)) + { + writer.WritePropertyName("zonalAllocationPolicy"u8); + writer.WriteStringValue(ZonalAllocationPolicy.Value.ToString()); + } if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -170,6 +175,7 @@ internal static RedisPatch DeserializeRedisPatch(JsonElement element, ModelReade RedisPublicNetworkAccess? publicNetworkAccess = default; UpdateChannel? updateChannel = default; bool? disableAccessKeyAuthentication = default; + ZonalAllocationPolicy? zonalAllocationPolicy = default; RedisSku sku = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -307,6 +313,15 @@ internal static RedisPatch DeserializeRedisPatch(JsonElement element, ModelReade disableAccessKeyAuthentication = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("zonalAllocationPolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zonalAllocationPolicy = new ZonalAllocationPolicy(property0.Value.GetString()); + continue; + } if (property0.NameEquals("sku"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -339,6 +354,7 @@ internal static RedisPatch DeserializeRedisPatch(JsonElement element, ModelReade publicNetworkAccess, updateChannel, disableAccessKeyAuthentication, + zonalAllocationPolicy, sku, serializedAdditionalRawData); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.cs index 88e08b747e0c8..424516d4834dd 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.cs @@ -67,9 +67,10 @@ public RedisPatch() /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + /// Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported. /// The SKU of the Redis cache to deploy. /// Keeps track of any properties unknown to the library. - internal RedisPatch(IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, RedisSku sku, IDictionary serializedAdditionalRawData) + internal RedisPatch(IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, ZonalAllocationPolicy? zonalAllocationPolicy, RedisSku sku, IDictionary serializedAdditionalRawData) { Tags = tags; Identity = identity; @@ -84,6 +85,7 @@ internal RedisPatch(IDictionary tags, ManagedServiceIdentity ide PublicNetworkAccess = publicNetworkAccess; UpdateChannel = updateChannel; IsAccessKeyAuthenticationDisabled = isAccessKeyAuthenticationDisabled; + ZonalAllocationPolicy = zonalAllocationPolicy; Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -127,6 +129,9 @@ internal RedisPatch(IDictionary tags, ManagedServiceIdentity ide /// Authentication to Redis through access keys is disabled when set as true. Default value is false. [WirePath("properties.disableAccessKeyAuthentication")] public bool? IsAccessKeyAuthenticationDisabled { get; set; } + /// Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported. + [WirePath("properties.zonalAllocationPolicy")] + public ZonalAllocationPolicy? ZonalAllocationPolicy { get; set; } /// The SKU of the Redis cache to deploy. [WirePath("properties.sku")] public RedisSku Sku { get; set; } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/ZonalAllocationPolicy.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/ZonalAllocationPolicy.cs new file mode 100644 index 0000000000000..a2a99e3ba8d1c --- /dev/null +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/ZonalAllocationPolicy.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Redis.Models +{ + /// Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported. + public readonly partial struct ZonalAllocationPolicy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ZonalAllocationPolicy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutomaticValue = "Automatic"; + private const string UserDefinedValue = "UserDefined"; + private const string NoZonesValue = "NoZones"; + + /// Automatic. + public static ZonalAllocationPolicy Automatic { get; } = new ZonalAllocationPolicy(AutomaticValue); + /// UserDefined. + public static ZonalAllocationPolicy UserDefined { get; } = new ZonalAllocationPolicy(UserDefinedValue); + /// NoZones. + public static ZonalAllocationPolicy NoZones { get; } = new ZonalAllocationPolicy(NoZonesValue); + /// Determines if two values are the same. + public static bool operator ==(ZonalAllocationPolicy left, ZonalAllocationPolicy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ZonalAllocationPolicy left, ZonalAllocationPolicy right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ZonalAllocationPolicy(string value) => new ZonalAllocationPolicy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ZonalAllocationPolicy other && Equals(other); + /// + public bool Equals(ZonalAllocationPolicy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentCollection.cs index 2140cf2f28bb6..c0029f2408d93 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string acc /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string accessPolicyAssignm /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string accessPolicyAssignmentName, Cancella /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentResource.cs index fd5475a7570d7..65814a450349d 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyCollection.cs index 84be67cbe674a..e5aefb8c5c0b1 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string accessPolicyN /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string accessPolicyName, C /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string accessPolicyName, CancellationToken /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyResource.cs index cc42b3bf72160..a06f2cbd8a82c 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCollection.cs index a3b2a8c44ff48..51dd810f0e6d8 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsync(WaitU /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, s /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string name, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string name, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExistsAsync(stri /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.Serialization.cs index bcdafcfab61cf..4e92425bdbb64 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.Serialization.cs @@ -119,6 +119,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("disableAccessKeyAuthentication"u8); writer.WriteBooleanValue(IsAccessKeyAuthenticationDisabled.Value); } + if (Optional.IsDefined(ZonalAllocationPolicy)) + { + writer.WritePropertyName("zonalAllocationPolicy"u8); + writer.WriteStringValue(ZonalAllocationPolicy.Value.ToString()); + } writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); if (Optional.IsDefined(SubnetId)) @@ -235,6 +240,7 @@ internal static RedisData DeserializeRedisData(JsonElement element, ModelReaderW RedisPublicNetworkAccess? publicNetworkAccess = default; UpdateChannel? updateChannel = default; bool? disableAccessKeyAuthentication = default; + ZonalAllocationPolicy? zonalAllocationPolicy = default; RedisSku sku = default; ResourceIdentifier subnetId = default; IPAddress staticIP = default; @@ -425,6 +431,15 @@ internal static RedisData DeserializeRedisData(JsonElement element, ModelReaderW disableAccessKeyAuthentication = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("zonalAllocationPolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zonalAllocationPolicy = new ZonalAllocationPolicy(property0.Value.GetString()); + continue; + } if (property0.NameEquals("sku"u8)) { sku = RedisSku.DeserializeRedisSku(property0.Value, options); @@ -561,6 +576,7 @@ internal static RedisData DeserializeRedisData(JsonElement element, ModelReaderW publicNetworkAccess, updateChannel, disableAccessKeyAuthentication, + zonalAllocationPolicy, sku, subnetId, staticIP, @@ -938,6 +954,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ZonalAllocationPolicy), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zonalAllocationPolicy: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ZonalAllocationPolicy)) + { + builder.Append(" zonalAllocationPolicy: "); + builder.AppendLine($"'{ZonalAllocationPolicy.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sku), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.cs index bc879c24f3309..74b4b3b58549b 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.cs @@ -89,6 +89,7 @@ public RedisData(AzureLocation location, RedisSku sku) : base(location) /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + /// Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported. /// The SKU of the Redis cache to deploy. /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. @@ -101,7 +102,7 @@ public RedisData(AzureLocation location, RedisSku sku) : base(location) /// List of the Redis instances associated with the cache. /// List of private endpoint connection associated with the specified redis cache. /// Keeps track of any properties unknown to the library. - internal RedisData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IList zones, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, RedisAccessKeys accessKeys, IReadOnlyList linkedServers, IReadOnlyList instances, IReadOnlyList privateEndpointConnections, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal RedisData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IList zones, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, ZonalAllocationPolicy? zonalAllocationPolicy, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, RedisAccessKeys accessKeys, IReadOnlyList linkedServers, IReadOnlyList instances, IReadOnlyList privateEndpointConnections, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Zones = zones; Identity = identity; @@ -116,6 +117,7 @@ internal RedisData(ResourceIdentifier id, string name, ResourceType resourceType PublicNetworkAccess = publicNetworkAccess; UpdateChannel = updateChannel; IsAccessKeyAuthenticationDisabled = isAccessKeyAuthenticationDisabled; + ZonalAllocationPolicy = zonalAllocationPolicy; Sku = sku; SubnetId = subnetId; StaticIP = staticIP; @@ -174,6 +176,9 @@ internal RedisData() /// Authentication to Redis through access keys is disabled when set as true. Default value is false. [WirePath("properties.disableAccessKeyAuthentication")] public bool? IsAccessKeyAuthenticationDisabled { get; set; } + /// Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported. + [WirePath("properties.zonalAllocationPolicy")] + public ZonalAllocationPolicy? ZonalAllocationPolicy { get; set; } /// The SKU of the Redis cache to deploy. [WirePath("properties.sku")] public RedisSku Sku { get; set; } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleCollection.cs index 81af3b1faad38..ab6f683d98d6d 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string r /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string ruleName, Cancella /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string ruleName, Cancellat /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string ruleName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleResource.cs index 00cffefdd6874..3c291441b2068 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyCollection.cs index 6f5d1829f38f0..f0c8bacba0466 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string linked /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string linkedServerName, C /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string linkedServerName, CancellationToken /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyResource.cs index 9ef97cfbd3afd..d50c219eb3c2d 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleCollection.cs index 627048b6d8322..8ea3cc3d129f3 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> GetAsync(RedisPa /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(RedisPatchScheduleDefaul /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(RedisPatchScheduleDefaultN /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(RedisPatchScheduleDefaultName defaultName, /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleResource.cs index eb05be81d6429..671ba1039eb2a 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionCollection.cs index 41d1e09142acd..0d5e18e56631f 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string priva /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -441,7 +441,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionResource.cs index b9c8f2aba046a..d430aeda86db8 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisResource.cs index 46434414da26f..272d460ece5d9 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisResource.cs @@ -116,7 +116,7 @@ public virtual RedisFirewallRuleCollection GetRedisFirewallRules() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetRedisFirewallR /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual RedisPatchScheduleCollection GetRedisPatchSchedules() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetRedisPatchSch /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual RedisLinkedServerWithPropertyCollection GetRedisLinkedServerWithP /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetRe /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual RedisPrivateEndpointConnectionCollection GetRedisPrivateEndpointC /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> GetR /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -388,7 +388,7 @@ public virtual RedisCacheAccessPolicyCollection GetRedisCacheAccessPolicies() /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -419,7 +419,7 @@ public virtual async Task> GetRedisCach /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual RedisCacheAccessPolicyAssignmentCollection GetRedisCacheAccessPol /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -488,7 +488,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -519,7 +519,7 @@ public virtual Response GetRedisCacheA /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -559,7 +559,7 @@ public virtual async Task> GetAsync(CancellationToken ca /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -599,7 +599,7 @@ public virtual Response Get(CancellationToken cancellationToken = /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -641,7 +641,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -683,7 +683,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -729,7 +729,7 @@ public virtual async Task> UpdateAsync(WaitUntil wai /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -775,7 +775,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, RedisPatc /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -806,7 +806,7 @@ public virtual AsyncPageable GetUpgradeNotificationsAs /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -837,7 +837,7 @@ public virtual Pageable GetUpgradeNotifications(double /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -875,7 +875,7 @@ public virtual async Task> GetKeysAsync(CancellationTo /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -913,7 +913,7 @@ public virtual Response GetKeys(CancellationToken cancellationT /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -955,7 +955,7 @@ public virtual async Task> RegenerateKeyAsync(RedisReg /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -997,7 +997,7 @@ public virtual Response RegenerateKey(RedisRegenerateKeyContent /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -1039,7 +1039,7 @@ public virtual async Task> ForceRebootAsync(Red /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -1081,7 +1081,7 @@ public virtual Response ForceReboot(RedisRebootContent c /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -1127,7 +1127,7 @@ public virtual async Task ImportDataAsync(WaitUntil waitUntil, Imp /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -1173,7 +1173,7 @@ public virtual ArmOperation ImportData(WaitUntil waitUntil, ImportRdbContent con /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -1219,7 +1219,7 @@ public virtual async Task ExportDataAsync(WaitUntil waitUntil, Exp /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -1265,7 +1265,7 @@ public virtual ArmOperation ExportData(WaitUntil waitUntil, ExportRdbContent con /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -1307,7 +1307,7 @@ public virtual async Task> FlushCacheAsync(W /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -1349,7 +1349,7 @@ public virtual ArmOperation FlushCache(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// @@ -1374,7 +1374,7 @@ public virtual AsyncPageable GetPrivateLinkResourcesBy /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// @@ -1399,7 +1399,7 @@ public virtual Pageable GetPrivateLinkResourcesByRedis /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -1461,7 +1461,7 @@ public virtual async Task> AddTagAsync(string key, strin /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -1523,7 +1523,7 @@ public virtual Response AddTag(string key, string value, Cancella /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -1580,7 +1580,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -1637,7 +1637,7 @@ public virtual Response SetTags(IDictionary tags, /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource @@ -1697,7 +1697,7 @@ public virtual async Task> RemoveTagAsync(string key, Ca /// /// /// Default Api Version - /// 2024-03-01 + /// 2024-11-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyAssignmentRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyAssignmentRestOperations.cs index d40fc992fe619..82f3da828fded 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyAssignmentRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyAssignmentRestOperations.cs @@ -32,7 +32,7 @@ public AccessPolicyAssignmentRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyRestOperations.cs index be99b6b63053d..5ac37aa1ddcf9 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyRestOperations.cs @@ -32,7 +32,7 @@ public AccessPolicyRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AsyncOperationStatusRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AsyncOperationStatusRestOperations.cs index b0c4061afdcdc..745f1bacaf206 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AsyncOperationStatusRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AsyncOperationStatusRestOperations.cs @@ -32,7 +32,7 @@ public AsyncOperationStatusRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/FirewallRulesRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/FirewallRulesRestOperations.cs index 95ea57be94bde..c93a776fffc8f 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/FirewallRulesRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/FirewallRulesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallRulesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/LinkedServerRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/LinkedServerRestOperations.cs index b17d570b05430..96dd28a91d19d 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/LinkedServerRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/LinkedServerRestOperations.cs @@ -32,7 +32,7 @@ public LinkedServerRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PatchSchedulesRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PatchSchedulesRestOperations.cs index ea1d944187db6..5e85fe8ae7f80 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PatchSchedulesRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PatchSchedulesRestOperations.cs @@ -32,7 +32,7 @@ public PatchSchedulesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 907974e3c07d7..33e5a04bcfc3b 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 1952dfbeef8d4..ab45f8b4958ff 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/RedisRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/RedisRestOperations.cs index edd3b0c8dd4a2..62b9ce63e3c8e 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/RedisRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/RedisRestOperations.cs @@ -32,7 +32,7 @@ public RedisRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-01"; + _apiVersion = apiVersion ?? "2024-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/autorest.md b/sdk/redis/Azure.ResourceManager.Redis/src/autorest.md index d3e0752de0f8b..5e75dd68d0baf 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/autorest.md +++ b/sdk/redis/Azure.ResourceManager.Redis/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: Redis namespace: Azure.ResourceManager.Redis -require: https://github.com/Azure/azure-rest-api-specs/blob/3cb1b51638616435470fc10ea00de92512186ece/specification/redis/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/9069559e0fe5ed52b884ddc658fa539ec67c7ef8/specification/redis/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -20,7 +20,6 @@ modelerfour: lenient-model-deduplication: true use-model-reader-writer: true enable-bicep-serialization: true -tag: package-2024-03 rename-mapping: CheckNameAvailabilityParameters: RedisNameAvailabilityContent diff --git a/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/FirewallFunctionalTests.cs b/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/FirewallFunctionalTests.cs index 7daf04d14e48b..12084e598c93e 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/FirewallFunctionalTests.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/FirewallFunctionalTests.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using System.Net; using System.Threading.Tasks; using Azure.Core.TestFramework; @@ -71,8 +72,10 @@ public async Task CreateUpdateDeleteTest() // Delete await ruleTwo.DeleteAsync(WaitUntil.Completed); + rules = await firewallCollection.GetAllAsync().ToEnumerableAsync(); + Assert.AreEqual(1, rules.Count); var falseResult = (await firewallCollection.ExistsAsync("RuleTwo")).Value; - Assert.IsTrue(falseResult); + Assert.IsFalse(falseResult); } } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/ZonalAllocationPolicyFunctionalTests.cs b/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/ZonalAllocationPolicyFunctionalTests.cs new file mode 100644 index 0000000000000..7fdfbb3d42267 --- /dev/null +++ b/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/ZonalAllocationPolicyFunctionalTests.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.ResourceManager.Redis.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Redis.Tests +{ + public class ZonalAllocationPolicyFunctionalTests : RedisManagementTestBase + { + public ZonalAllocationPolicyFunctionalTests(bool isAsync) + : base(isAsync) // RecordedTestMode.Record) + { + } + + private ResourceGroupResource ResourceGroup { get; set; } + + private RedisCollection Collection { get; set; } + + private async Task SetCollectionsAsync() + { + ResourceGroup = await CreateResourceGroupAsync(); + Collection = ResourceGroup.GetAllRedis(); + } + + [Test] + public async Task AutomaticZonalAllocationStandardCacheCreationTest() + { + await SetCollectionsAsync(); + + var redisCacheName = Recording.GenerateAssetName("RedisZonalAllocationPolicy"); + var parameter = new RedisCreateOrUpdateContent(DefaultLocation, new RedisSku(RedisSkuName.Standard, RedisSkuFamily.BasicOrStandard, 0)) + { + ZonalAllocationPolicy = ZonalAllocationPolicy.Automatic + }; + + var responseCreate = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisCacheName, parameter)).Value; + + Assert.AreEqual(DefaultLocation, responseCreate.Data.Location); + Assert.AreEqual(redisCacheName, responseCreate.Data.Name); + Assert.AreEqual(RedisSkuName.Standard, responseCreate.Data.Sku.Name); + Assert.AreEqual(RedisSkuFamily.BasicOrStandard, responseCreate.Data.Sku.Family); + Assert.AreEqual(0, responseCreate.Data.Sku.Capacity); + Assert.AreEqual(ZonalAllocationPolicy.Automatic, responseCreate.Data.ZonalAllocationPolicy); + Assert.IsEmpty(responseCreate.Data.Zones); + + await responseCreate.DeleteAsync(WaitUntil.Completed); + var falseResult = (await Collection.ExistsAsync(redisCacheName)).Value; + Assert.IsFalse(falseResult); + } + + [Test] + public async Task AutomaticZonalAllocationPremiumCacheCreationTest() + { + await SetCollectionsAsync(); + + var redisCacheName = Recording.GenerateAssetName("RedisZonalAllocationPolicy"); + var parameter = new RedisCreateOrUpdateContent(DefaultLocation, new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) + { + ZonalAllocationPolicy = ZonalAllocationPolicy.Automatic + }; + + var responseCreate = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisCacheName, parameter)).Value; + + Assert.AreEqual(DefaultLocation, responseCreate.Data.Location); + Assert.AreEqual(redisCacheName, responseCreate.Data.Name); + Assert.AreEqual(RedisSkuName.Premium, responseCreate.Data.Sku.Name); + Assert.AreEqual(RedisSkuFamily.Premium, responseCreate.Data.Sku.Family); + Assert.AreEqual(1, responseCreate.Data.Sku.Capacity); + Assert.AreEqual(ZonalAllocationPolicy.Automatic, responseCreate.Data.ZonalAllocationPolicy); + Assert.IsEmpty(responseCreate.Data.Zones); + + await responseCreate.DeleteAsync(WaitUntil.Completed); + var falseResult = (await Collection.ExistsAsync(redisCacheName)).Value; + Assert.IsFalse(falseResult); + } + + [Test] + public async Task NoZonesZonalAllocationPremiumCacheCreationTest() + { + await SetCollectionsAsync(); + + var redisCacheName = Recording.GenerateAssetName("RedisZonalAllocationPolicy"); + var parameter = new RedisCreateOrUpdateContent(DefaultLocation, new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) + { + ZonalAllocationPolicy = ZonalAllocationPolicy.NoZones + }; + + var responseCreate = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisCacheName, parameter)).Value; + + Assert.AreEqual(DefaultLocation, responseCreate.Data.Location); + Assert.AreEqual(redisCacheName, responseCreate.Data.Name); + Assert.AreEqual(RedisSkuName.Premium, responseCreate.Data.Sku.Name); + Assert.AreEqual(RedisSkuFamily.Premium, responseCreate.Data.Sku.Family); + Assert.AreEqual(1, responseCreate.Data.Sku.Capacity); + Assert.AreEqual(ZonalAllocationPolicy.NoZones, responseCreate.Data.ZonalAllocationPolicy); + Assert.IsEmpty(responseCreate.Data.Zones); + + await responseCreate.DeleteAsync(WaitUntil.Completed); + var falseResult = (await Collection.ExistsAsync(redisCacheName)).Value; + Assert.IsFalse(falseResult); + } + + [Test] + public async Task UserDefinedZonalAllocationPremiumCacheCreationTest() + { + await SetCollectionsAsync(); + + var redisCacheName = Recording.GenerateAssetName("RedisZonalAllocationPolicy"); + var parameter = new RedisCreateOrUpdateContent(DefaultLocation, new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) + { + Zones = { "1", "2" }, + ZonalAllocationPolicy = ZonalAllocationPolicy.UserDefined + }; + + var responseCreate = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisCacheName, parameter)).Value; + + Assert.AreEqual(DefaultLocation, responseCreate.Data.Location); + Assert.AreEqual(redisCacheName, responseCreate.Data.Name); + Assert.AreEqual(RedisSkuName.Premium, responseCreate.Data.Sku.Name); + Assert.AreEqual(RedisSkuFamily.Premium, responseCreate.Data.Sku.Family); + Assert.AreEqual(1, responseCreate.Data.Sku.Capacity); + Assert.AreEqual(ZonalAllocationPolicy.UserDefined, responseCreate.Data.ZonalAllocationPolicy); + Assert.AreEqual(new List { "1", "2" }, responseCreate.Data.Zones); + + await responseCreate.DeleteAsync(WaitUntil.Completed); + var falseResult = (await Collection.ExistsAsync(redisCacheName)).Value; + Assert.IsFalse(falseResult); + } + + [Test] + public async Task UpdateToAutomaticZonalAllocationPolicyTest() + { + await SetCollectionsAsync(); + + var redisCacheName = Recording.GenerateAssetName("RedisZonalAllocationPolicy"); + var parameter = new RedisCreateOrUpdateContent(DefaultLocation, new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) + { + ZonalAllocationPolicy = ZonalAllocationPolicy.NoZones + }; + + var responseCreate = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisCacheName, parameter)).Value; + + Assert.AreEqual(DefaultLocation, responseCreate.Data.Location); + Assert.AreEqual(redisCacheName, responseCreate.Data.Name); + Assert.AreEqual(RedisSkuName.Premium, responseCreate.Data.Sku.Name); + Assert.AreEqual(RedisSkuFamily.Premium, responseCreate.Data.Sku.Family); + Assert.AreEqual(1, responseCreate.Data.Sku.Capacity); + Assert.AreEqual(ZonalAllocationPolicy.NoZones, responseCreate.Data.ZonalAllocationPolicy); + Assert.IsEmpty(responseCreate.Data.Zones); + + var patch = new RedisPatch() + { + ZonalAllocationPolicy = ZonalAllocationPolicy.Automatic + }; + + var responseUpdate = (await responseCreate.UpdateAsync(WaitUntil.Completed, patch)).Value; + var response = (await ResourceGroup.GetAllRedis().GetAsync(redisCacheName)).Value; + Assert.AreEqual(ZonalAllocationPolicy.Automatic, response.Data.ZonalAllocationPolicy); + + await responseUpdate.DeleteAsync(WaitUntil.Completed); + var falseResult = (await Collection.ExistsAsync(redisCacheName)).Value; + Assert.IsFalse(falseResult); + } + } +}