Skip to content

Commit e6de049

Browse files
authored
Azure Redis New Api v2023.04.01 (#21931)
* Azure Redis Api v2023-04-01 * PS Commands and their respective markdowns updated. * Remove whitespaces. * Remove whitespaces diffs part 2 * Fixed Tests. * Unnecessary whitespace removed. * Removed commitid from readme * Extra whitespace removed. * Fixed failing tests. * Mark MI tests live only
1 parent 249b718 commit e6de049

24 files changed

+7385
-15249
lines changed

src/RedisCache/RedisCache.Management.Sdk/Generated/Models/ExportRDBParameters.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,15 @@ public ExportRDBParameters()
3636
/// <param name="preferredDataArchiveAuthMethod">Preferred auth method
3737
/// to communicate to storage account used for data archive, specify
3838
/// SAS or ManagedIdentity, default value is SAS</param>
39-
public ExportRDBParameters(string prefix, string container, string format = default(string), string preferredDataArchiveAuthMethod = default(string))
39+
/// <param name="storageSubscriptionId">Subscription id of the storage
40+
/// container for data to be exported using ManagedIdentity.</param>
41+
public ExportRDBParameters(string prefix, string container, string format = default(string), string preferredDataArchiveAuthMethod = default(string), string storageSubscriptionId = default(string))
4042
{
4143
Format = format;
4244
Prefix = prefix;
4345
Container = container;
4446
PreferredDataArchiveAuthMethod = preferredDataArchiveAuthMethod;
47+
StorageSubscriptionId = storageSubscriptionId;
4548
CustomInit();
4649
}
4750

@@ -76,6 +79,13 @@ public ExportRDBParameters()
7679
[JsonProperty(PropertyName = "preferred-data-archive-auth-method")]
7780
public string PreferredDataArchiveAuthMethod { get; set; }
7881

82+
/// <summary>
83+
/// Gets or sets subscription id of the storage container for data to
84+
/// be exported using ManagedIdentity.
85+
/// </summary>
86+
[JsonProperty(PropertyName = "storage-subscription-id")]
87+
public string StorageSubscriptionId { get; set; }
88+
7989
/// <summary>
8090
/// Validate the object.
8191
/// </summary>

src/RedisCache/RedisCache.Management.Sdk/Generated/Models/ImportRDBParameters.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ public ImportRDBParameters()
3737
/// <param name="preferredDataArchiveAuthMethod">Preferred auth method
3838
/// to communicate to storage account used for data archive, specify
3939
/// SAS or ManagedIdentity, default value is SAS</param>
40-
public ImportRDBParameters(IList<string> files, string format = default(string), string preferredDataArchiveAuthMethod = default(string))
40+
/// <param name="storageSubscriptionId">Subscription id of the storage
41+
/// container containing files to import using Managed
42+
/// Identity.</param>
43+
public ImportRDBParameters(IList<string> files, string format = default(string), string preferredDataArchiveAuthMethod = default(string), string storageSubscriptionId = default(string))
4144
{
4245
Format = format;
4346
Files = files;
4447
PreferredDataArchiveAuthMethod = preferredDataArchiveAuthMethod;
48+
StorageSubscriptionId = storageSubscriptionId;
4549
CustomInit();
4650
}
4751

@@ -70,6 +74,13 @@ public ImportRDBParameters()
7074
[JsonProperty(PropertyName = "preferred-data-archive-auth-method")]
7175
public string PreferredDataArchiveAuthMethod { get; set; }
7276

77+
/// <summary>
78+
/// Gets or sets subscription id of the storage container containing
79+
/// files to import using Managed Identity.
80+
/// </summary>
81+
[JsonProperty(PropertyName = "storage-subscription-id")]
82+
public string StorageSubscriptionId { get; set; }
83+
7384
/// <summary>
7485
/// Validate the object.
7586
/// </summary>

src/RedisCache/RedisCache.Management.Sdk/Generated/Models/RedisCommonPropertiesRedisConfiguration.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ public RedisCommonPropertiesRedisConfiguration()
7171
/// <param name="authnotrequired">Specifies whether the authentication
7272
/// is disabled. Setting this property is highly discouraged from
7373
/// security point of view.</param>
74-
public RedisCommonPropertiesRedisConfiguration(IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string rdbBackupEnabled = default(string), string rdbBackupFrequency = default(string), string rdbBackupMaxSnapshotCount = default(string), string rdbStorageConnectionString = default(string), string aofBackupEnabled = default(string), string aofStorageConnectionString0 = default(string), string aofStorageConnectionString1 = default(string), string maxfragmentationmemoryReserved = default(string), string maxmemoryPolicy = default(string), string maxmemoryReserved = default(string), string maxmemoryDelta = default(string), string maxclients = default(string), string preferredDataArchiveAuthMethod = default(string), string preferredDataPersistenceAuthMethod = default(string), string zonalConfiguration = default(string), string authnotrequired = default(string))
74+
/// <param name="storageSubscriptionId">SubscriptionId of the storage
75+
/// account for persistence (aof/rdb) using ManagedIdentity.</param>
76+
public RedisCommonPropertiesRedisConfiguration(IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string rdbBackupEnabled = default(string), string rdbBackupFrequency = default(string), string rdbBackupMaxSnapshotCount = default(string), string rdbStorageConnectionString = default(string), string aofBackupEnabled = default(string), string aofStorageConnectionString0 = default(string), string aofStorageConnectionString1 = default(string), string maxfragmentationmemoryReserved = default(string), string maxmemoryPolicy = default(string), string maxmemoryReserved = default(string), string maxmemoryDelta = default(string), string maxclients = default(string), string preferredDataArchiveAuthMethod = default(string), string preferredDataPersistenceAuthMethod = default(string), string zonalConfiguration = default(string), string authnotrequired = default(string), string storageSubscriptionId = default(string))
7577
{
7678
AdditionalProperties = additionalProperties;
7779
RdbBackupEnabled = rdbBackupEnabled;
@@ -90,6 +92,7 @@ public RedisCommonPropertiesRedisConfiguration()
9092
PreferredDataPersistenceAuthMethod = preferredDataPersistenceAuthMethod;
9193
ZonalConfiguration = zonalConfiguration;
9294
Authnotrequired = authnotrequired;
95+
StorageSubscriptionId = storageSubscriptionId;
9396
CustomInit();
9497
}
9598

@@ -214,5 +217,12 @@ public RedisCommonPropertiesRedisConfiguration()
214217
[JsonProperty(PropertyName = "authnotrequired")]
215218
public string Authnotrequired { get; set; }
216219

220+
/// <summary>
221+
/// Gets or sets subscriptionId of the storage account for persistence
222+
/// (aof/rdb) using ManagedIdentity.
223+
/// </summary>
224+
[JsonProperty(PropertyName = "storage-subscription-id")]
225+
public string StorageSubscriptionId { get; set; }
226+
217227
}
218228
}

