Condividi tramite


ManagedDatabaseUpdate Class

An managed database update.

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

Constructor

ManagedDatabaseUpdate(*, tags: dict[str, str] | None = None, collation: str | None = None, restore_point_in_time: datetime | None = None, catalog_collation: str | _models.CatalogCollationType | None = None, create_mode: str | _models.ManagedDatabaseCreateMode | None = None, storage_container_uri: str | None = None, source_database_id: str | None = None, cross_subscription_source_database_id: str | None = None, restorable_dropped_database_id: str | None = None, cross_subscription_restorable_dropped_database_id: str | None = None, storage_container_identity: str | None = None, storage_container_sas_token: str | None = None, recoverable_database_id: str | None = None, long_term_retention_backup_resource_id: str | None = None, auto_complete_restore: bool | None = None, last_backup_name: str | None = None, cross_subscription_target_managed_instance_id: str | None = None, is_ledger_on: bool | None = None, **kwargs: Any)

Keyword-Only Parameters

Name Description
tags

Resource tags.

Default value: None
collation
str

Collation of the managed database.

Default value: None
restore_point_in_time

Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new 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
create_mode

Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required). Known values are: "Default", "RestoreExternalBackup", "PointInTimeRestore", "Recovery", and "RestoreLongTermRetentionBackup".

Default value: None
storage_container_uri
str

Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.

Default value: None
source_database_id
str

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

Default value: None
cross_subscription_source_database_id
str

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

Default value: None
restorable_dropped_database_id
str

The restorable dropped database resource id to restore when creating this database.

Default value: None
cross_subscription_restorable_dropped_database_id
str

The restorable cross-subscription dropped database resource id to restore when creating this database.

Default value: None
storage_container_identity
str

Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed.

Default value: None
storage_container_sas_token
str

Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token.

Default value: None
recoverable_database_id
str

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

Default value: None
long_term_retention_backup_resource_id
str

The name of the Long Term Retention backup to be used for restore of this managed database.

Default value: None
auto_complete_restore

Whether to auto complete restore of this managed database.

Default value: None
last_backup_name
str

Last backup file name for restore of this managed database.

Default value: None
cross_subscription_target_managed_instance_id
str

Target managed instance id used in cross-subscription restore.

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

Variables

Name Description
tags

Resource tags.

collation
str

Collation of the managed database.

status

Status of the database. Known values are: "Online", "Offline", "Shutdown", "Creating", "Inaccessible", "Restoring", "Updating", "Stopping", "Stopped", "Starting", "DbMoving", and "DbCopying".

creation_date

Creation date of the database.

earliest_restore_point

Earliest restore point in time for point in time restore.

restore_point_in_time

Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.

default_secondary_location
str

Geo paired region.

catalog_collation

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

create_mode

Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required). Known values are: "Default", "RestoreExternalBackup", "PointInTimeRestore", "Recovery", and "RestoreLongTermRetentionBackup".

storage_container_uri
str

Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.

source_database_id
str

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

cross_subscription_source_database_id
str

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

restorable_dropped_database_id
str

The restorable dropped database resource id to restore when creating this database.

cross_subscription_restorable_dropped_database_id
str

The restorable cross-subscription dropped database resource id to restore when creating this database.

storage_container_identity
str

Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed.

storage_container_sas_token
str

Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token.

failover_group_id
str

Instance Failover Group resource identifier that this managed database belongs to.

recoverable_database_id
str

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

long_term_retention_backup_resource_id
str

The name of the Long Term Retention backup to be used for restore of this managed database.

auto_complete_restore

Whether to auto complete restore of this managed database.

last_backup_name
str

Last backup file name for restore of this managed database.

cross_subscription_target_managed_instance_id
str

Target managed instance id used in cross-subscription restore.

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.