|
25 | 25 | * Type representing Database. |
26 | 26 | */ |
27 | 27 | public interface Database extends HasInner<DatabaseInner>, Indexable, Refreshable<Database>, Updatable<Database.Update>, HasManager<SqlManager> { |
| 28 | + /** |
| 29 | + * @return the autoPauseDelay value. |
| 30 | + */ |
| 31 | + Integer autoPauseDelay(); |
| 32 | + |
28 | 33 | /** |
29 | 34 | * @return the catalogCollation value. |
30 | 35 | */ |
@@ -120,11 +125,26 @@ public interface Database extends HasInner<DatabaseInner>, Indexable, Refreshabl |
120 | 125 | */ |
121 | 126 | Long maxSizeBytes(); |
122 | 127 |
|
| 128 | + /** |
| 129 | + * @return the minCapacity value. |
| 130 | + */ |
| 131 | + Double minCapacity(); |
| 132 | + |
123 | 133 | /** |
124 | 134 | * @return the name value. |
125 | 135 | */ |
126 | 136 | String name(); |
127 | 137 |
|
| 138 | + /** |
| 139 | + * @return the pausedDate value. |
| 140 | + */ |
| 141 | + DateTime pausedDate(); |
| 142 | + |
| 143 | + /** |
| 144 | + * @return the readReplicaCount value. |
| 145 | + */ |
| 146 | + Integer readReplicaCount(); |
| 147 | + |
128 | 148 | /** |
129 | 149 | * @return the readScale value. |
130 | 150 | */ |
@@ -155,6 +175,11 @@ public interface Database extends HasInner<DatabaseInner>, Indexable, Refreshabl |
155 | 175 | */ |
156 | 176 | DateTime restorePointInTime(); |
157 | 177 |
|
| 178 | + /** |
| 179 | + * @return the resumedDate value. |
| 180 | + */ |
| 181 | + DateTime resumedDate(); |
| 182 | + |
158 | 183 | /** |
159 | 184 | * @return the sampleName value. |
160 | 185 | */ |
@@ -236,6 +261,18 @@ interface WithLocation { |
236 | 261 | WithCreate withLocation(String location); |
237 | 262 | } |
238 | 263 |
|
| 264 | + /** |
| 265 | + * The stage of the database definition allowing to specify AutoPauseDelay. |
| 266 | + */ |
| 267 | + interface WithAutoPauseDelay { |
| 268 | + /** |
| 269 | + * Specifies autoPauseDelay. |
| 270 | + * @param autoPauseDelay Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled |
| 271 | + * @return the next definition stage |
| 272 | + */ |
| 273 | + WithCreate withAutoPauseDelay(Integer autoPauseDelay); |
| 274 | + } |
| 275 | + |
239 | 276 | /** |
240 | 277 | * The stage of the database definition allowing to specify CatalogCollation. |
241 | 278 | */ |
@@ -298,7 +335,7 @@ interface WithElasticPoolId { |
298 | 335 | interface WithLicenseType { |
299 | 336 | /** |
300 | 337 | * Specifies licenseType. |
301 | | - * @param licenseType The license type to apply for this database. Possible values include: 'LicenseIncluded', 'BasePrice' |
| 338 | + * @param 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. Possible values include: 'LicenseIncluded', 'BasePrice' |
302 | 339 | * @return the next definition stage |
303 | 340 | */ |
304 | 341 | WithCreate withLicenseType(DatabaseLicenseType licenseType); |
@@ -328,13 +365,37 @@ interface WithMaxSizeBytes { |
328 | 365 | WithCreate withMaxSizeBytes(Long maxSizeBytes); |
329 | 366 | } |
330 | 367 |
|
| 368 | + /** |
| 369 | + * The stage of the database definition allowing to specify MinCapacity. |
| 370 | + */ |
| 371 | + interface WithMinCapacity { |
| 372 | + /** |
| 373 | + * Specifies minCapacity. |
| 374 | + * @param minCapacity Minimal capacity that database will always have allocated, if not paused |
| 375 | + * @return the next definition stage |
| 376 | + */ |
| 377 | + WithCreate withMinCapacity(Double minCapacity); |
| 378 | + } |
| 379 | + |
| 380 | + /** |
| 381 | + * The stage of the database definition allowing to specify ReadReplicaCount. |
| 382 | + */ |
| 383 | + interface WithReadReplicaCount { |
| 384 | + /** |
| 385 | + * Specifies readReplicaCount. |
| 386 | + * @param readReplicaCount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases |
| 387 | + * @return the next definition stage |
| 388 | + */ |
| 389 | + WithCreate withReadReplicaCount(Integer readReplicaCount); |
| 390 | + } |
| 391 | + |
331 | 392 | /** |
332 | 393 | * The stage of the database definition allowing to specify ReadScale. |
333 | 394 | */ |
334 | 395 | interface WithReadScale { |
335 | 396 | /** |
336 | 397 | * Specifies readScale. |
337 | | - * @param 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. Possible values include: 'Enabled', 'Disabled' |
| 398 | + * @param readScale If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases. Possible values include: 'Enabled', 'Disabled' |
338 | 399 | * @return the next definition stage |
339 | 400 | */ |
340 | 401 | WithCreate withReadScale(DatabaseReadScale readScale); |
@@ -406,7 +467,14 @@ interface WithSampleName { |
406 | 467 | interface WithSku { |
407 | 468 | /** |
408 | 469 | * Specifies sku. |
409 | | - * @param sku The name and tier of the SKU |
| 470 | + * @param sku The database SKU. |
| 471 | + 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: |
| 472 | + ```azurecli |
| 473 | + az sql db list-editions -l <location> -o table |
| 474 | + ```` |
| 475 | + ```powershell |
| 476 | + Get-AzSqlServerServiceObjective -Location <location> |
| 477 | + ```` |
410 | 478 | * @return the next definition stage |
411 | 479 | */ |
412 | 480 | WithCreate withSku(Sku sku); |
@@ -465,19 +533,31 @@ interface WithZoneRedundant { |
465 | 533 | * the resource to be created (via {@link WithCreate#create()}), but also allows |
466 | 534 | * for any other optional settings to be specified. |
467 | 535 | */ |
468 | | - interface WithCreate extends Creatable<Database>, DefinitionStages.WithCatalogCollation, DefinitionStages.WithCollation, DefinitionStages.WithCreateMode, DefinitionStages.WithElasticPoolId, DefinitionStages.WithLicenseType, DefinitionStages.WithLongTermRetentionBackupResourceId, DefinitionStages.WithMaxSizeBytes, DefinitionStages.WithReadScale, DefinitionStages.WithRecoverableDatabaseId, DefinitionStages.WithRecoveryServicesRecoveryPointId, DefinitionStages.WithRestorableDroppedDatabaseId, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSampleName, DefinitionStages.WithSku, DefinitionStages.WithSourceDatabaseDeletionDate, DefinitionStages.WithSourceDatabaseId, DefinitionStages.WithTags, DefinitionStages.WithZoneRedundant { |
| 536 | + interface WithCreate extends Creatable<Database>, DefinitionStages.WithAutoPauseDelay, DefinitionStages.WithCatalogCollation, DefinitionStages.WithCollation, DefinitionStages.WithCreateMode, DefinitionStages.WithElasticPoolId, DefinitionStages.WithLicenseType, DefinitionStages.WithLongTermRetentionBackupResourceId, DefinitionStages.WithMaxSizeBytes, DefinitionStages.WithMinCapacity, DefinitionStages.WithReadReplicaCount, DefinitionStages.WithReadScale, DefinitionStages.WithRecoverableDatabaseId, DefinitionStages.WithRecoveryServicesRecoveryPointId, DefinitionStages.WithRestorableDroppedDatabaseId, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSampleName, DefinitionStages.WithSku, DefinitionStages.WithSourceDatabaseDeletionDate, DefinitionStages.WithSourceDatabaseId, DefinitionStages.WithTags, DefinitionStages.WithZoneRedundant { |
469 | 537 | } |
470 | 538 | } |
471 | 539 | /** |
472 | 540 | * The template for a Database update operation, containing all the settings that can be modified. |
473 | 541 | */ |
474 | | - interface Update extends Appliable<Database>, UpdateStages.WithCatalogCollation, UpdateStages.WithCollation, UpdateStages.WithCreateMode, UpdateStages.WithElasticPoolId, UpdateStages.WithLicenseType, UpdateStages.WithLongTermRetentionBackupResourceId, UpdateStages.WithMaxSizeBytes, UpdateStages.WithReadScale, UpdateStages.WithRecoverableDatabaseId, UpdateStages.WithRecoveryServicesRecoveryPointId, UpdateStages.WithRestorableDroppedDatabaseId, UpdateStages.WithRestorePointInTime, UpdateStages.WithSampleName, UpdateStages.WithSku, UpdateStages.WithSourceDatabaseDeletionDate, UpdateStages.WithSourceDatabaseId, UpdateStages.WithTags, UpdateStages.WithZoneRedundant { |
| 542 | + interface Update extends Appliable<Database>, UpdateStages.WithAutoPauseDelay, UpdateStages.WithCatalogCollation, UpdateStages.WithCollation, UpdateStages.WithCreateMode, UpdateStages.WithElasticPoolId, UpdateStages.WithLicenseType, UpdateStages.WithLongTermRetentionBackupResourceId, UpdateStages.WithMaxSizeBytes, UpdateStages.WithMinCapacity, UpdateStages.WithReadReplicaCount, UpdateStages.WithReadScale, UpdateStages.WithRecoverableDatabaseId, UpdateStages.WithRecoveryServicesRecoveryPointId, UpdateStages.WithRestorableDroppedDatabaseId, UpdateStages.WithRestorePointInTime, UpdateStages.WithSampleName, UpdateStages.WithSku, UpdateStages.WithSourceDatabaseDeletionDate, UpdateStages.WithSourceDatabaseId, UpdateStages.WithTags, UpdateStages.WithZoneRedundant { |
475 | 543 | } |
476 | 544 |
|
477 | 545 | /** |
478 | 546 | * Grouping of Database update stages. |
479 | 547 | */ |
480 | 548 | interface UpdateStages { |
| 549 | + /** |
| 550 | + * The stage of the database update allowing to specify AutoPauseDelay. |
| 551 | + */ |
| 552 | + interface WithAutoPauseDelay { |
| 553 | + /** |
| 554 | + * Specifies autoPauseDelay. |
| 555 | + * @param autoPauseDelay Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled |
| 556 | + * @return the next update stage |
| 557 | + */ |
| 558 | + Update withAutoPauseDelay(Integer autoPauseDelay); |
| 559 | + } |
| 560 | + |
481 | 561 | /** |
482 | 562 | * The stage of the database update allowing to specify CatalogCollation. |
483 | 563 | */ |
@@ -540,7 +620,7 @@ interface WithElasticPoolId { |
540 | 620 | interface WithLicenseType { |
541 | 621 | /** |
542 | 622 | * Specifies licenseType. |
543 | | - * @param licenseType The license type to apply for this database. Possible values include: 'LicenseIncluded', 'BasePrice' |
| 623 | + * @param 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. Possible values include: 'LicenseIncluded', 'BasePrice' |
544 | 624 | * @return the next update stage |
545 | 625 | */ |
546 | 626 | Update withLicenseType(DatabaseLicenseType licenseType); |
@@ -570,13 +650,37 @@ interface WithMaxSizeBytes { |
570 | 650 | Update withMaxSizeBytes(Long maxSizeBytes); |
571 | 651 | } |
572 | 652 |
|
| 653 | + /** |
| 654 | + * The stage of the database update allowing to specify MinCapacity. |
| 655 | + */ |
| 656 | + interface WithMinCapacity { |
| 657 | + /** |
| 658 | + * Specifies minCapacity. |
| 659 | + * @param minCapacity Minimal capacity that database will always have allocated, if not paused |
| 660 | + * @return the next update stage |
| 661 | + */ |
| 662 | + Update withMinCapacity(Double minCapacity); |
| 663 | + } |
| 664 | + |
| 665 | + /** |
| 666 | + * The stage of the database update allowing to specify ReadReplicaCount. |
| 667 | + */ |
| 668 | + interface WithReadReplicaCount { |
| 669 | + /** |
| 670 | + * Specifies readReplicaCount. |
| 671 | + * @param readReplicaCount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases |
| 672 | + * @return the next update stage |
| 673 | + */ |
| 674 | + Update withReadReplicaCount(Integer readReplicaCount); |
| 675 | + } |
| 676 | + |
573 | 677 | /** |
574 | 678 | * The stage of the database update allowing to specify ReadScale. |
575 | 679 | */ |
576 | 680 | interface WithReadScale { |
577 | 681 | /** |
578 | 682 | * Specifies readScale. |
579 | | - * @param 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. Possible values include: 'Enabled', 'Disabled' |
| 683 | + * @param readScale If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases. Possible values include: 'Enabled', 'Disabled' |
580 | 684 | * @return the next update stage |
581 | 685 | */ |
582 | 686 | Update withReadScale(DatabaseReadScale readScale); |
|
0 commit comments