Skip to content

Commit ec9684c

Browse files
vidit-msftisra-fel
andauthored
Adding PreferredEnclaveType support for Az.Sql cmdlets corresponding to 2022-05-01-preview swagger release (#20527)
* generated clients using 2022-05-01-preview version of Databases * added create and get database tests for preferred enclave type * updated changelog and help markdown files * record database crud tests * re-record failing tests * Update src/Sql/Sql/ChangeLog.md Co-authored-by: Yeming Liu <[email protected]>
1 parent 5ba00a7 commit ec9684c

File tree

52 files changed

+34976
-32346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+34976
-32346
lines changed

src/Sql/Sql.Sdk/Generated/DatabasesOperations.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ internal DatabasesOperations(SqlManagementClient client)
517517
{
518518
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
519519
}
520-
string apiVersion = "2022-02-01-preview";
520+
string apiVersion = "2022-05-01-preview";
521521
// Tracing
522522
bool _shouldTrace = ServiceClientTracing.IsEnabled;
523523
string _invocationId = null;
@@ -724,7 +724,7 @@ internal DatabasesOperations(SqlManagementClient client)
724724
{
725725
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
726726
}
727-
string apiVersion = "2022-02-01-preview";
727+
string apiVersion = "2022-05-01-preview";
728728
// Tracing
729729
bool _shouldTrace = ServiceClientTracing.IsEnabled;
730730
string _invocationId = null;
@@ -1108,7 +1108,7 @@ internal DatabasesOperations(SqlManagementClient client)
11081108
{
11091109
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
11101110
}
1111-
string apiVersion = "2022-02-01-preview";
1111+
string apiVersion = "2022-05-01-preview";
11121112
// Tracing
11131113
bool _shouldTrace = ServiceClientTracing.IsEnabled;
11141114
string _invocationId = null;
@@ -1379,7 +1379,7 @@ internal DatabasesOperations(SqlManagementClient client)
13791379
{
13801380
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
13811381
}
1382-
string apiVersion = "2022-02-01-preview";
1382+
string apiVersion = "2022-05-01-preview";
13831383
// Tracing
13841384
bool _shouldTrace = ServiceClientTracing.IsEnabled;
13851385
string _invocationId = null;
@@ -1576,7 +1576,7 @@ internal DatabasesOperations(SqlManagementClient client)
15761576
{
15771577
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
15781578
}
1579-
string apiVersion = "2022-02-01-preview";
1579+
string apiVersion = "2022-05-01-preview";
15801580
// Tracing
15811581
bool _shouldTrace = ServiceClientTracing.IsEnabled;
15821582
string _invocationId = null;
@@ -1789,7 +1789,7 @@ internal DatabasesOperations(SqlManagementClient client)
17891789
{
17901790
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
17911791
}
1792-
string apiVersion = "2022-02-01-preview";
1792+
string apiVersion = "2022-05-01-preview";
17931793
// Tracing
17941794
bool _shouldTrace = ServiceClientTracing.IsEnabled;
17951795
string _invocationId = null;
@@ -2015,7 +2015,7 @@ internal DatabasesOperations(SqlManagementClient client)
20152015
{
20162016
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
20172017
}
2018-
string apiVersion = "2022-02-01-preview";
2018+
string apiVersion = "2022-05-01-preview";
20192019
// Tracing
20202020
bool _shouldTrace = ServiceClientTracing.IsEnabled;
20212021
string _invocationId = null;
@@ -2208,7 +2208,7 @@ internal DatabasesOperations(SqlManagementClient client)
22082208
{
22092209
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
22102210
}
2211-
string apiVersion = "2022-02-01-preview";
2211+
string apiVersion = "2022-05-01-preview";
22122212
// Tracing
22132213
bool _shouldTrace = ServiceClientTracing.IsEnabled;
22142214
string _invocationId = null;
@@ -2430,7 +2430,7 @@ internal DatabasesOperations(SqlManagementClient client)
24302430
{
24312431
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
24322432
}
2433-
string apiVersion = "2022-02-01-preview";
2433+
string apiVersion = "2022-05-01-preview";
24342434
// Tracing
24352435
bool _shouldTrace = ServiceClientTracing.IsEnabled;
24362436
string _invocationId = null;
@@ -2642,7 +2642,7 @@ internal DatabasesOperations(SqlManagementClient client)
26422642
{
26432643
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
26442644
}
2645-
string apiVersion = "2022-02-01-preview";
2645+
string apiVersion = "2022-05-01-preview";
26462646
// Tracing
26472647
bool _shouldTrace = ServiceClientTracing.IsEnabled;
26482648
string _invocationId = null;
@@ -2844,7 +2844,7 @@ internal DatabasesOperations(SqlManagementClient client)
28442844
{
28452845
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
28462846
}
2847-
string apiVersion = "2022-02-01-preview";
2847+
string apiVersion = "2022-05-01-preview";
28482848
// Tracing
28492849
bool _shouldTrace = ServiceClientTracing.IsEnabled;
28502850
string _invocationId = null;
@@ -3055,7 +3055,7 @@ internal DatabasesOperations(SqlManagementClient client)
30553055
{
30563056
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
30573057
}
3058-
string apiVersion = "2022-02-01-preview";
3058+
string apiVersion = "2022-05-01-preview";
30593059
// Tracing
30603060
bool _shouldTrace = ServiceClientTracing.IsEnabled;
30613061
string _invocationId = null;
@@ -3259,7 +3259,7 @@ internal DatabasesOperations(SqlManagementClient client)
32593259
{
32603260
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
32613261
}
3262-
string apiVersion = "2022-02-01-preview";
3262+
string apiVersion = "2022-05-01-preview";
32633263
// Tracing
32643264
bool _shouldTrace = ServiceClientTracing.IsEnabled;
32653265
string _invocationId = null;
@@ -3460,7 +3460,7 @@ internal DatabasesOperations(SqlManagementClient client)
34603460
{
34613461
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
34623462
}
3463-
string apiVersion = "2022-02-01-preview";
3463+
string apiVersion = "2022-05-01-preview";
34643464
// Tracing
34653465
bool _shouldTrace = ServiceClientTracing.IsEnabled;
34663466
string _invocationId = null;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// <auto-generated>
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
// Licensed under the MIT License. See License.txt in the project root for
4+
// license information.
5+
//
6+
// Code generated by Microsoft (R) AutoRest Code Generator.
7+
// Changes may cause incorrect behavior and will be lost if the code is
8+
// regenerated.
9+
// </auto-generated>
10+
11+
namespace Microsoft.Azure.Management.Sql.Models
12+
{
13+
14+
/// <summary>
15+
/// Defines values for AlwaysEncryptedEnclaveType.
16+
/// </summary>
17+
public static class AlwaysEncryptedEnclaveType
18+
{
19+
public const string Default = "Default";
20+
public const string VBS = "VBS";
21+
}
22+
}

src/Sql/Sql.Sdk/Generated/Models/Database.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ public Database()
206206
/// for this database.</param>
207207
/// <param name="federatedClientId">The Client id used for cross tenant
208208
/// per database CMK scenario</param>
209+
/// <param name="preferredEnclaveType">Type of enclave requested on the
210+
/// database i.e. Default or VBS enclaves. Possible values include:
211+
/// 'Default', 'VBS'</param>
209212
/// <param name="sourceResourceId">The resource identifier of the
210213
/// source associated with the create operation of this database.
211214
///
@@ -233,7 +236,7 @@ public Database()
233236
/// “x-ms-authorization-auxiliary” header see
234237
/// https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant
235238
/// </param>
236-
public Database(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), Sku sku = default(Sku), string kind = default(string), string managedBy = default(string), DatabaseIdentity identity = default(DatabaseIdentity), string createMode = default(string), string collation = default(string), long? maxSizeBytes = default(long?), string sampleName = default(string), string elasticPoolId = default(string), string sourceDatabaseId = default(string), string status = default(string), System.Guid? databaseId = default(System.Guid?), System.DateTime? creationDate = default(System.DateTime?), string currentServiceObjectiveName = default(string), string requestedServiceObjectiveName = default(string), string defaultSecondaryLocation = default(string), string failoverGroupId = default(string), System.DateTime? restorePointInTime = default(System.DateTime?), System.DateTime? sourceDatabaseDeletionDate = default(System.DateTime?), string recoveryServicesRecoveryPointId = default(string), string longTermRetentionBackupResourceId = default(string), string recoverableDatabaseId = default(string), string restorableDroppedDatabaseId = default(string), string catalogCollation = default(string), bool? zoneRedundant = default(bool?), string licenseType = default(string), long? maxLogSizeBytes = default(long?), System.DateTime? earliestRestoreDate = default(System.DateTime?), string readScale = default(string), int? highAvailabilityReplicaCount = default(int?), string secondaryType = default(string), Sku currentSku = default(Sku), int? autoPauseDelay = default(int?), string currentBackupStorageRedundancy = default(string), string requestedBackupStorageRedundancy = default(string), double? minCapacity = default(double?), System.DateTime? pausedDate = default(System.DateTime?), System.DateTime? resumedDate = default(System.DateTime?), string maintenanceConfigurationId = default(string), bool? isLedgerOn = default(bool?), bool? isInfraEncryptionEnabled = default(bool?), System.Guid? federatedClientId = default(System.Guid?), string sourceResourceId = default(string))
239+
public Database(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), Sku sku = default(Sku), string kind = default(string), string managedBy = default(string), DatabaseIdentity identity = default(DatabaseIdentity), string createMode = default(string), string collation = default(string), long? maxSizeBytes = default(long?), string sampleName = default(string), string elasticPoolId = default(string), string sourceDatabaseId = default(string), string status = default(string), System.Guid? databaseId = default(System.Guid?), System.DateTime? creationDate = default(System.DateTime?), string currentServiceObjectiveName = default(string), string requestedServiceObjectiveName = default(string), string defaultSecondaryLocation = default(string), string failoverGroupId = default(string), System.DateTime? restorePointInTime = default(System.DateTime?), System.DateTime? sourceDatabaseDeletionDate = default(System.DateTime?), string recoveryServicesRecoveryPointId = default(string), string longTermRetentionBackupResourceId = default(string), string recoverableDatabaseId = default(string), string restorableDroppedDatabaseId = default(string), string catalogCollation = default(string), bool? zoneRedundant = default(bool?), string licenseType = default(string), long? maxLogSizeBytes = default(long?), System.DateTime? earliestRestoreDate = default(System.DateTime?), string readScale = default(string), int? highAvailabilityReplicaCount = default(int?), string secondaryType = default(string), Sku currentSku = default(Sku), int? autoPauseDelay = default(int?), string currentBackupStorageRedundancy = default(string), string requestedBackupStorageRedundancy = default(string), double? minCapacity = default(double?), System.DateTime? pausedDate = default(System.DateTime?), System.DateTime? resumedDate = default(System.DateTime?), string maintenanceConfigurationId = default(string), bool? isLedgerOn = default(bool?), bool? isInfraEncryptionEnabled = default(bool?), System.Guid? federatedClientId = default(System.Guid?), string preferredEnclaveType = default(string), string sourceResourceId = default(string))
237240
: base(location, id, name, type, tags)
238241
{
239242
Sku = sku;
@@ -278,6 +281,7 @@ public Database()
278281
IsLedgerOn = isLedgerOn;
279282
IsInfraEncryptionEnabled = isInfraEncryptionEnabled;
280283
FederatedClientId = federatedClientId;
284+
PreferredEnclaveType = preferredEnclaveType;
281285
SourceResourceId = sourceResourceId;
282286
CustomInit();
283287
}
@@ -640,6 +644,13 @@ public Database()
640644
[JsonProperty(PropertyName = "properties.federatedClientId")]
641645
public System.Guid? FederatedClientId { get; set; }
642646

