Class BackupInfo.Builder

public abstract static class BackupInfo.Builder

Inheritance

java.lang.Object > BackupInfo.Builder

Constructors

Builder()

public Builder()

Methods

addAllReferencingBackups(List<String> referencingBackups)

protected BackupInfo.Builder addAllReferencingBackups(List<String> referencingBackups)

Output Only.

Returns the names of the destination backups being created by copying this source backup.

Parameter
NameDescription
referencingBackupsList<String>
Returns
TypeDescription
BackupInfo.Builder

build()

public abstract Backup build()

Builds the backup from this builder.

Returns
TypeDescription
Backup

setDatabase(DatabaseId database)

public abstract BackupInfo.Builder setDatabase(DatabaseId database)

Required for creating a new backup.

Sets the source database to use for creating the backup.

Parameter
NameDescription
databaseDatabaseId
Returns
TypeDescription
BackupInfo.Builder

setEncryptionConfig(BackupEncryptionConfig encryptionConfig)

public abstract BackupInfo.Builder setEncryptionConfig(BackupEncryptionConfig encryptionConfig)

Optional for creating a new backup.

The encryption configuration to be used for the backup. The possible configurations are com.google.cloud.spanner.encryption.CustomerManagedEncryption, com.google.cloud.spanner.encryption.GoogleDefaultEncryption and com.google.cloud.spanner.encryption.UseDatabaseEncryption.

If no encryption config is given the backup will be created with the same encryption as set by the database (com.google.cloud.spanner.encryption.UseDatabaseEncryption).

Parameter
NameDescription
encryptionConfigBackupEncryptionConfig
Returns
TypeDescription
BackupInfo.Builder

setExpireTime(Timestamp expireTime)

public abstract BackupInfo.Builder setExpireTime(Timestamp expireTime)

Required for creating a new backup.

Sets the expiration time of the backup. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the request is received. Once the expireTime has passed, Cloud Spanner will delete the backup and free the resources used by the backup.

Parameter
NameDescription
expireTimecom.google.cloud.Timestamp
Returns
TypeDescription
BackupInfo.Builder

setMaxExpireTime(Timestamp maxExpireTime)

protected BackupInfo.Builder setMaxExpireTime(Timestamp maxExpireTime)

Output Only.

Returns the max allowed expiration time of the backup, with microseconds granularity.

Parameter
NameDescription
maxExpireTimecom.google.cloud.Timestamp
Returns
TypeDescription
BackupInfo.Builder

setVersionTime(Timestamp versionTime)

public abstract BackupInfo.Builder setVersionTime(Timestamp versionTime)

Optional for creating a new backup.

Specifies the timestamp to have an externally consistent copy of the database. If no version time is specified, it will be automatically set to the backup create time.

The version time can be as far in the past as specified by the database earliest version time (see Database#getEarliestVersionTime()).

Parameter
NameDescription
versionTimecom.google.cloud.Timestamp
Returns
TypeDescription
BackupInfo.Builder