As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Spanner Admin Database v1 API

class google.cloud.spanner_admin_database_v1.types.Backup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A backup of a Cloud Spanner database.

database

Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form projects/<project>/instances/<instance>/databases/<database>.

Type

str

version_time

The backup will contain an externally consistent copy of the database at the timestamp specified by version_time. If version_time is not specified, the system will set version_time to the create_time of the backup.

Type

google.protobuf.timestamp_pb2.Timestamp

expire_time

Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the expire_time has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.

Type

google.protobuf.timestamp_pb2.Timestamp

name

Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation. Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation.

A globally unique identifier for the backup which cannot be changed. Values are of the form projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9] The final segment of the name must be between 2 and 60 characters in length.

The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form projects/<project>/instances/<instance>.

Type

str

create_time

Output only. The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request is received. If the request does not specify version_time, the version_time of the backup will be equivalent to the create_time.

Type

google.protobuf.timestamp_pb2.Timestamp

size_bytes

Output only. Size of the backup in bytes.

Type

int

state

Output only. The current state of the backup.

Type

google.cloud.spanner_admin_database_v1.types.Backup.State

referencing_databases

Output only. The names of the restored databases that reference the backup. The database names are of the form projects/<project>/instances/<instance>/databases/<database>. Referencing databases may exist in different instances. The existence of any referencing database prevents the backup from being deleted. When a restored database from the backup enters the READY state, the reference to the backup is removed.

Type

MutableSequence[str]

encryption_info

Output only. The encryption information for the backup.

Type

google.cloud.spanner_admin_database_v1.types.EncryptionInfo

database_dialect

Output only. The database dialect information for the backup.

Type

google.cloud.spanner_admin_database_v1.types.DatabaseDialect

referencing_backups

Output only. The names of the destination backups being created by copying this source backup. The backup names are of the form projects/<project>/instances/<instance>/backups/<backup>. Referencing backups may exist in different instances. The existence of any referencing backup prevents the backup from being deleted. When the copy operation is done (either successfully completed or cancelled or the destination backup is deleted), the reference to the backup is removed.

Type

MutableSequence[str]

max_expire_time

Output only. The max allowed expiration time of the backup, with microseconds granularity. A backup’s expiration time can be configured in multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or copying an existing backup, the expiration time specified must be less than Backup.max_expire_time.

Type

google.protobuf.timestamp_pb2.Timestamp

class State(value)[source]

Bases: proto.enums.Enum

Indicates the current state of the backup.

Values:
STATE_UNSPECIFIED (0):

Not specified.

CREATING (1):

The pending backup is still being created. Operations on the backup may fail with FAILED_PRECONDITION in this state.

READY (2):

The backup is complete and ready for use.

class google.cloud.spanner_admin_database_v1.types.BackupInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information about a backup.

backup

Name of the backup.

Type

str

version_time

The backup contains an externally consistent copy of source_database at the timestamp specified by version_time. If the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request did not specify version_time, the version_time of the backup is equivalent to the create_time.

Type

google.protobuf.timestamp_pb2.Timestamp

create_time

The time the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request was received.

Type

google.protobuf.timestamp_pb2.Timestamp

source_database

Name of the database the backup was created from.

Type

str

class google.cloud.spanner_admin_database_v1.types.CopyBackupEncryptionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Encryption configuration for the copied backup.

encryption_type

Required. The encryption type of the backup.

Type

google.cloud.spanner_admin_database_v1.types.CopyBackupEncryptionConfig.EncryptionType

kms_key_name

Optional. The Cloud KMS key that will be used to protect the backup. This field should be set only when [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] is CUSTOMER_MANAGED_ENCRYPTION. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

Type

str

class EncryptionType(value)[source]

Bases: proto.enums.Enum

Encryption types for the backup.

Values:
ENCRYPTION_TYPE_UNSPECIFIED (0):

Unspecified. Do not use.

USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION (1):

This is the default option for [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] when [encryption_config][google.spanner.admin.database.v1.CopyBackupEncryptionConfig] is not specified. For example, if the source backup is using Customer_Managed_Encryption, the backup will be using the same Cloud KMS key as the source backup.

