Condividi tramite


DatabaseUpdate Class

A database update resource.

Variables are only populated by the server, and will be ignored when sending a request.

Constructor

DatabaseUpdate(*, sku: _models.Sku | None = None, identity: _models.DatabaseIdentity | None = None, tags: dict[str, str] | None = None, create_mode: str | _models.CreateMode | None = None, collation: str | None = None, max_size_bytes: int | None = None, sample_name: str | _models.SampleName | None = None, elastic_pool_id: str | None = None, source_database_id: str | None = None, restore_point_in_time: datetime | None = None, source_database_deletion_date: datetime | None = None, recovery_services_recovery_point_id: str | None = None, long_term_retention_backup_resource_id: str | None = None, recoverable_database_id: str | None = None, restorable_dropped_database_id: str | None = None, catalog_collation: str | _models.CatalogCollationType | None = None, zone_redundant: bool | None = None, license_type: str | _models.DatabaseLicenseType | None = None, read_scale: str | _models.DatabaseReadScale | None = None, high_availability_replica_count: int | None = None, secondary_type: str | _models.SecondaryType | None = None, auto_pause_delay: int | None = None, requested_backup_storage_redundancy: str | _models.BackupStorageRedundancy | None = None, min_capacity: float | None = None, maintenance_configuration_id: str | None = None, is_ledger_on: bool | None = None, federated_client_id: str | None = None, keys: dict[str, '_models.DatabaseKey'] | None = None, encryption_protector: str | None = None, preferred_enclave_type: str | _models.AlwaysEncryptedEnclaveType | None = None, use_free_limit: bool | None = None, free_limit_exhaustion_behavior: str | _models.FreeLimitExhaustionBehavior | None = None, manual_cutover: bool | None = None, perform_cutover: bool | None = None, encryption_protector_auto_rotation: bool | None = None, **kwargs: Any)

Keyword-Only Parameters

Name Description
sku
Sku

The name and tier of the SKU.

Default value: None
identity

Database identity.

Default value: None
tags

Resource tags.

Default value: None
create_mode

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. Known values are: "Default", "Copy", "Secondary", "PointInTimeRestore", "Restore", "Recovery", "RestoreExternalBackup", "RestoreExternalBackupSecondary", "RestoreLongTermRetentionBackup", and "OnlineSecondary".

Default value: None
collation
str

The collation of the database.

Default value: None
max_size_bytes
int

The max size of the database expressed in bytes.

Default value: None
sample_name

The name of the sample schema to apply when creating this database. Known values are: "AdventureWorksLT", "WideWorldImportersStd", and "WideWorldImportersFull".

Default value: None
elastic_pool_id
str

The resource identifier of the elastic pool containing this database.

Default value: None
source_database_id
str

The resource identifier of the source database associated with create operation of this database.

Default value: None
restore_point_in_time

Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.

Default value: None
source_database_deletion_date

Specifies the time that the database was deleted.

Default value: None
recovery_services_recovery_point_id
str

The resource identifier of the recovery point associated with create operation of this database.

Default value: None
long_term_retention_backup_resource_id
str

The resource identifier of the long term retention backup associated with create operation of this database.

Default value: None
recoverable_database_id
str

The resource identifier of the recoverable database associated with create operation of this database.

Default value: None
restorable_dropped_database_id
str

The resource identifier of the restorable dropped database associated with create operation of this database.

Default value: None
catalog_collation

Collation of the metadata catalog. Known values are: "DATABASE_DEFAULT" and "SQL_Latin1_General_CP1_CI_AS".

Default value: None
zone_redundant

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

Default value: None
license_type

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. Known values are: "LicenseIncluded" and "BasePrice".

Default value: None
read_scale

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. Known values are: "Enabled" and "Disabled".

Default value: None
high_availability_replica_count
int

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.

Default value: None
secondary_type

The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby. Known values are: "Geo", "Named", and "Standby".

Default value: None
auto_pause_delay
int

Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled.

Default value: None
requested_backup_storage_redundancy

The storage account type to be used to store backups for this database. Known values are: "Geo", "Local", "Zone", and "GeoZone".

Default value: None
min_capacity

Minimal capacity that database will always have allocated, if not paused.

Default value: None
maintenance_configuration_id
str

Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.

Default value: None
is_ledger_on

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.

Default value: None
federated_client_id
str

The Client id used for cross tenant per database CMK scenario.

Default value: None
keys

The resource ids of the user assigned identities to use.

Default value: None
encryption_protector
str

The azure key vault URI of the database if it's configured with per Database Customer Managed Keys.

