Cloud Spanner V1 Client - Class RestoreDatabaseRequest (1.54.2)

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

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

Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {

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

Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {

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

Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED];

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

Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED];

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

Generated from protobuf field string backup = 3 [(.google.api.resource_reference) = {

Returns
TypeDescription
string

hasBackup

setBackup

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

Generated from protobuf field string backup = 3 [(.google.api.resource_reference) = {

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.

Generated from protobuf field .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];

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.

Generated from protobuf field .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
var Google\Cloud\Spanner\Admin\Database\V1\RestoreDatabaseEncryptionConfig
Returns
TypeDescription
$this

getSource

Returns
TypeDescription
string