GOOGLE_DEFAULT_ENCRYPTION (2):

Use Google default encryption.

CUSTOMER_MANAGED_ENCRYPTION (3):

Use customer managed encryption. If specified, kms_key_name must contain a valid Cloud KMS key.

class google.cloud.spanner_admin_database_v1.types.CopyBackupMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata type for the google.longrunning.Operation returned by [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup].

name

The name of the backup being created through the copy operation. Values are of the form projects/<project>/instances/<instance>/backups/<backup>.

Type

str

source_backup

The name of the source backup that is being copied. Values are of the form projects/<project>/instances/<instance>/backups/<backup>.

Type

str

progress

The progress of the [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup] operation.

Type

google.cloud.spanner_admin_database_v1.types.OperationProgress

cancel_time

The time at which cancellation of CopyBackup operation was received. [Operations.CancelOperation][google.longrunning.Operations.CancelOperation] starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients can use [Operations.GetOperation][google.longrunning.Operations.GetOperation] or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.spanner_admin_database_v1.types.CopyBackupRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup].

parent

Required. The name of the destination instance that will contain the backup copy. Values are of the form: projects/<project>/instances/<instance>.

Type

str

backup_id

Required. The id of the backup copy. The backup_id appended to parent forms the full backup_uri of the form projects/<project>/instances/<instance>/backups/<backup>.

Type

str

source_backup

Required. The source backup to be copied. The source backup needs to be in READY state for it to be copied. Once CopyBackup is in progress, the source backup cannot be deleted or cleaned up on expiration until CopyBackup is finished. Values are of the form: projects/<project>/instances/<instance>/backups/<backup>.

Type

str

expire_time

Required. The expiration time of the backup in microsecond granularity. The expiration time must be at least 6 hours and at most 366 days from the create_time of the source backup. Once the expire_time has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.

Type

google.protobuf.timestamp_pb2.Timestamp

encryption_config

Optional. The encryption configuration used to encrypt the backup. If this field is not specified, the backup will use the same encryption configuration as the source backup by default, namely [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type] = USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION.

Type

google.cloud.spanner_admin_database_v1.types.CopyBackupEncryptionConfig

class google.cloud.spanner_admin_database_v1.types.CreateBackupEncryptionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Encryption configuration for the backup to create.

encryption_type

Required. The encryption type of the backup.

Type

google.cloud.spanner_admin_database_v1.types.CreateBackupEncryptionConfig.EncryptionType

kms_key_name

Optional. The Cloud KMS key that will be used to protect the backup. This field should be set only when [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] is CUSTOMER_MANAGED_ENCRYPTION. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

Type

str

class EncryptionType(value)[source]

Bases: proto.enums.Enum

Encryption types for the backup.

Values:
ENCRYPTION_TYPE_UNSPECIFIED (0):

Unspecified. Do not use.

USE_DATABASE_ENCRYPTION (1):

Use the same encryption configuration as the database. This is the default option when [encryption_config][google.spanner.admin.database.v1.CreateBackupEncryptionConfig] is empty. For example, if the database is using Customer_Managed_Encryption, the backup will be using the same Cloud KMS key as the database.

GOOGLE_DEFAULT_ENCRYPTION (2):

Use Google default encryption.

CUSTOMER_MANAGED_ENCRYPTION (3):

Use customer managed encryption. If specified, kms_key_name must contain a valid Cloud KMS key.

class google.cloud.spanner_admin_database_v1.types.CreateBackupMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata type for the operation returned by [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup].

name

The name of the backup being created.

Type

str

database

The name of the database the backup is created from.

Type

str

progress

The progress of the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation.

Type

google.cloud.spanner_admin_database_v1.types.OperationProgress

cancel_time

The time at which cancellation of this operation was received. [Operations.CancelOperation][google.longrunning.Operations.CancelOperation] starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients can use [Operations.GetOperation][google.longrunning.Operations.GetOperation] or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.spanner_admin_database_v1.types.CreateBackupRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup].

parent

Required. The name of the instance in which the backup will be created. This must be the same instance that contains the database the backup will be created from. The backup will be stored in the location(s) specified in the instance configuration of this instance. Values are of the form projects/<project>/instances/<instance>.

