class Google::Apis::SpannerV1::Database

A Cloud Spanner database.

Attributes

create_time[RW]

Output only. If exists, the time at which the database creation started. Corresponds to the JSON property `createTime` @return [String]

default_leader[RW]

Output only. The read-write region which contains the database's leader replicas. This is the same as the value of default_leader database option set using DatabaseAdmin.CreateDatabase or DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty. Corresponds to the JSON property `defaultLeader` @return [String]

earliest_version_time[RW]

Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery. Corresponds to the JSON property `earliestVersionTime` @return [String]

encryption_config[RW]

Encryption configuration for a Cloud Spanner database. Corresponds to the JSON property `encryptionConfig` @return [Google::Apis::SpannerV1::EncryptionConfig]

encryption_info[RW]

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. For databases that are using Google default or other types of encryption, this field is empty. This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field. Corresponds to the JSON property `encryptionInfo` @return [Array<Google::Apis::SpannerV1::EncryptionInfo>]

name[RW]

Required. The name of the database. Values are of the form `projects// instances//databases/`, where “ is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database. Corresponds to the JSON property `name` @return [String]

restore_info[RW]

Information about the database restore. Corresponds to the JSON property `restoreInfo` @return [Google::Apis::SpannerV1::RestoreInfo]

state[RW]

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

version_retention_period[RW]

Output only. The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set. Corresponds to the JSON property `versionRetentionPeriod` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/spanner_v1/classes.rb, line 1040
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 1045
def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @default_leader = args[:default_leader] if args.key?(:default_leader)
  @earliest_version_time = args[:earliest_version_time] if args.key?(:earliest_version_time)
  @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
  @encryption_info = args[:encryption_info] if args.key?(:encryption_info)
  @name = args[:name] if args.key?(:name)
  @restore_info = args[:restore_info] if args.key?(:restore_info)
  @state = args[:state] if args.key?(:state)
  @version_retention_period = args[:version_retention_period] if args.key?(:version_retention_period)
end