Cloud Spanner V1 Client - Class CreateBackupRequest (1.68.0)

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

The request for CreateBackup.

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

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

↳ backup_id string

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

↳ backup Google\Cloud\Spanner\Admin\Database\V1\Backup

Required. The backup to create.

↳ encryption_config Google\Cloud\Spanner\Admin\Database\V1\CreateBackupEncryptionConfig

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

getParent

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

Returns
TypeDescription
string

setParent

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getBackupId

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

Returns
TypeDescription
string

setBackupId

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getBackup

Required. The backup to create.

Returns
TypeDescription
Google\Cloud\Spanner\Admin\Database\V1\Backup|null

hasBackup

clearBackup

setBackup

Required. The backup to create.

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

getEncryptionConfig

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

Returns
TypeDescription
Google\Cloud\Spanner\Admin\Database\V1\CreateBackupEncryptionConfig|null

hasEncryptionConfig

clearEncryptionConfig

setEncryptionConfig

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

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

static::build

Parameters
NameDescription
parent string

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

backup Google\Cloud\Spanner\Admin\Database\V1\Backup

Required. The backup to create.

backupId string

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

Returns
TypeDescription
Google\Cloud\Spanner\Admin\Database\V1\CreateBackupRequest