src/RedisCache/RedisCache.Management.Sdk/Generated/RedisManagementClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ private void Initialize()
366366
PrivateLinkResources = new PrivateLinkResourcesOperations(this);
367367
AsyncOperationStatus = new AsyncOperationStatusOperations(this);
368368
BaseUri = new System.Uri("https://management.azure.com");
369-
ApiVersion = "2022-06-01";
369+
ApiVersion = "2023-04-01";
370370
AcceptLanguage = "en-US";
371371
LongRunningOperationRetryTimeout = 30;
372372
GenerateClientRequestId = true;

src/RedisCache/RedisCache.Management.Sdk/Generated/SdkInfo_RedisManagementClient.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_RedisManagement
1919
{
2020
return new Tuple<string, string, string>[]
2121
{
22-
new Tuple<string, string, string>("Cache", "AsyncOperationStatus", "2022-06-01"),
23-
new Tuple<string, string, string>("Cache", "FirewallRules", "2022-06-01"),
24-
new Tuple<string, string, string>("Cache", "LinkedServer", "2022-06-01"),
25-
new Tuple<string, string, string>("Cache", "Operations", "2022-06-01"),
26-
new Tuple<string, string, string>("Cache", "PatchSchedules", "2022-06-01"),
27-
new Tuple<string, string, string>("Cache", "PrivateEndpointConnections", "2022-06-01"),
28-
new Tuple<string, string, string>("Cache", "PrivateLinkResources", "2022-06-01"),
29-
new Tuple<string, string, string>("Cache", "Redis", "2022-06-01"),
22+
new Tuple<string, string, string>("Cache", "AsyncOperationStatus", "2023-04-01"),
23+
new Tuple<string, string, string>("Cache", "FirewallRules", "2023-04-01"),
24+
new Tuple<string, string, string>("Cache", "LinkedServer", "2023-04-01"),
25+
new Tuple<string, string, string>("Cache", "Operations", "2023-04-01"),
26+
new Tuple<string, string, string>("Cache", "PatchSchedules", "2023-04-01"),
27+
new Tuple<string, string, string>("Cache", "PrivateEndpointConnections", "2023-04-01"),
28+
new Tuple<string, string, string>("Cache", "PrivateLinkResources", "2023-04-01"),
29+
new Tuple<string, string, string>("Cache", "Redis", "2023-04-01"),
3030
}.AsEnumerable();
3131
}
3232
}

src/RedisCache/RedisCache.Management.Sdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ payload-flattening-threshold: 2
2727
``` yaml
2828
commit: da0cfefaa0e6c237e1e3819f1cb2e11d7606878d
2929
input-file:
30-
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/redis/resource-manager/Microsoft.Cache/stable/2022-06-01/redis.json
30+
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/redis/resource-manager/Microsoft.Cache/stable/2023-04-01/redis.json
3131

3232
output-folder: Generated
3333

src/RedisCache/RedisCache.Test/ScenarioTests/RedisCacheTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public void TestZones()
9999
}
100100

101101
[Fact]
102-
[Trait(Category.AcceptanceType, Category.CheckIn)]
102+
[Trait(Category.AcceptanceType, Category.LiveOnly)]
103103
public void TestManagedIdentity()
104104
{
105105
TestRunner.RunTestScript("Test-ManagedIdentity");

0 commit comments

Comments
 (0)