647+
/// <summary>
648+
/// Gets or sets type of enclave requested on the database i.e. Default
649+
/// or VBS enclaves. Possible values include: 'Default', 'VBS'
650+
/// </summary>
651+
[JsonProperty(PropertyName = "properties.preferredEnclaveType")]
652+
public string PreferredEnclaveType { get; set; }
653+
643654
/// <summary>
644655
/// Gets or sets the resource identifier of the source associated with
645656
/// the create operation of this database.

src/Sql/Sql.Sdk/Generated/Models/DatabaseUpdate.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,11 @@ public DatabaseUpdate()
182182
/// for this database.</param>
183183
/// <param name="federatedClientId">The Client id used for cross tenant
184184
/// per database CMK scenario</param>
185+
/// <param name="preferredEnclaveType">Type of enclave requested on the
186+
/// database i.e. Default or VBS enclaves. Possible values include:
187+
/// 'Default', 'VBS'</param>
185188
/// <param name="tags">Resource tags.</param>
186-
public DatabaseUpdate(Sku sku = default(Sku), DatabaseIdentity identity = default(DatabaseIdentity), string createMode = default(string), string collation = default(string), long? maxSizeBytes = default(long?), string sampleName = default(string), string elasticPoolId = default(string), string sourceDatabaseId = default(string), string status = default(string), System.Guid? databaseId = default(System.Guid?), System.DateTime? creationDate = default(System.DateTime?), string currentServiceObjectiveName = default(string), string requestedServiceObjectiveName = default(string), string defaultSecondaryLocation = default(string), string failoverGroupId = default(string), System.DateTime? restorePointInTime = default(System.DateTime?), System.DateTime? sourceDatabaseDeletionDate = default(System.DateTime?), string recoveryServicesRecoveryPointId = default(string), string longTermRetentionBackupResourceId = default(string), string recoverableDatabaseId = default(string), string restorableDroppedDatabaseId = default(string), string catalogCollation = default(string), bool? zoneRedundant = default(bool?), string licenseType = default(string), long? maxLogSizeBytes = default(long?), System.DateTime? earliestRestoreDate = default(System.DateTime?), string readScale = default(string), int? highAvailabilityReplicaCount = default(int?), string secondaryType = default(string), Sku currentSku = default(Sku), int? autoPauseDelay = default(int?), string currentBackupStorageRedundancy = default(string), string requestedBackupStorageRedundancy = default(string), double? minCapacity = default(double?), System.DateTime? pausedDate = default(System.DateTime?), System.DateTime? resumedDate = default(System.DateTime?), string maintenanceConfigurationId = default(string), bool? isLedgerOn = default(bool?), bool? isInfraEncryptionEnabled = default(bool?), System.Guid? federatedClientId = default(System.Guid?), IDictionary<string, string> tags = default(IDictionary<string, string>))
189+
public DatabaseUpdate(Sku sku = default(Sku), DatabaseIdentity identity = default(DatabaseIdentity), string createMode = default(string), string collation = default(string), long? maxSizeBytes = default(long?), string sampleName = default(string), string elasticPoolId = default(string), string sourceDatabaseId = default(string), string status = default(string), System.Guid? databaseId = default(System.Guid?), System.DateTime? creationDate = default(System.DateTime?), string currentServiceObjectiveName = default(string), string requestedServiceObjectiveName = default(string), string defaultSecondaryLocation = default(string), string failoverGroupId = default(string), System.DateTime? restorePointInTime = default(System.DateTime?), System.DateTime? sourceDatabaseDeletionDate = default(System.DateTime?), string recoveryServicesRecoveryPointId = default(string), string longTermRetentionBackupResourceId = default(string), string recoverableDatabaseId = default(string), string restorableDroppedDatabaseId = default(string), string catalogCollation = default(string), bool? zoneRedundant = default(bool?), string licenseType = default(string), long? maxLogSizeBytes = default(long?), System.DateTime? earliestRestoreDate = default(System.DateTime?), string readScale = default(string), int? highAvailabilityReplicaCount = default(int?), string secondaryType = default(string), Sku currentSku = default(Sku), int? autoPauseDelay = default(int?), string currentBackupStorageRedundancy = default(string), string requestedBackupStorageRedundancy = default(string), double? minCapacity = default(double?), System.DateTime? pausedDate = default(System.DateTime?), System.DateTime? resumedDate = default(System.DateTime?), string maintenanceConfigurationId = default(string), bool? isLedgerOn = default(bool?), bool? isInfraEncryptionEnabled = default(bool?), System.Guid? federatedClientId = default(System.Guid?), string preferredEnclaveType = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>))
187190
{
188191
Sku = sku;
189192
Identity = identity;
@@ -225,6 +228,7 @@ public DatabaseUpdate()
225228
IsLedgerOn = isLedgerOn;
226229
IsInfraEncryptionEnabled = isInfraEncryptionEnabled;
227230
FederatedClientId = federatedClientId;
231+
PreferredEnclaveType = preferredEnclaveType;
228232
Tags = tags;
229233
CustomInit();
230234
}
@@ -559,6 +563,13 @@ public DatabaseUpdate()
559563
[JsonProperty(PropertyName = "properties.federatedClientId")]
560564
public System.Guid? FederatedClientId { get; set; }
561565

