Service Client: Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::DatabaseAdminClient

Client stub representing the remote DatabaseAdmin gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to spanner.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin - Compiled Protocol Buffers messages for google/spanner/admin/database/v1/spanner_database_admin.proto

SYNOPSIS

use Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin;

my $msg = Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::RestoreInfo->new({
    source_type => $source_type,
    backup_info => $backup_info,
});

# Read or update a field
my $val = $msg->source_type();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::RestoreInfo->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/spanner/admin/database/v1/spanner_database_admin.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::RestoreInfo

Information about the database restore.

Inherits from Protobuf::Message.

Accessors

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::Database

A Cloud Spanner database.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    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.

  • $msg->state() / $msg->state($value)

    Type: Enum (Google::Spanner::Admin::Database::V1::Database::State)

    Output only. The current database state.

  • $msg->create_time() / $msg->create_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

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

  • $msg->restore_info() / $msg->restore_info($value)

    Type: Message (Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::RestoreInfo)

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

  • $msg->encryption_config() / $msg->encryption_config($value)

    Type: Message (Google::Spanner::Admin::Database::V1::Common::EncryptionConfig)

    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.

  • $msg->encryption_info() / $msg->encryption_info($value)

    Type: Message (Google::Spanner::Admin::Database::V1::Common::EncryptionInfo)

    Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The `encryption_status' field inside of each `EncryptionInfo` is not populated.

    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.

  • $msg->version_retention_period() / $msg->version_retention_period($value)

    Type: String

    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.

  • $msg->earliest_version_time() / $msg->earliest_version_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    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.

  • $msg->default_leader() / $msg->default_leader($value)

    Type: String

    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.

  • $msg->database_dialect() / $msg->database_dialect($value)

    Type: Enum (Google::Spanner::Admin::Database::V1::DatabaseDialect)

    Output only. The dialect of the Cloud Spanner Database.

  • $msg->enable_drop_protection() / $msg->enable_drop_protection($value)

    Type: Bool

    Whether drop protection is enabled for this database. Defaults to false, if not set. For more details, please see how to [prevent accidental database deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion).

  • $msg->reconciling() / $msg->reconciling($value)

    Type: Bool

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

Enum: Database::State

  • STATE_UNSPECIFIED => 0

  • CREATING => 1

  • READY => 2

  • READY_OPTIMIZING => 3

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::ListDatabasesRequest

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

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

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

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

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

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    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].

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::ListDatabasesResponse

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

Inherits from Protobuf::Message.

Accessors

  • $msg->databases() / $msg->databases($value)

    Type: Message (Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::Database)

    Databases that matched the request.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    `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.

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::CreateDatabaseRequest

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

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

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

  • $msg->create_statement() / $msg->create_statement($value)

    Type: String

    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 (`` ` ``).

  • $msg->extra_statements() / $msg->extra_statements($value)

    Type: String

    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.

  • $msg->encryption_config() / $msg->encryption_config($value)

    Type: Message (Google::Spanner::Admin::Database::V1::Common::EncryptionConfig)

    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.

  • $msg->database_dialect() / $msg->database_dialect($value)

    Type: Enum (Google::Spanner::Admin::Database::V1::DatabaseDialect)

    Optional. The dialect of the Cloud Spanner Database.

  • $msg->proto_descriptors() / $msg->proto_descriptors($value)

    Type: Bytes

    Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in 'extra_statements' above. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). To generate it, [install](https://grpc.io/docs/protoc-installation/) and run `protoc` with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \ --include_imports \ --descriptor_set_out=descriptors.data \ moon/shot/app.proto ``` For more details, see protobuffer [self description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::CreateDatabaseMetadata

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

Inherits from Protobuf::Message.

Accessors

  • $msg->database() / $msg->database($value)

    Type: String

    The database being created.

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::GetDatabaseRequest

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

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

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

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::UpdateDatabaseRequest

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

Inherits from Protobuf::Message.

Accessors

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::UpdateDatabaseMetadata

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

Inherits from Protobuf::Message.

Accessors

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::UpdateDatabaseDdlRequest

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.

Inherits from Protobuf::Message.

Accessors

  • $msg->database() / $msg->database($value)

    Type: String

    Required. The database to update.

  • $msg->statements() / $msg->statements($value)

    Type: String

    Required. DDL statements to be applied to the database.

  • $msg->operation_id() / $msg->operation_id($value)

    Type: String

    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`.

  • $msg->proto_descriptors() / $msg->proto_descriptors($value)

    Type: Bytes

    Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). To generate it, [install](https://grpc.io/docs/protoc-installation/) and run `protoc` with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \ --include_imports \ --descriptor_set_out=descriptors.data \ moon/shot/app.proto ``` For more details, see protobuffer [self description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).

  • $msg->throughput_mode() / $msg->throughput_mode($value)

    Type: Bool

    Optional. This field is exposed to be used by the Spanner Migration Tool. For more details, see [SMT](https://github.com/GoogleCloudPlatform/spanner-migration-tool).

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::DdlStatementActionInfo

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].

Inherits from Protobuf::Message.

Accessors

  • $msg->action() / $msg->action($value)

    Type: String

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

  • $msg->entity_type() / $msg->entity_type($value)

    Type: String

    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` = "".

  • $msg->entity_names() / $msg->entity_names($value)

    Type: String

    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` = [].

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::UpdateDatabaseDdlMetadata

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

Inherits from Protobuf::Message.

Accessors

  • $msg->database() / $msg->database($value)

    Type: String

    The database being modified.

  • $msg->statements() / $msg->statements($value)

    Type: String

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

  • $msg->commit_timestamps() / $msg->commit_timestamps($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    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]`.

  • $msg->throttled() / $msg->throttled($value)

    Type: Bool

    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.

  • $msg->progress() / $msg->progress($value)

    Type: Message (Google::Spanner::Admin::Database::V1::Common::OperationProgress)

    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.

  • $msg->actions() / $msg->actions($value)

    Type: Message (Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::DdlStatementActionInfo)

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

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::DropDatabaseRequest

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

Inherits from Protobuf::Message.

Accessors

  • $msg->database() / $msg->database($value)

    Type: String

    Required. The database to be dropped.

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::GetDatabaseDdlRequest

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

Inherits from Protobuf::Message.

Accessors

  • $msg->database() / $msg->database($value)

    Type: String

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

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::GetDatabaseDdlResponse

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

Inherits from Protobuf::Message.

Accessors

  • $msg->statements() / $msg->statements($value)

    Type: String

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

  • $msg->proto_descriptors() / $msg->proto_descriptors($value)

    Type: Bytes

    Proto descriptors stored in the database. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). For more details, see protobuffer [self description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::ListDatabaseOperationsRequest

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

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

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

  • $msg->filter() / $msg->filter($value)

    Type: String

    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.
  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

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

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    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`.

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::ListDatabaseOperationsResponse

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

Inherits from Protobuf::Message.

Accessors

  • $msg->operations() / $msg->operations($value)

    Type: Message (Google::Longrunning::Operations::Operation)

    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.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    `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.

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::RestoreDatabaseRequest

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

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    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>`.

  • $msg->database_id() / $msg->database_id($value)

    Type: String

    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>`.

  • $msg->backup() / $msg->backup($value)

    Type: String

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

  • $msg->encryption_config() / $msg->encryption_config($value)

    Type: Message (Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::RestoreDatabaseEncryptionConfig)

    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`.

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::RestoreDatabaseEncryptionConfig

Encryption configuration for the restored database.

Inherits from Protobuf::Message.

Accessors

  • $msg->encryption_type() / $msg->encryption_type($value)

    Type: Enum (Google::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig::EncryptionType)

    Required. The encryption type of the restored database.

  • $msg->kms_key_name() / $msg->kms_key_name($value)

    Type: String

    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>`.

  • $msg->kms_key_names() / $msg->kms_key_names($value)

    Type: String

    Optional. Specifies the KMS configuration for the one or more keys used to encrypt the database. Values are of the form `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.

    The keys referenced by kms_key_names must fully cover all regions of the database instance configuration. Some examples: * For single region database instance configs, specify a single regional location KMS key. * For multi-regional database instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config. * For a database instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs.

Enum: RestoreDatabaseEncryptionConfig::EncryptionType

  • ENCRYPTION_TYPE_UNSPECIFIED => 0

  • USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION => 1

  • GOOGLE_DEFAULT_ENCRYPTION => 2

  • CUSTOMER_MANAGED_ENCRYPTION => 3

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::RestoreDatabaseMetadata

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

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Name of the database being created and restored to.

  • $msg->source_type() / $msg->source_type($value)

    Type: Enum (Google::Spanner::Admin::Database::V1::RestoreSourceType)

    The type of the restore source.

  • $msg->backup_info() / $msg->backup_info($value)

    Type: Message (Google::Spanner::Admin::Database::V1::Backup::BackupInfo)

    Information about the backup used to restore the database.

  • $msg->progress() / $msg->progress($value)

    Type: Message (Google::Spanner::Admin::Database::V1::Common::OperationProgress)

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

  • $msg->cancel_time() / $msg->cancel_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    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`.

  • $msg->optimize_database_operation_name() / $msg->optimize_database_operation_name($value)

    Type: String

    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 <database> 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.

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::OptimizeRestoredDatabaseMetadata

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.

Inherits from Protobuf::Message.

Accessors

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::DatabaseRole

A Cloud Spanner database role.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    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.

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::ListDatabaseRolesRequest

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

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

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

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

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

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    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].

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::ListDatabaseRolesResponse

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

Inherits from Protobuf::Message.

Accessors

  • $msg->database_roles() / $msg->database_roles($value)

    Type: Message (Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::DatabaseRole)

    Database roles that matched the request.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    `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.

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::AddSplitPointsRequest

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

Inherits from Protobuf::Message.

Accessors

  • $msg->database() / $msg->database($value)

    Type: String

    Required. The database on whose tables/indexes split points are to be added. Values are of the form `projects/<project>/instances/<instance>/databases/<database>`.

  • $msg->split_points() / $msg->split_points($value)

    Type: Message (Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::SplitPoints)

    Required. The split points to add.

  • $msg->initiator() / $msg->initiator($value)

    Type: String

    Optional. A user-supplied tag associated with the split points. For example, "intital_data_load", "special_event_1". Defaults to "CloudAddSplitPointsAPI" if not specified. The length of the tag must not exceed 50 characters,else will be trimmed. Only valid UTF8 characters are allowed.

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::AddSplitPointsResponse

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

Inherits from Protobuf::Message.

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::SplitPoints

The split points of a table/index.

Inherits from Protobuf::Message.

Accessors

  • $msg->table() / $msg->table($value)

    Type: String

    The table to split.

  • $msg->index() / $msg->index($value)

    Type: String

    The index to split. If specified, the `table` field must refer to the index's base table.

  • $msg->keys() / $msg->keys($value)

    Type: Message (Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::SplitPoints::Key)

    Required. The list of split keys, i.e., the split boundaries.

  • $msg->expire_time() / $msg->expire_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Optional. The expiration timestamp of the split points. A timestamp in the past means immediate expiration. The maximum value can be 30 days in the future. Defaults to 10 days in the future if not specified.

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::InternalUpdateGraphOperationRequest

Internal request proto, do not use directly.

Inherits from Protobuf::Message.

Accessors

  • $msg->database() / $msg->database($value)

    Type: String

    Internal field, do not use directly.

  • $msg->operation_id() / $msg->operation_id($value)

    Type: String

    Internal field, do not use directly.

  • $msg->vm_identity_token() / $msg->vm_identity_token($value)

    Type: String

    Internal field, do not use directly.

  • $msg->progress() / $msg->progress($value)

    Type: Double

    Internal field, do not use directly.

  • $msg->status() / $msg->status($value)

    Type: Message (Google::Rpc::Status::Status)

    Internal field, do not use directly.

Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::InternalUpdateGraphOperationResponse

Internal response proto, do not use directly.

Inherits from Protobuf::Message.

SEE ALSO

Protobuf, Protobuf::Message, Google::Spanner::Admin::Database::V1::SpannerDatabaseAdmin::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.