Default value: None
preferred_enclave_type

Type of enclave requested on the database i.e. Default or VBS enclaves. Known values are: "Default" and "VBS".

Default value: None
use_free_limit

Whether or not the database uses free monthly limits. Allowed on one database in a subscription.

Default value: None
free_limit_exhaustion_behavior

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. Known values are: "AutoPause" and "BillOverUsage".

Default value: None
manual_cutover

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.

Default value: None
perform_cutover

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.

Default value: None
encryption_protector_auto_rotation

The flag to enable or disable auto rotation of database encryption protector AKV key.

Default value: None

Variables

Name Description
sku
Sku

The name and tier of the SKU.

identity

Database identity.

tags

Resource tags.

create_mode

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. Known values are: "Default", "Copy", "Secondary", "PointInTimeRestore", "Restore", "Recovery", "RestoreExternalBackup", "RestoreExternalBackupSecondary", "RestoreLongTermRetentionBackup", and "OnlineSecondary".

collation
str

The collation of the database.

max_size_bytes
int

The max size of the database expressed in bytes.

sample_name

The name of the sample schema to apply when creating this database. Known values are: "AdventureWorksLT", "WideWorldImportersStd", and "WideWorldImportersFull".

elastic_pool_id
str

The resource identifier of the elastic pool containing this database.

source_database_id
str

The resource identifier of the source database associated with create operation of this database.

status

The status of the database. Known values are: "Online", "Restoring", "RecoveryPending", "Recovering", "Suspect", "Offline", "Standby", "Shutdown", "EmergencyMode", "AutoClosed", "Copying", "Creating", "Inaccessible", "OfflineSecondary", "Pausing", "Paused", "Resuming", "Scaling", "OfflineChangingDwPerformanceTiers", "OnlineChangingDwPerformanceTiers", "Disabled", "Stopping", "Stopped", and "Starting".

database_id
str

The ID of the database.

creation_date

The creation date of the database (ISO8601 format).

current_service_objective_name
str

The current service level objective name of the database.

requested_service_objective_name
str

The requested service level objective name of the database.

default_secondary_location
str

The default secondary region for this database.

failover_group_id
str

Failover Group resource identifier that this database belongs to.

restore_point_in_time

Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.

source_database_deletion_date

Specifies the time that the database was deleted.

recovery_services_recovery_point_id
str

The resource identifier of the recovery point associated with create operation of this database.

long_term_retention_backup_resource_id
str

The resource identifier of the long term retention backup associated with create operation of this database.

recoverable_database_id
str

The resource identifier of the recoverable database associated with create operation of this database.

restorable_dropped_database_id
str

The resource identifier of the restorable dropped database associated with create operation of this database.

catalog_collation

Collation of the metadata catalog. Known values are: "DATABASE_DEFAULT" and "SQL_Latin1_General_CP1_CI_AS".

zone_redundant

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

license_type

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. Known values are: "LicenseIncluded" and "BasePrice".

max_log_size_bytes
int

The max log size for this database.

earliest_restore_date

This records the earliest start date and time that restore is available for this database (ISO8601 format).

read_scale

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. Known values are: "Enabled" and "Disabled".

high_availability_replica_count
int

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.

secondary_type

The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby. Known values are: "Geo", "Named", and "Standby".

current_sku
Sku

The name and tier of the SKU.

auto_pause_delay
int

Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled.

current_backup_storage_redundancy

The storage account type used to store backups for this database. Known values are: "Geo", "Local", "Zone", and "GeoZone".

requested_backup_storage_redundancy

The storage account type to be used to store backups for this database. Known values are: "Geo", "Local", "Zone", and "GeoZone".

min_capacity

Minimal capacity that database will always have allocated, if not paused.

paused_date

The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.

resumed_date

The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.

maintenance_configuration_id
str

Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.

is_ledger_on

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.

is_infra_encryption_enabled

Infra encryption is enabled for this database.

federated_client_id
str

The Client id used for cross tenant per database CMK scenario.

keys

The resource ids of the user assigned identities to use.

encryption_protector
str

The azure key vault URI of the database if it's configured with per Database Customer Managed Keys.

preferred_enclave_type

Type of enclave requested on the database i.e. Default or VBS enclaves. Known values are: "Default" and "VBS".

use_free_limit

Whether or not the database uses free monthly limits. Allowed on one database in a subscription.

free_limit_exhaustion_behavior

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. Known values are: "AutoPause" and "BillOverUsage".

manual_cutover

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.

perform_cutover

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.

encryption_protector_auto_rotation

The flag to enable or disable auto rotation of database encryption protector AKV key.