Cloud Spanner V1 Client - Class RestoreDatabaseRequest (1.65.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
NameDescription
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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this

getBackup

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

Returns
TypeDescription
string

hasBackup

setBackup

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

Parameter
NameDescription
var string
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var Google\Cloud\Spanner\Admin\Database\V1\RestoreDatabaseEncryptionConfig
Returns
TypeDescription
$this

getSource

Returns
TypeDescription
string

static::build

Parameters
NameDescription
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
TypeDescription
Google\Cloud\Spanner\Admin\Database\V1\RestoreDatabaseRequest