Cloud Spanner V1 Client - Class RestoreDatabaseRequest (1.82.0)

Reference documentation and code samples for the Cloud Spanner V1 Client class RestoreDatabaseRequest.

The request for RestoreDatabase.

Generated from protobuf message google.spanner.admin.database.v1.RestoreDatabaseRequest

Namespace

Google \ Cloud \ Spanner \ Admin \ Database \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ parent 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>.

↳ database_id 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>.

↳ backup string

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

↳ encryption_config Google\Cloud\Spanner\Admin\Database\V1\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 = USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION.

getParent

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

Returns
Type Description
string

setParent

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

Parameter
Name Description
var string
Returns
Type Description
$this

getDatabaseId

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

Returns
Type Description
string

setDatabaseId

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

Parameter
Name Description
var string
Returns
Type Description
$this

getBackup

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

Returns
Type Description
string

hasBackup

setBackup

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

Parameter
Name Description
var string
Returns
Type Description
$this

getEncryptionConfig

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 = USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION.

Returns
Type Description
Google\Cloud\Spanner\Admin\Database\V1\RestoreDatabaseEncryptionConfig|null

hasEncryptionConfig

clearEncryptionConfig

setEncryptionConfig

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 = USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION.

Parameter
Name Description
var Google\Cloud\Spanner\Admin\Database\V1\RestoreDatabaseEncryptionConfig
Returns
Type Description
$this

getSource

Returns
Type Description
string

static::build

Parameters
Name Description
parent 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>. Please see Google\Cloud\Spanner\Admin\Database\V1\DatabaseAdminClient::instanceName() for help formatting this field.

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

backup string

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

Returns
Type Description
Google\Cloud\Spanner\Admin\Database\V1\RestoreDatabaseRequest