class Google::Apis::SpannerV1::Backup

A backup of a Cloud Spanner database.

Attributes

create_time[RW]

Output only. The time the CreateBackup request is received. If the request does not specify `version_time`, the `version_time` of the backup will be equivalent to the `create_time`. Corresponds to the JSON property `createTime` @return [String]

database[RW]

Required for the CreateBackup operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects//instances//databases/`. Corresponds to the JSON property `database` @return [String]

encryption_info[RW]

Encryption information for a Cloud Spanner database or backup. Corresponds to the JSON property `encryptionInfo` @return [Google::Apis::SpannerV1::EncryptionInfo]

expire_time[RW]

Required for the CreateBackup operation. 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 CreateBackup request is processed. Once the ` expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup. Corresponds to the JSON property `expireTime` @return [String]

name[RW]

Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`. Corresponds to the JSON property `name` @return [String]

referencing_databases[RW]

Output only. The names of the restored databases that reference the backup. The database names are of the form `projects//instances//databases/`. Referencing databases may exist in different instances. The existence of any referencing database prevents the backup from being deleted. When a restored database from the backup enters the `READY` state, the reference to the backup is removed. Corresponds to the JSON property `referencingDatabases` @return [Array<String>]

size_bytes[RW]

Output only. Size of the backup in bytes. Corresponds to the JSON property `sizeBytes` @return [Fixnum]

state[RW]

Output only. The current state of the backup. Corresponds to the JSON property `state` @return [String]

version_time[RW]

The backup will contain an externally consistent copy of the database at the timestamp specified by `version_time`. If `version_time` is not specified, the system will set `version_time` to the `create_time` of the backup. Corresponds to the JSON property `versionTime` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/spanner_v1/classes.rb, line 95
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/spanner_v1/classes.rb, line 100
def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @database = args[:database] if args.key?(:database)
  @encryption_info = args[:encryption_info] if args.key?(:encryption_info)
  @expire_time = args[:expire_time] if args.key?(:expire_time)
  @name = args[:name] if args.key?(:name)
  @referencing_databases = args[:referencing_databases] if args.key?(:referencing_databases)
  @size_bytes = args[:size_bytes] if args.key?(:size_bytes)
  @state = args[:state] if args.key?(:state)
  @version_time = args[:version_time] if args.key?(:version_time)
end