Type

str

backup_id

Required. The id of the backup to be created. The backup_id appended to parent forms the full backup name of the form projects/<project>/instances/<instance>/backups/<backup_id>.

Type

str

backup

Required. The backup to create.

Type

google.cloud.spanner_admin_database_v1.types.Backup

encryption_config

Optional. The encryption configuration used to encrypt the backup. If this field is not specified, the backup will use the same encryption configuration as the database by default, namely [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type] = USE_DATABASE_ENCRYPTION.

Type

google.cloud.spanner_admin_database_v1.types.CreateBackupEncryptionConfig

class google.cloud.spanner_admin_database_v1.types.CreateDatabaseMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata type for the operation returned by [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].

database

The database being created.

Type

str

class google.cloud.spanner_admin_database_v1.types.CreateDatabaseRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].

parent

Required. The name of the instance that will serve the new database. Values are of the form projects/<project>/instances/<instance>.

Type

str

create_statement

Required. A CREATE DATABASE statement, which specifies the ID of the new database. The database ID must conform to the regular expression [a-z][a-z0-9_\-]*[a-z0-9] and be between 2 and 30 characters in length. If the database ID is a reserved word or if it contains a hyphen, the database ID must be enclosed in backticks (`).

Type

str

extra_statements

Optional. A list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database:

if there is an error in any statement, the database is not created.

Type

MutableSequence[str]

encryption_config

Optional. The encryption configuration for the database. If this field is not specified, Cloud Spanner will encrypt/decrypt all data at rest using Google default encryption.

Type

google.cloud.spanner_admin_database_v1.types.EncryptionConfig

database_dialect

Optional. The dialect of the Cloud Spanner Database.

Type

google.cloud.spanner_admin_database_v1.types.DatabaseDialect

class google.cloud.spanner_admin_database_v1.types.Database(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A Cloud Spanner database.

name

Required. The name of the database. Values are of the form projects/<project>/instances/<instance>/databases/<database>, where <database> is as specified in the CREATE DATABASE statement. This name can be passed to other API methods to identify the database.

Type

str

state

Output only. The current database state.

Type

google.cloud.spanner_admin_database_v1.types.Database.State

create_time

Output only. If exists, the time at which the database creation started.

Type

google.protobuf.timestamp_pb2.Timestamp

restore_info

Output only. Applicable only for restored databases. Contains information about the restore source.

Type

google.cloud.spanner_admin_database_v1.types.RestoreInfo

encryption_config

Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty.

Type

google.cloud.spanner_admin_database_v1.types.EncryptionConfig

encryption_info

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. For databases that are using Google default or other types of encryption, this field is empty.

This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.

Type

MutableSequence[google.cloud.spanner_admin_database_v1.types.EncryptionInfo]

version_retention_period

Output only. The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour, if not set.

Type

str

earliest_version_time

Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.

Type

google.protobuf.timestamp_pb2.Timestamp

default_leader

Output only. The read-write region which contains the database’s leader replicas.

This is the same as the value of default_leader database option set using DatabaseAdmin.CreateDatabase or DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.

Type

str

database_dialect

Output only. The dialect of the Cloud Spanner Database.

Type

google.cloud.spanner_admin_database_v1.types.DatabaseDialect

enable_drop_protection

Whether drop protection is enabled for this database. Defaults to false, if not set.

Type

bool

reconciling

Output only. If true, the database is being updated. If false, there are no ongoing update operations for the database.

Type

bool

class State(value)[source]

Bases: proto.enums.Enum

Indicates the current state of the database.

Values:
STATE_UNSPECIFIED (0):

Not specified.

CREATING (1):

The database is still being created. Operations on the database may fail with FAILED_PRECONDITION in this state.

READY (2):

The database is fully created and ready for use.

READY_OPTIMIZING (3):

The database is fully created and ready for use, but is still being optimized for performance and cannot handle full load.

In this state, the database still references the backup it was restore from, preventing the backup from being deleted. When optimizations are complete, the full performance of the database will be restored, and the database will transition to READY state.

class google.cloud.spanner_admin_database_v1.types.DatabaseDialect(value)[source]

Bases: proto.enums.Enum

Indicates the dialect type of a database.

Values:
DATABASE_DIALECT_UNSPECIFIED (0):

Default value. This value will create a database with the GOOGLE_STANDARD_SQL dialect.

GOOGLE_STANDARD_SQL (1):

Google standard SQL.

POSTGRESQL (2):

PostgreSQL supported SQL.

class google.cloud.spanner_admin_database_v1.types.DatabaseRole(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A Cloud Spanner database role.

name

Required. The name of the database role. Values are of the form projects/<project>/instances/<instance>/databases/<database>/databaseRoles/ {role}, where <role> is as specified in the CREATE ROLE DDL statement. This name can be passed to Get/Set IAMPolicy methods to identify the database role.

Type

str

class google.cloud.spanner_admin_database_v1.types.DdlStatementActionInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Action information extracted from a DDL statement. This proto is used to display the brief info of the DDL statement for the operation [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].

action

The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT, etc. This field is a non-empty string.

Type

str

entity_type

The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc. This field can be empty string for some DDL statement, e.g. for statement “ANALYZE”, entity_type = “”.

Type

str

entity_names

The entity name(s) being operated on the DDL statement. E.g.

  1. For statement “CREATE TABLE t1(…)”, entity_names = [“t1”].

  2. For statement “GRANT ROLE r1, r2 …”, entity_names = [“r1”, “r2”].

  3. For statement “ANALYZE”, entity_names = [].

Type

MutableSequence[str]

class google.cloud.spanner_admin_database_v1.types.DeleteBackupRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup].

name

Required. Name of the backup to delete. Values are of the form projects/<project>/instances/<instance>/backups/<backup>.

Type

str

class google.cloud.spanner_admin_database_v1.types.DropDatabaseRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].

database

Required. The database to be dropped.

Type

str

class google.cloud.spanner_admin_database_v1.types.EncryptionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Encryption configuration for a Cloud Spanner database.

kms_key_name

The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

Type

str

class google.cloud.spanner_admin_database_v1.types.EncryptionInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Encryption information for a Cloud Spanner database or backup.

encryption_type

Output only. The type of encryption.

Type

google.cloud.spanner_admin_database_v1.types.EncryptionInfo.Type

encryption_status

Output only. If present, the status of a recent encrypt/decrypt call on underlying data for this database or backup. Regardless of status, data is always encrypted at rest.

Type

google.rpc.status_pb2.Status

kms_key_version

Output only. A Cloud KMS key version that is being used to protect the database or backup.

Type

str

class Type(value)[source]

Bases: proto.enums.Enum

Possible encryption types.

Values:
TYPE_UNSPECIFIED (0):

Encryption type was not specified, though data at rest remains encrypted.

GOOGLE_DEFAULT_ENCRYPTION (1):

The data is encrypted at rest with a key that is fully managed by Google. No key version or status will be populated. This is the default state.

CUSTOMER_MANAGED_ENCRYPTION (2):

The data is encrypted at rest with a key that is managed by the customer. The active version of the key. kms_key_version will be populated, and encryption_status may be populated.

class google.cloud.spanner_admin_database_v1.types.GetBackupRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup].

name

Required. Name of the backup. Values are of the form projects/<project>/instances/<instance>/backups/<backup>.

Type

str

class google.cloud.spanner_admin_database_v1.types.GetDatabaseDdlRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].

database

Required. The database whose schema we wish to get. Values are of the form projects/<project>/instances/<instance>/databases/<database>

Type

str

class google.cloud.spanner_admin_database_v1.types.GetDatabaseDdlResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The response for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].

statements

A list of formatted DDL statements defining the schema of the database specified in the request.

Type

MutableSequence[str]

class google.cloud.spanner_admin_database_v1.types.GetDatabaseRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].

name

Required. The name of the requested database. Values are of the form projects/<project>/instances/<instance>/databases/<database>.

Type

str

class google.cloud.spanner_admin_database_v1.types.ListBackupOperationsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations].

parent

Required. The instance of the backup operations. Values are of the form projects/<project>/instances/<instance>.

Type

str

filter

An expression that filters the list of returned backup operations.

A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: <, >, <=, >=, !=, =, or :. Colon : is the contains operator. Filter rules are not case sensitive.

The following fields in the [operation][google.longrunning.Operation] are eligible for filtering:

  • name - The name of the long-running operation

  • done - False if the operation is in progress, else true.

  • metadata.@type - the type of metadata. For example, the type string for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata.

  • metadata.<field_name> - any field in metadata.value. metadata.@type must be specified first if filtering on metadata fields.

  • error - Error associated with the long-running operation.

  • response.@type - the type of response.

  • response.<field_name> - any field in response.value.

You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly.

Here are a few examples:

  • done:true - The operation is complete.

  • (metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND metadata.database:prod - Returns operations where:

    • The operation’s metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].

    • The database the backup was taken from has a name containing the string “prod”.

  • (metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND (metadata.name:howl) AND (metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND (error:*) - Returns operations where:

    • The operation’s metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].

    • The backup name contains the string “howl”.

    • The operation started before 2018-03-28T14:50:00Z.

    • The operation resulted in an error.

  • (metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND (metadata.source_backup:test) AND (metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND (error:*) - Returns operations where:

    • The operation’s metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata].

    • The source backup of the copied backup name contains the string “test”.

    • The operation started before 2022-01-18T14:50:00Z.

    • The operation resulted in an error.

  • ((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND (metadata.database:test_db)) OR ((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND (metadata.source_backup:test_bkp)) AND (error:*) - Returns operations where:

    • The operation’s metadata matches either of criteria:

      • The operation’s metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] AND the database the backup was taken from has name containing string “test_db”

      • The operation’s metadata type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] AND the backup the backup was copied from has name containing string “test_bkp”

    • The operation resulted in an error.

Type

str

page_size

Number of operations to be returned in the response. If 0 or less, defaults to the server’s maximum allowed page size.

Type

int

page_token

If non-empty, page_token should contain a [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token] from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the same parent and with the same filter.

Type

str

class google.cloud.spanner_admin_database_v1.types.ListBackupOperationsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The response for [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations].

operations

The list of matching backup [long-running operations][google.longrunning.Operation]. Each operation’s name will be prefixed by the backup’s name. The operation’s [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that are pending or have completed/failed/canceled within the last 7 days. Operations returned are ordered by operation.metadata.value.progress.start_time in descending order starting from the most recently started operation.

Type

MutableSequence[google.longrunning.operations_pb2.Operation]

next_page_token

next_page_token can be sent in a subsequent [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations] call to fetch more of the matching metadata.

Type

str

class google.cloud.spanner_admin_database_v1.types.ListBackupsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].

parent

Required. The instance to list backups from. Values are of the form projects/<project>/instances/<instance>.

Type

str

filter

An expression that filters the list of returned backups.

A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: <, >, <=, >=, !=, =, or :. Colon : is the contains operator. Filter rules are not case sensitive.

The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering:

  • name

  • database

  • state

  • create_time (and values are of the format YYYY-MM-DDTHH:MM:SSZ)

  • expire_time (and values are of the format YYYY-MM-DDTHH:MM:SSZ)

  • version_time (and values are of the format YYYY-MM-DDTHH:MM:SSZ)

  • size_bytes

You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly.

Here are a few examples:

  • name:Howl - The backup’s name contains the string “howl”.

  • database:prod - The database’s name contains the string “prod”.

  • state:CREATING - The backup is pending creation.

  • state:READY - The backup is fully created and ready for use.

  • (name:howl) AND (create_time < \"2018-03-28T14:50:00Z\") - The backup name contains the string “howl” and create_time of the backup is before 2018-03-28T14:50:00Z.

  • expire_time < \"2018-03-28T14:50:00Z\" - The backup expire_time is before 2018-03-28T14:50:00Z.

  • size_bytes > 10000000000 - The backup’s size is greater than 10GB

Type

str

page_size

Number of backups to be returned in the response. If 0 or less, defaults to the server’s maximum allowed page size.

Type

int

page_token

If non-empty, page_token should contain a [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same parent and with the same filter.

Type

str

class google.cloud.spanner_admin_database_v1.types.ListBackupsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The response for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].

backups

The list of matching backups. Backups returned are ordered by create_time in descending order, starting from the most recent create_time.

Type

MutableSequence[google.cloud.spanner_admin_database_v1.types.Backup]

next_page_token

next_page_token can be sent in a subsequent [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more of the matching backups.

Type

str

class google.cloud.spanner_admin_database_v1.types.ListDatabaseOperationsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations].

parent

Required. The instance of the database operations. Values are of the form projects/<project>/instances/<instance>.

Type

str

filter

An expression that filters the list of returned operations.

A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: <, >, <=, >=, !=, =, or :. Colon : is the contains operator. Filter rules are not case sensitive.

The following fields in the [Operation][google.longrunning.Operation] are eligible for filtering:

  • name - The name of the long-running operation

  • done - False if the operation is in progress, else true.

  • metadata.@type - the type of metadata. For example, the type string for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata.

  • metadata.<field_name> - any field in metadata.value. metadata.@type must be specified first, if filtering on metadata fields.

  • error - Error associated with the long-running operation.

  • response.@type - the type of response.

  • response.<field_name> - any field in response.value.

You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly.

Here are a few examples:

  • done:true - The operation is complete.

  • (metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND (metadata.source_type:BACKUP) AND (metadata.backup_info.backup:backup_howl) AND (metadata.name:restored_howl) AND (metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND (error:*) - Return operations where:

    • The operation’s metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].

    • The database is restored from a backup.

    • The backup name contains “backup_howl”.

    • The restored database’s name contains “restored_howl”.

    • The operation started before 2018-03-28T14:50:00Z.

    • The operation resulted in an error.

Type

str

page_size

Number of operations to be returned in the response. If 0 or less, defaults to the server’s maximum allowed page size.

Type

int

page_token

If non-empty, page_token should contain a [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token] from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the same parent and with the same filter.

Type

str

class google.cloud.spanner_admin_database_v1.types.ListDatabaseOperationsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The response for [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations].

operations

The list of matching database [long-running operations][google.longrunning.Operation]. Each operation’s name will be prefixed by the database’s name. The operation’s [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata.

Type

MutableSequence[google.longrunning.operations_pb2.Operation]

next_page_token

next_page_token can be sent in a subsequent [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations] call to fetch more of the matching metadata.

Type

str

class google.cloud.spanner_admin_database_v1.types.ListDatabaseRolesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles].

parent

Required. The database whose roles should be listed. Values are of the form projects/<project>/instances/<instance>/databases/<database>/databaseRoles.

Type

str

page_size

Number of database roles to be returned in the response. If 0 or less, defaults to the server’s maximum allowed page size.

Type

int

page_token

If non-empty, page_token should contain a [next_page_token][google.spanner.admin.database.v1.ListDatabaseRolesResponse.next_page_token] from a previous [ListDatabaseRolesResponse][google.spanner.admin.database.v1.ListDatabaseRolesResponse].

Type

str

class google.cloud.spanner_admin_database_v1.types.ListDatabaseRolesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The response for [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles].

database_roles

Database roles that matched the request.

Type

MutableSequence[google.cloud.spanner_admin_database_v1.types.DatabaseRole]

next_page_token

next_page_token can be sent in a subsequent [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles] call to fetch more of the matching roles.

Type

str

class google.cloud.spanner_admin_database_v1.types.ListDatabasesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].

parent

Required. The instance whose databases should be listed. Values are of the form projects/<project>/instances/<instance>.

Type

str

page_size

Number of databases to be returned in the response. If 0 or less, defaults to the server’s maximum allowed page size.

Type

int

page_token

If non-empty, page_token should contain a [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].

Type

str

class google.cloud.spanner_admin_database_v1.types.ListDatabasesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The response for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].

databases

Databases that matched the request.

Type

MutableSequence[google.cloud.spanner_admin_database_v1.types.Database]

next_page_token

next_page_token can be sent in a subsequent [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more of the matching databases.

Type

str

class google.cloud.spanner_admin_database_v1.types.OperationProgress(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Encapsulates progress related information for a Cloud Spanner long running operation.

progress_percent

Percent completion of the operation. Values are between 0 and 100 inclusive.

Type

int

start_time

Time the request was received.

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

If set, the time at which this operation failed or was completed successfully.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.spanner_admin_database_v1.types.OptimizeRestoredDatabaseMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata type for the long-running operation used to track the progress of optimizations performed on a newly restored database. This long-running operation is automatically created by the system after the successful completion of a database restore, and cannot be cancelled.

name

Name of the restored database being optimized.

Type

str

progress

The progress of the post-restore optimizations.

Type

google.cloud.spanner_admin_database_v1.types.OperationProgress

class google.cloud.spanner_admin_database_v1.types.RestoreDatabaseEncryptionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Encryption configuration for the restored database.

encryption_type

Required. The encryption type of the restored database.

Type

google.cloud.spanner_admin_database_v1.types.RestoreDatabaseEncryptionConfig.EncryptionType

kms_key_name

Optional. The Cloud KMS key that will be used to encrypt/decrypt the restored database. This field should be set only when [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] is CUSTOMER_MANAGED_ENCRYPTION. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

Type

str

class EncryptionType(value)[source]

Bases: proto.enums.Enum

Encryption types for the database to be restored.

Values:
ENCRYPTION_TYPE_UNSPECIFIED (0):

Unspecified. Do not use.

USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION (1):

This is the default option when [encryption_config][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig] is not specified.

GOOGLE_DEFAULT_ENCRYPTION (2):

Use Google default encryption.

CUSTOMER_MANAGED_ENCRYPTION (3):

Use customer managed encryption. If specified, kms_key_name must must contain a valid Cloud KMS key.

class google.cloud.spanner_admin_database_v1.types.RestoreDatabaseMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata type for the long-running operation returned by [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase].

name

Name of the database being created and restored to.

Type

str

source_type

The type of the restore source.

Type

google.cloud.spanner_admin_database_v1.types.RestoreSourceType

backup_info

Information about the backup used to restore the database.

This field is a member of oneof source_info.

Type

google.cloud.spanner_admin_database_v1.types.BackupInfo

progress

The progress of the [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase] operation.

Type

google.cloud.spanner_admin_database_v1.types.OperationProgress

cancel_time

The time at which cancellation of this operation was received. [Operations.CancelOperation][google.longrunning.Operations.CancelOperation] starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients can use [Operations.GetOperation][google.longrunning.Operations.GetOperation] or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED.

Type

google.protobuf.timestamp_pb2.Timestamp

optimize_database_operation_name

If exists, the name of the long-running operation that will be used to track the post-restore optimization process to optimize the performance of the restored database, and remove the dependency on the restore source. The name is of the form projects/<project>/instances/<instance>/databases/<database>/operations/<operation> where the is the name of database being created and restored to. The metadata type of the long-running operation is [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be automatically created by the system after the RestoreDatabase long-running operation completes successfully. This operation will not be created if the restore was not successful.

Type

str

class google.cloud.spanner_admin_database_v1.types.RestoreDatabaseRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase].

parent

Required. The name of the instance in which to create the restored database. This instance must be in the same project and have the same instance configuration as the instance containing the source backup. Values are of the form projects/<project>/instances/<instance>.

Type

str

database_id

Required. The id of the database to create and restore to. This database must not already exist. The database_id appended to parent forms the full database name of the form projects/<project>/instances/<instance>/databases/<database_id>.

Type

str

backup

Name of the backup from which to restore. Values are of the form projects/<project>/instances/<instance>/backups/<backup>.

This field is a member of oneof source.

Type

str

encryption_config

Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely [encryption_type][google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.encryption_type] = USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION.

Type

google.cloud.spanner_admin_database_v1.types.RestoreDatabaseEncryptionConfig

class google.cloud.spanner_admin_database_v1.types.RestoreInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information about the database restore.

source_type

The type of the restore source.

Type

google.cloud.spanner_admin_database_v1.types.RestoreSourceType

backup_info

Information about the backup used to restore the database. The backup may no longer exist.

This field is a member of oneof source_info.

Type

google.cloud.spanner_admin_database_v1.types.BackupInfo

class google.cloud.spanner_admin_database_v1.types.RestoreSourceType(value)[source]

Bases: proto.enums.Enum

Indicates the type of the restore source.

Values:
TYPE_UNSPECIFIED (0):

No restore associated.

BACKUP (1):

A backup was used as the source of the restore.

class google.cloud.spanner_admin_database_v1.types.UpdateBackupRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup].

backup

Required. The backup to update. backup.name, and the fields to be updated as specified by update_mask are required. Other fields are ignored. Update is only supported for the following fields:

  • backup.expire_time.

Type

google.cloud.spanner_admin_database_v1.types.Backup

update_mask

Required. A mask specifying which fields (e.g. expire_time) in the Backup resource should be updated. This mask is relative to the Backup resource, not to the request message. The field mask must always be specified; this prevents any future fields from being erased accidentally by clients that do not know about them.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.cloud.spanner_admin_database_v1.types.UpdateDatabaseDdlMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata type for the operation returned by [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].

database

The database being modified.

Type

str

statements

For an update this list contains all the statements. For an individual statement, this list contains only that statement.

Type

MutableSequence[str]

commit_timestamps

Reports the commit timestamps of all statements that have succeeded so far, where commit_timestamps[i] is the commit timestamp for the statement statements[i].

Type

MutableSequence[google.protobuf.timestamp_pb2.Timestamp]

throttled

Output only. When true, indicates that the operation is throttled e.g. due to resource constraints. When resources become available the operation will resume and this field will be false again.

Type

bool

progress

The progress of the [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] operations. All DDL statements will have continuously updating progress, and progress[i] is the operation progress for statements[i]. Also, progress[i] will have start time and end time populated with commit timestamp of operation, as well as a progress of 100% once the operation has completed.

Type

MutableSequence[google.cloud.spanner_admin_database_v1.types.OperationProgress]

actions

The brief action info for the DDL statements. actions[i] is the brief info for statements[i].

Type

MutableSequence[google.cloud.spanner_admin_database_v1.types.DdlStatementActionInfo]

class google.cloud.spanner_admin_database_v1.types.UpdateDatabaseDdlRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Enqueues the given DDL statements to be applied, in order but not necessarily all at once, to the database schema at some point (or points) in the future. The server checks that the statements are executable (syntactically valid, name tables that exist, etc.) before enqueueing them, but they may still fail upon later execution (e.g., if a statement from another batch of statements is applied first and it conflicts in some way, or if there is some data-related problem like a NULL value in a column to which NOT NULL would be added). If a statement fails, all subsequent statements in the batch are automatically cancelled.

Each batch of statements is assigned a name which can be used with the [Operations][google.longrunning.Operations] API to monitor progress. See the [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more details.

database

Required. The database to update.

Type

str

statements

Required. DDL statements to be applied to the database.

Type

MutableSequence[str]

operation_id

If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, operation_id is used to construct the name of the resulting [Operation][google.longrunning.Operation].

Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed, or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and operation_id fields can be combined to form the [name][google.longrunning.Operation.name] of the resulting [longrunning.Operation][google.longrunning.Operation]: <database>/operations/<operation_id>.

operation_id should be unique within the database, and must be a valid identifier: [a-z][a-z0-9_]*. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns ALREADY_EXISTS.

Type

str

class google.cloud.spanner_admin_database_v1.types.UpdateDatabaseMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata type for the operation returned by [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase].

request

The request for [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase].

Type

google.cloud.spanner_admin_database_v1.types.UpdateDatabaseRequest

progress

The progress of the [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase] operation.

Type

google.cloud.spanner_admin_database_v1.types.OperationProgress

cancel_time

The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is best-effort).

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.spanner_admin_database_v1.types.UpdateDatabaseRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for [UpdateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase].

database

Required. The database to update. The name field of the database is of the form projects/<project>/instances/<instance>/databases/<database>.

Type

google.cloud.spanner_admin_database_v1.types.Database

update_mask

Required. The list of fields to update. Currently, only enable_drop_protection field can be updated.

Type

google.protobuf.field_mask_pb2.FieldMask