public static class Backup.Builder extends BackupInfo.Builder
| Modifier and Type | Method and Description |
|---|---|
Backup |
build()
Builds the backup from this builder.
|
BackupInfo.Builder |
setDatabase(DatabaseId database)
Required for creating a new backup.
|
BackupInfo.Builder |
setEncryptionConfig(BackupEncryptionConfig encryptionConfig)
Optional for creating a new backup.
|
BackupInfo.Builder |
setExpireTime(com.google.cloud.Timestamp expireTime)
Required for creating a new backup.
|
BackupInfo.Builder |
setVersionTime(com.google.cloud.Timestamp versionTime)
Optional for creating a new backup.
|
protected final BackupId id
public Backup build()
BackupInfo.Builderbuild in class BackupInfo.Builderpublic BackupInfo.Builder setExpireTime(com.google.cloud.Timestamp expireTime)
BackupInfo.BuilderSets 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.
setExpireTime in class BackupInfo.Builderpublic BackupInfo.Builder setVersionTime(com.google.cloud.Timestamp versionTime)
BackupInfo.BuilderSpecifies 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 DatabaseInfo.getEarliestVersionTime()).
setVersionTime in class BackupInfo.Builderpublic BackupInfo.Builder setDatabase(DatabaseId database)
BackupInfo.BuilderSets the source database to use for creating the backup.
setDatabase in class BackupInfo.Builderpublic BackupInfo.Builder setEncryptionConfig(BackupEncryptionConfig encryptionConfig)
BackupInfo.BuilderThe encryption configuration to be used for the backup. The possible configurations are
CustomerManagedEncryption, GoogleDefaultEncryption and UseDatabaseEncryption.
If no encryption config is given the backup will be created with the same encryption as
set by the database (UseDatabaseEncryption).
setEncryptionConfig in class BackupInfo.BuilderCopyright © 2021 Google LLC. All rights reserved.