Skip to content

Commit f9c91c4

Browse files
authored
[SQL] Add -EncryptionProtectorAutoRotation param to database cmdlets (#22436)
* Add perdb cmk auto rotation param to cmdlets * Add new param to tests * Add tests * fix readme * Add help files * geocopy tests * add missing sdk generated files * fixes * build fixes
1 parent 6a49fa6 commit f9c91c4

File tree

57 files changed

+43052
-31183
lines changed

Some content is hidden

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

57 files changed

+43052
-31183
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ internal DatabasesOperations(SqlManagementClient client)
518518
{
519519
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
520520
}
521-
string apiVersion = "2022-08-01-preview";
521+
string apiVersion = "2023-02-01-preview";
522522
// Tracing
523523
bool _shouldTrace = ServiceClientTracing.IsEnabled;
524524
string _invocationId = null;
@@ -728,7 +728,7 @@ internal DatabasesOperations(SqlManagementClient client)
728728
{
729729
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
730730
}
731-
string apiVersion = "2022-08-01-preview";
731+
string apiVersion = "2023-02-01-preview";
732732
// Tracing
733733
bool _shouldTrace = ServiceClientTracing.IsEnabled;
734734
string _invocationId = null;
@@ -1121,7 +1121,7 @@ internal DatabasesOperations(SqlManagementClient client)
11211121
{
11221122
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
11231123
}
1124-
string apiVersion = "2022-08-01-preview";
1124+
string apiVersion = "2023-02-01-preview";
11251125
// Tracing
11261126
bool _shouldTrace = ServiceClientTracing.IsEnabled;
11271127
string _invocationId = null;
@@ -1392,7 +1392,7 @@ internal DatabasesOperations(SqlManagementClient client)
13921392
{
13931393
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
13941394
}
1395-
string apiVersion = "2022-08-01-preview";
1395+
string apiVersion = "2023-02-01-preview";
13961396
// Tracing
13971397
bool _shouldTrace = ServiceClientTracing.IsEnabled;
13981398
string _invocationId = null;
@@ -1589,7 +1589,7 @@ internal DatabasesOperations(SqlManagementClient client)
15891589
{
15901590
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
15911591
}
1592-
string apiVersion = "2022-08-01-preview";
1592+
string apiVersion = "2023-02-01-preview";
15931593
// Tracing
15941594
bool _shouldTrace = ServiceClientTracing.IsEnabled;
15951595
string _invocationId = null;
@@ -1802,7 +1802,7 @@ internal DatabasesOperations(SqlManagementClient client)
18021802
{
18031803
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
18041804
}
1805-
string apiVersion = "2022-08-01-preview";
1805+
string apiVersion = "2023-02-01-preview";
18061806
// Tracing
18071807
bool _shouldTrace = ServiceClientTracing.IsEnabled;
18081808
string _invocationId = null;
@@ -2028,7 +2028,7 @@ internal DatabasesOperations(SqlManagementClient client)
20282028
{
20292029
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
20302030
}
2031-
string apiVersion = "2022-08-01-preview";
2031+
string apiVersion = "2023-02-01-preview";
20322032
// Tracing
20332033
bool _shouldTrace = ServiceClientTracing.IsEnabled;
20342034
string _invocationId = null;
@@ -2221,7 +2221,7 @@ internal DatabasesOperations(SqlManagementClient client)
22212221
{
22222222
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
22232223
}
2224-
string apiVersion = "2022-08-01-preview";
2224+
string apiVersion = "2023-02-01-preview";
22252225
// Tracing
22262226
bool _shouldTrace = ServiceClientTracing.IsEnabled;
22272227
string _invocationId = null;
@@ -2443,7 +2443,7 @@ internal DatabasesOperations(SqlManagementClient client)
24432443
{
24442444
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
24452445
}
2446-
string apiVersion = "2022-08-01-preview";
2446+
string apiVersion = "2023-02-01-preview";
24472447
// Tracing
24482448
bool _shouldTrace = ServiceClientTracing.IsEnabled;
24492449
string _invocationId = null;
@@ -2655,7 +2655,7 @@ internal DatabasesOperations(SqlManagementClient client)
26552655
{
26562656
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
26572657
}
2658-
string apiVersion = "2022-08-01-preview";
2658+
string apiVersion = "2023-02-01-preview";
26592659
// Tracing
26602660
bool _shouldTrace = ServiceClientTracing.IsEnabled;
26612661
string _invocationId = null;
@@ -2857,7 +2857,7 @@ internal DatabasesOperations(SqlManagementClient client)
28572857
{
28582858
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
28592859
}
2860-
string apiVersion = "2022-08-01-preview";
2860+
string apiVersion = "2023-02-01-preview";
28612861
// Tracing
28622862
bool _shouldTrace = ServiceClientTracing.IsEnabled;
28632863
string _invocationId = null;
@@ -3068,7 +3068,7 @@ internal DatabasesOperations(SqlManagementClient client)
30683068
{
30693069
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
30703070
}
3071-
string apiVersion = "2022-08-01-preview";
3071+
string apiVersion = "2023-02-01-preview";
30723072
// Tracing
30733073
bool _shouldTrace = ServiceClientTracing.IsEnabled;
30743074
string _invocationId = null;
@@ -3272,7 +3272,7 @@ internal DatabasesOperations(SqlManagementClient client)
32723272
{
32733273
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
32743274
}
3275-
string apiVersion = "2022-08-01-preview";
3275+
string apiVersion = "2023-02-01-preview";
32763276
// Tracing
32773277
bool _shouldTrace = ServiceClientTracing.IsEnabled;
32783278
string _invocationId = null;
@@ -3473,7 +3473,7 @@ internal DatabasesOperations(SqlManagementClient client)
34733473
{
34743474
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
34753475
}
3476-
string apiVersion = "2022-08-01-preview";
3476+
string apiVersion = "2023-02-01-preview";
34773477
// Tracing
34783478
bool _shouldTrace = ServiceClientTracing.IsEnabled;
34793479
string _invocationId = null;

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

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,17 @@ public Database()
214214
/// <param name="preferredEnclaveType">Type of enclave requested on the
215215
/// database i.e. Default or VBS enclaves. Possible values include:
216216
/// 'Default', 'VBS'</param>
217+
/// <param name="useFreeLimit">Whether or not the database uses free
218+
/// monthly limits. Allowed on one database in a subscription.</param>
219+
/// <param name="freeLimitExhaustionBehavior">Specifies the behavior
220+
/// when monthly free limits are exhausted for the free database.
221+
///
222+
/// AutoPause: The database will be auto paused upon exhaustion of free
223+
/// limits for remainder of the month.
224+
///
225+
/// BillForUsage: The database will continue to be online upon
226+
/// exhaustion of free limits and any overage will be billed. Possible
227+
/// values include: 'AutoPause', 'BillOverUsage'</param>
217228
/// <param name="sourceResourceId">The resource identifier of the
218229
/// source associated with the create operation of this database.
219230
///
@@ -271,7 +282,10 @@ public Database()
271282
/// <param name="availabilityZone">Specifies the availability zone the
272283
/// database is pinned to. Possible values include: 'NoPreference',
273284
/// '1', '2', '3'</param>
274-
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?), IDictionary<string, DatabaseKey> keys = default(IDictionary<string, DatabaseKey>), string encryptionProtector = default(string), string preferredEnclaveType = default(string), string sourceResourceId = default(string), bool? manualCutover = default(bool?), bool? performCutover = default(bool?), string availabilityZone = default(string))
285+
/// <param name="encryptionProtectorAutoRotation">The flag to enable or
286+
/// disable auto rotation of database encryption protector AKV
287+
/// key.</param>
288+
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?), IDictionary<string, DatabaseKey> keys = default(IDictionary<string, DatabaseKey>), string encryptionProtector = default(string), string preferredEnclaveType = default(string), bool? useFreeLimit = default(bool?), string freeLimitExhaustionBehavior = default(string), string sourceResourceId = default(string), bool? manualCutover = default(bool?), bool? performCutover = default(bool?), string availabilityZone = default(string), bool? encryptionProtectorAutoRotation = default(bool?))
275289
: base(location, id, name, type, tags)
276290
{
277291
Sku = sku;
@@ -319,10 +333,13 @@ public Database()
319333
Keys = keys;
320334
EncryptionProtector = encryptionProtector;
321335
PreferredEnclaveType = preferredEnclaveType;
336+
UseFreeLimit = useFreeLimit;
337+
FreeLimitExhaustionBehavior = freeLimitExhaustionBehavior;
322338
SourceResourceId = sourceResourceId;
323339
ManualCutover = manualCutover;
324340
PerformCutover = performCutover;
325341
AvailabilityZone = availabilityZone;
342+
EncryptionProtectorAutoRotation = encryptionProtectorAutoRotation;
326343
CustomInit();
327344
}
328345