566+
/// <summary>
567+
/// Gets or sets type of enclave requested on the database i.e. Default
568+
/// or VBS enclaves. Possible values include: 'Default', 'VBS'
569+
/// </summary>
570+
[JsonProperty(PropertyName = "properties.preferredEnclaveType")]
571+
public string PreferredEnclaveType { get; set; }
572+
562573
/// <summary>
563574
/// Gets or sets resource tags.
564575
/// </summary>

src/Sql/Sql.Sdk/Generated/SdkInfo_SqlManagementClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_SqlManagementCl
2929
new Tuple<string, string, string>("Sql", "DatabaseVulnerabilityAssessmentScans", "2020-11-01-preview"),
3030
new Tuple<string, string, string>("Sql", "DatabaseVulnerabilityAssessments", "2020-11-01-preview"),
3131
new Tuple<string, string, string>("Sql", "Databases", "2014-04-01"),
32-
new Tuple<string, string, string>("Sql", "Databases", "2022-02-01-preview"),
32+
new Tuple<string, string, string>("Sql", "Databases", "2022-05-01-preview"),
3333
new Tuple<string, string, string>("Sql", "DistributedAvailabilityGroups", "2021-11-01-preview"),
3434
new Tuple<string, string, string>("Sql", "ElasticPoolActivities", "2014-04-01"),
3535
new Tuple<string, string, string>("Sql", "ElasticPoolDatabaseActivities", "2014-04-01"),

0 commit comments

Comments
 (0)