Class BackupInfo.Builder
- Direct Known Subclasses:
Backup.Builder
- Enclosing class:
- BackupInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BackupInfo.BuilderaddAllReferencingBackups(List<String> referencingBackups) Output Only.abstract Backupbuild()Builds the backup from this builder.abstract BackupInfo.BuildersetDatabase(DatabaseId database) Required for creating a new backup.abstract BackupInfo.BuildersetEncryptionConfig(BackupEncryptionConfig encryptionConfig) Optional for creating a new backup.abstract BackupInfo.BuildersetExpireTime(com.google.cloud.Timestamp expireTime) Required for creating a new backup.protected BackupInfo.BuildersetMaxExpireTime(com.google.cloud.Timestamp maxExpireTime) Output Only.abstract BackupInfo.BuildersetVersionTime(com.google.cloud.Timestamp versionTime) Optional for creating a new backup.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setEncryptionConfig
Optional for creating a new backup.The encryption configuration to be used for the backup. The possible configurations are
CustomerManagedEncryption,GoogleDefaultEncryptionandUseDatabaseEncryption.If no encryption config is given the backup will be created with the same encryption as set by the database (
UseDatabaseEncryption). -
setExpireTime
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.
-
setVersionTime
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()). -
setDatabase
Required for creating a new backup.Sets the source database to use for creating the backup.
-
build
Builds the backup from this builder. -
setMaxExpireTime
Output Only.Returns the max allowed expiration time of the backup, with microseconds granularity.
-
addAllReferencingBackups
Output Only.Returns the names of the destination backups being created by copying this source backup.
-