@@ -705,6 +722,27 @@ public Database()
705722
[JsonProperty(PropertyName = "properties.preferredEnclaveType")]
706723
public string PreferredEnclaveType { get; set; }
707724

725+
/// <summary>
726+
/// Gets or sets whether or not the database uses free monthly limits.
727+
/// Allowed on one database in a subscription.
728+
/// </summary>
729+
[JsonProperty(PropertyName = "properties.useFreeLimit")]
730+
public bool? UseFreeLimit { get; set; }
731+
732+
/// <summary>
733+
/// Gets or sets specifies the behavior when monthly free limits are
734+
/// exhausted for the free database.
735+
///
736+
/// AutoPause: The database will be auto paused upon exhaustion of free
737+
/// limits for remainder of the month.
738+
///
739+
/// BillForUsage: The database will continue to be online upon
740+
/// exhaustion of free limits and any overage will be billed. Possible
741+
/// values include: 'AutoPause', 'BillOverUsage'
742+
/// </summary>
743+
[JsonProperty(PropertyName = "properties.freeLimitExhaustionBehavior")]
744+
public string FreeLimitExhaustionBehavior { get; set; }
745+
708746
/// <summary>
709747
/// Gets or sets the resource identifier of the source associated with
710748
/// the create operation of this database.
@@ -778,6 +816,13 @@ public Database()
778816
[JsonProperty(PropertyName = "properties.availabilityZone")]
779817
public string AvailabilityZone { get; set; }
780818

819+
/// <summary>
820+
/// Gets or sets the flag to enable or disable auto rotation of
821+
/// database encryption protector AKV key.
822+
/// </summary>
823+
[JsonProperty(PropertyName = "properties.encryptionProtectorAutoRotation")]
824+
public bool? EncryptionProtectorAutoRotation { get; set; }
825+
781826
/// <summary>
782827
/// Validate the object.
783828
/// </summary>

0 commit comments

Comments
 (0)