-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
SqlDatabaseData.cs
474 lines (466 loc) · 35.2 KB
/
SqlDatabaseData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Sql.Models;
namespace Azure.ResourceManager.Sql
{
/// <summary>
/// A class representing the SqlDatabase data model.
/// A database resource.
/// </summary>
public partial class SqlDatabaseData : TrackedResourceData
{
/// <summary>
/// Keeps track of any properties unknown to the library.
/// <para>
/// To assign an object to the value of this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
/// </para>
/// <para>
/// To assign an already formatted json string to this property use <see cref="BinaryData.FromString(string)"/>.
/// </para>
/// <para>
/// Examples:
/// <list type="bullet">
/// <item>
/// <term>BinaryData.FromObjectAsJson("foo")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("\"foo\"")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// </list>
/// </para>
/// </summary>
private IDictionary<string, BinaryData> _serializedAdditionalRawData;
/// <summary> Initializes a new instance of <see cref="SqlDatabaseData"/>. </summary>
/// <param name="location"> The location. </param>
public SqlDatabaseData(AzureLocation location) : base(location)
{
Keys = new ChangeTrackingDictionary<string, SqlDatabaseKey>();
}
/// <summary> Initializes a new instance of <see cref="SqlDatabaseData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="tags"> The tags. </param>
/// <param name="location"> The location. </param>
/// <param name="sku">
/// The database SKU.
///
/// The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands:
///
/// ```azurecli
/// az sql db list-editions -l <location> -o table
/// ````
///
/// ```powershell
/// Get-AzSqlServerServiceObjective -Location <location>
/// ````
///
/// </param>
/// <param name="kind"> Kind of database. This is metadata used for the Azure portal experience. </param>
/// <param name="managedBy"> Resource that manages the database. </param>
/// <param name="identity"> The Azure Active Directory identity of the database. </param>
/// <param name="createMode">
/// Specifies the mode of database creation.
///
/// Default: regular database creation.
///
/// Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.
///
/// Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.
///
/// PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.
///
/// Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.
///
/// Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.
///
/// RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.
///
/// Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.
/// </param>
/// <param name="collation"> The collation of the database. </param>
/// <param name="maxSizeBytes"> The max size of the database expressed in bytes. </param>
/// <param name="sampleName"> The name of the sample schema to apply when creating this database. </param>
/// <param name="elasticPoolId"> The resource identifier of the elastic pool containing this database. </param>
/// <param name="sourceDatabaseId"> The resource identifier of the source database associated with create operation of this database. </param>
/// <param name="status"> The status of the database. </param>
/// <param name="databaseId"> The ID of the database. </param>
/// <param name="createdOn"> The creation date of the database (ISO8601 format). </param>
/// <param name="currentServiceObjectiveName"> The current service level objective name of the database. </param>
/// <param name="requestedServiceObjectiveName"> The requested service level objective name of the database. </param>
/// <param name="defaultSecondaryLocation"> The default secondary region for this database. </param>
/// <param name="failoverGroupId"> Failover Group resource identifier that this database belongs to. </param>
/// <param name="restorePointInTime"> Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. </param>
/// <param name="sourceDatabaseDeletedOn"> Specifies the time that the database was deleted. </param>
/// <param name="recoveryServicesRecoveryPointId"> The resource identifier of the recovery point associated with create operation of this database. </param>
/// <param name="longTermRetentionBackupResourceId"> The resource identifier of the long term retention backup associated with create operation of this database. </param>
/// <param name="recoverableDatabaseId"> The resource identifier of the recoverable database associated with create operation of this database. </param>
/// <param name="restorableDroppedDatabaseId"> The resource identifier of the restorable dropped database associated with create operation of this database. </param>
/// <param name="catalogCollation"> Collation of the metadata catalog. </param>
/// <param name="isZoneRedundant"> Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. </param>
/// <param name="licenseType"> The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. </param>
/// <param name="maxLogSizeBytes"> The max log size for this database. </param>
/// <param name="earliestRestoreOn"> This records the earliest start date and time that restore is available for this database (ISO8601 format). </param>
/// <param name="readScale"> The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool. </param>
/// <param name="highAvailabilityReplicaCount"> The number of secondary replicas associated with the database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. </param>
/// <param name="secondaryType"> The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby. </param>
/// <param name="currentSku"> The name and tier of the SKU. </param>
/// <param name="autoPauseDelay"> Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled. </param>
/// <param name="currentBackupStorageRedundancy"> The storage account type used to store backups for this database. </param>
/// <param name="requestedBackupStorageRedundancy"> The storage account type to be used to store backups for this database. </param>
/// <param name="minCapacity"> Minimal capacity that database will always have allocated, if not paused. </param>
/// <param name="pausedOn"> The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. </param>
/// <param name="resumedOn"> The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. </param>
/// <param name="maintenanceConfigurationId"> Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur. </param>
/// <param name="isLedgerOn"> Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. </param>
/// <param name="isInfraEncryptionEnabled"> Infra encryption is enabled for this database. </param>
/// <param name="federatedClientId"> The Client id used for cross tenant per database CMK scenario. </param>
/// <param name="keys"> The resource ids of the user assigned identities to use. </param>
/// <param name="encryptionProtector"> The azure key vault URI of the database if it's configured with per Database Customer Managed Keys. </param>
/// <param name="preferredEnclaveType"> Type of enclave requested on the database i.e. Default or VBS enclaves. </param>
/// <param name="useFreeLimit"> Whether or not the database uses free monthly limits. Allowed on one database in a subscription. </param>
/// <param name="freeLimitExhaustionBehavior">
/// Specifies the behavior when monthly free limits are exhausted for the free database.
///
/// AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month.
///
/// BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed.
/// </param>
/// <param name="sourceResourceId">
/// The resource identifier of the source associated with the create operation of this database.
///
/// This property is only supported for DataWarehouse edition and allows to restore across subscriptions.
///
/// When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover.
///
/// When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or existing sql pool, and restorePointInTime must be specified.
///
/// When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped sql pool.
///
/// When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool.
///
/// When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details about “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant
/// </param>
/// <param name="manualCutover">
/// Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier.
///
/// This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier.
///
/// When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database.
///
/// To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state.
/// </param>
/// <param name="performCutover">
/// To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress.
///
/// This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter.
///
/// This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier is already in progress.
///
/// When performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database.
/// </param>
/// <param name="availabilityZone"> Specifies the availability zone the database is pinned to. </param>
/// <param name="encryptionProtectorAutoRotation"> The flag to enable or disable auto rotation of database encryption protector AKV key. </param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal SqlDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, SqlSku sku, string kind, string managedBy, DatabaseIdentity identity, SqlDatabaseCreateMode? createMode, string collation, long? maxSizeBytes, SampleSchemaName? sampleName, ResourceIdentifier elasticPoolId, ResourceIdentifier sourceDatabaseId, SqlDatabaseStatus? status, Guid? databaseId, DateTimeOffset? createdOn, string currentServiceObjectiveName, string requestedServiceObjectiveName, AzureLocation? defaultSecondaryLocation, ResourceIdentifier failoverGroupId, DateTimeOffset? restorePointInTime, DateTimeOffset? sourceDatabaseDeletedOn, ResourceIdentifier recoveryServicesRecoveryPointId, ResourceIdentifier longTermRetentionBackupResourceId, ResourceIdentifier recoverableDatabaseId, ResourceIdentifier restorableDroppedDatabaseId, CatalogCollationType? catalogCollation, bool? isZoneRedundant, DatabaseLicenseType? licenseType, long? maxLogSizeBytes, DateTimeOffset? earliestRestoreOn, DatabaseReadScale? readScale, int? highAvailabilityReplicaCount, SecondaryType? secondaryType, SqlSku currentSku, int? autoPauseDelay, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, double? minCapacity, DateTimeOffset? pausedOn, DateTimeOffset? resumedOn, ResourceIdentifier maintenanceConfigurationId, bool? isLedgerOn, bool? isInfraEncryptionEnabled, Guid? federatedClientId, IDictionary<string, SqlDatabaseKey> keys, string encryptionProtector, SqlAlwaysEncryptedEnclaveType? preferredEnclaveType, bool? useFreeLimit, FreeLimitExhaustionBehavior? freeLimitExhaustionBehavior, ResourceIdentifier sourceResourceId, bool? manualCutover, bool? performCutover, SqlAvailabilityZoneType? availabilityZone, bool? encryptionProtectorAutoRotation, IDictionary<string, BinaryData> serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
Sku = sku;
Kind = kind;
ManagedBy = managedBy;
Identity = identity;
CreateMode = createMode;
Collation = collation;
MaxSizeBytes = maxSizeBytes;
SampleName = sampleName;
ElasticPoolId = elasticPoolId;
SourceDatabaseId = sourceDatabaseId;
Status = status;
DatabaseId = databaseId;
CreatedOn = createdOn;
CurrentServiceObjectiveName = currentServiceObjectiveName;
RequestedServiceObjectiveName = requestedServiceObjectiveName;
DefaultSecondaryLocation = defaultSecondaryLocation;
FailoverGroupId = failoverGroupId;
RestorePointInTime = restorePointInTime;
SourceDatabaseDeletedOn = sourceDatabaseDeletedOn;
RecoveryServicesRecoveryPointId = recoveryServicesRecoveryPointId;
LongTermRetentionBackupResourceId = longTermRetentionBackupResourceId;
RecoverableDatabaseId = recoverableDatabaseId;
RestorableDroppedDatabaseId = restorableDroppedDatabaseId;
CatalogCollation = catalogCollation;
IsZoneRedundant = isZoneRedundant;
LicenseType = licenseType;
MaxLogSizeBytes = maxLogSizeBytes;
EarliestRestoreOn = earliestRestoreOn;
ReadScale = readScale;
HighAvailabilityReplicaCount = highAvailabilityReplicaCount;
SecondaryType = secondaryType;
CurrentSku = currentSku;
AutoPauseDelay = autoPauseDelay;
CurrentBackupStorageRedundancy = currentBackupStorageRedundancy;
RequestedBackupStorageRedundancy = requestedBackupStorageRedundancy;
MinCapacity = minCapacity;
PausedOn = pausedOn;
ResumedOn = resumedOn;
MaintenanceConfigurationId = maintenanceConfigurationId;
IsLedgerOn = isLedgerOn;
IsInfraEncryptionEnabled = isInfraEncryptionEnabled;
FederatedClientId = federatedClientId;
Keys = keys;
EncryptionProtector = encryptionProtector;
PreferredEnclaveType = preferredEnclaveType;
UseFreeLimit = useFreeLimit;
FreeLimitExhaustionBehavior = freeLimitExhaustionBehavior;
SourceResourceId = sourceResourceId;
ManualCutover = manualCutover;
PerformCutover = performCutover;
AvailabilityZone = availabilityZone;
EncryptionProtectorAutoRotation = encryptionProtectorAutoRotation;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
/// <summary> Initializes a new instance of <see cref="SqlDatabaseData"/> for deserialization. </summary>
internal SqlDatabaseData()
{
}
/// <summary>
/// The database SKU.
///
/// The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands:
///
/// ```azurecli
/// az sql db list-editions -l <location> -o table
/// ````
///
/// ```powershell
/// Get-AzSqlServerServiceObjective -Location <location>
/// ````
///
/// </summary>
[WirePath("sku")]
public SqlSku Sku { get; set; }
/// <summary> Kind of database. This is metadata used for the Azure portal experience. </summary>
[WirePath("kind")]
public string Kind { get; }
/// <summary> Resource that manages the database. </summary>
[WirePath("managedBy")]
public string ManagedBy { get; }
/// <summary> The Azure Active Directory identity of the database. </summary>
[WirePath("identity")]
public DatabaseIdentity Identity { get; set; }
/// <summary>
/// Specifies the mode of database creation.
///
/// Default: regular database creation.
///
/// Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.
///
/// Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.
///
/// PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.
///
/// Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.
///
/// Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.
///
/// RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.
///
/// Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.
/// </summary>
[WirePath("properties.createMode")]
public SqlDatabaseCreateMode? CreateMode { get; set; }
/// <summary> The collation of the database. </summary>
[WirePath("properties.collation")]
public string Collation { get; set; }
/// <summary> The max size of the database expressed in bytes. </summary>
[WirePath("properties.maxSizeBytes")]
public long? MaxSizeBytes { get; set; }
/// <summary> The name of the sample schema to apply when creating this database. </summary>
[WirePath("properties.sampleName")]
public SampleSchemaName? SampleName { get; set; }
/// <summary> The resource identifier of the elastic pool containing this database. </summary>
[WirePath("properties.elasticPoolId")]
public ResourceIdentifier ElasticPoolId { get; set; }
/// <summary> The resource identifier of the source database associated with create operation of this database. </summary>
[WirePath("properties.sourceDatabaseId")]
public ResourceIdentifier SourceDatabaseId { get; set; }
/// <summary> The status of the database. </summary>
[WirePath("properties.status")]
public SqlDatabaseStatus? Status { get; }
/// <summary> The ID of the database. </summary>
[WirePath("properties.databaseId")]
public Guid? DatabaseId { get; }
/// <summary> The creation date of the database (ISO8601 format). </summary>
[WirePath("properties.creationDate")]
public DateTimeOffset? CreatedOn { get; }
/// <summary> The current service level objective name of the database. </summary>
[WirePath("properties.currentServiceObjectiveName")]
public string CurrentServiceObjectiveName { get; }
/// <summary> The requested service level objective name of the database. </summary>
[WirePath("properties.requestedServiceObjectiveName")]
public string RequestedServiceObjectiveName { get; }
/// <summary> The default secondary region for this database. </summary>
[WirePath("properties.defaultSecondaryLocation")]
public AzureLocation? DefaultSecondaryLocation { get; }
/// <summary> Failover Group resource identifier that this database belongs to. </summary>
[WirePath("properties.failoverGroupId")]
public ResourceIdentifier FailoverGroupId { get; }
/// <summary> Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. </summary>
[WirePath("properties.restorePointInTime")]
public DateTimeOffset? RestorePointInTime { get; set; }
/// <summary> Specifies the time that the database was deleted. </summary>
[WirePath("properties.sourceDatabaseDeletionDate")]
public DateTimeOffset? SourceDatabaseDeletedOn { get; set; }
/// <summary> The resource identifier of the recovery point associated with create operation of this database. </summary>
[WirePath("properties.recoveryServicesRecoveryPointId")]
public ResourceIdentifier RecoveryServicesRecoveryPointId { get; set; }
/// <summary> The resource identifier of the long term retention backup associated with create operation of this database. </summary>
[WirePath("properties.longTermRetentionBackupResourceId")]
public ResourceIdentifier LongTermRetentionBackupResourceId { get; set; }
/// <summary> The resource identifier of the recoverable database associated with create operation of this database. </summary>
[WirePath("properties.recoverableDatabaseId")]
public ResourceIdentifier RecoverableDatabaseId { get; set; }
/// <summary> The resource identifier of the restorable dropped database associated with create operation of this database. </summary>
[WirePath("properties.restorableDroppedDatabaseId")]
public ResourceIdentifier RestorableDroppedDatabaseId { get; set; }
/// <summary> Collation of the metadata catalog. </summary>
[WirePath("properties.catalogCollation")]
public CatalogCollationType? CatalogCollation { get; set; }
/// <summary> Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. </summary>
[WirePath("properties.zoneRedundant")]
public bool? IsZoneRedundant { get; set; }
/// <summary> The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. </summary>
[WirePath("properties.licenseType")]
public DatabaseLicenseType? LicenseType { get; set; }
/// <summary> The max log size for this database. </summary>
[WirePath("properties.maxLogSizeBytes")]
public long? MaxLogSizeBytes { get; }
/// <summary> This records the earliest start date and time that restore is available for this database (ISO8601 format). </summary>
[WirePath("properties.earliestRestoreDate")]
public DateTimeOffset? EarliestRestoreOn { get; }
/// <summary> The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool. </summary>
[WirePath("properties.readScale")]
public DatabaseReadScale? ReadScale { get; set; }
/// <summary> The number of secondary replicas associated with the database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. </summary>
[WirePath("properties.highAvailabilityReplicaCount")]
public int? HighAvailabilityReplicaCount { get; set; }
/// <summary> The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby. </summary>
[WirePath("properties.secondaryType")]
public SecondaryType? SecondaryType { get; set; }
/// <summary> The name and tier of the SKU. </summary>
[WirePath("properties.currentSku")]
public SqlSku CurrentSku { get; }
/// <summary> Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled. </summary>
[WirePath("properties.autoPauseDelay")]
public int? AutoPauseDelay { get; set; }
/// <summary> The storage account type used to store backups for this database. </summary>
[WirePath("properties.currentBackupStorageRedundancy")]
public SqlBackupStorageRedundancy? CurrentBackupStorageRedundancy { get; }
/// <summary> The storage account type to be used to store backups for this database. </summary>
[WirePath("properties.requestedBackupStorageRedundancy")]
public SqlBackupStorageRedundancy? RequestedBackupStorageRedundancy { get; set; }
/// <summary> Minimal capacity that database will always have allocated, if not paused. </summary>
[WirePath("properties.minCapacity")]
public double? MinCapacity { get; set; }
/// <summary> The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. </summary>
[WirePath("properties.pausedDate")]
public DateTimeOffset? PausedOn { get; }
/// <summary> The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. </summary>
[WirePath("properties.resumedDate")]
public DateTimeOffset? ResumedOn { get; }
/// <summary> Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur. </summary>
[WirePath("properties.maintenanceConfigurationId")]
public ResourceIdentifier MaintenanceConfigurationId { get; set; }
/// <summary> Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. </summary>
[WirePath("properties.isLedgerOn")]
public bool? IsLedgerOn { get; set; }
/// <summary> Infra encryption is enabled for this database. </summary>
[WirePath("properties.isInfraEncryptionEnabled")]
public bool? IsInfraEncryptionEnabled { get; }
/// <summary> The Client id used for cross tenant per database CMK scenario. </summary>
[WirePath("properties.federatedClientId")]
public Guid? FederatedClientId { get; set; }
/// <summary> The resource ids of the user assigned identities to use. </summary>
[WirePath("properties.keys")]
public IDictionary<string, SqlDatabaseKey> Keys { get; }
/// <summary> The azure key vault URI of the database if it's configured with per Database Customer Managed Keys. </summary>
[WirePath("properties.encryptionProtector")]
public string EncryptionProtector { get; set; }
/// <summary> Type of enclave requested on the database i.e. Default or VBS enclaves. </summary>
[WirePath("properties.preferredEnclaveType")]
public SqlAlwaysEncryptedEnclaveType? PreferredEnclaveType { get; set; }
/// <summary> Whether or not the database uses free monthly limits. Allowed on one database in a subscription. </summary>
[WirePath("properties.useFreeLimit")]
public bool? UseFreeLimit { get; set; }
/// <summary>
/// Specifies the behavior when monthly free limits are exhausted for the free database.
///
/// AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month.
///
/// BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed.
/// </summary>
[WirePath("properties.freeLimitExhaustionBehavior")]
public FreeLimitExhaustionBehavior? FreeLimitExhaustionBehavior { get; set; }
/// <summary>
/// The resource identifier of the source associated with the create operation of this database.
///
/// This property is only supported for DataWarehouse edition and allows to restore across subscriptions.
///
/// When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover.
///
/// When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or existing sql pool, and restorePointInTime must be specified.
///
/// When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped sql pool.
///
/// When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool.
///
/// When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details about “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant
/// </summary>
[WirePath("properties.sourceResourceId")]
public ResourceIdentifier SourceResourceId { get; set; }
/// <summary>
/// Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier.
///
/// This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier.
///
/// When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database.
///
/// To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state.
/// </summary>
[WirePath("properties.manualCutover")]
public bool? ManualCutover { get; set; }
/// <summary>
/// To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress.
///
/// This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter.
///
/// This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier is already in progress.
///
/// When performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database.
/// </summary>
[WirePath("properties.performCutover")]
public bool? PerformCutover { get; set; }
/// <summary> Specifies the availability zone the database is pinned to. </summary>
[WirePath("properties.availabilityZone")]
public SqlAvailabilityZoneType? AvailabilityZone { get; set; }
/// <summary> The flag to enable or disable auto rotation of database encryption protector AKV key. </summary>
[WirePath("properties.encryptionProtectorAutoRotation")]
public bool? EncryptionProtectorAutoRotation { get; set; }
}
}