Class: Google::Apis::SpannerV1::Database
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::Database
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb
Overview
A Cloud Spanner database.
Instance Attribute Summary collapse
-
#create_time ⇒ String
Output only.
-
#database_dialect ⇒ String
Output only.
-
#default_leader ⇒ String
Output only.
-
#earliest_version_time ⇒ String
Output only.
-
#encryption_config ⇒ Google::Apis::SpannerV1::EncryptionConfig
Encryption configuration for a Cloud Spanner database.
-
#encryption_info ⇒ Array<Google::Apis::SpannerV1::EncryptionInfo>
Output only.
-
#name ⇒ String
Required.
-
#restore_info ⇒ Google::Apis::SpannerV1::RestoreInfo
Information about the database restore.
-
#state ⇒ String
Output only.
-
#version_retention_period ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Database
constructor
A new instance of Database.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Database
Returns a new instance of Database.
1199 1200 1201 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1199 def initialize(**args) update!(**args) end |
Instance Attribute Details
#create_time ⇒ String
Output only. If exists, the time at which the database creation started.
Corresponds to the JSON property createTime
1135 1136 1137 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1135 def create_time @create_time end |
#database_dialect ⇒ String
Output only. The dialect of the Cloud Spanner Database.
Corresponds to the JSON property databaseDialect
1140 1141 1142 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1140 def database_dialect @database_dialect end |
#default_leader ⇒ String
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
1148 1149 1150 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1148 def default_leader @default_leader end |
#earliest_version_time ⇒ String
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
1157 1158 1159 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1157 def earliest_version_time @earliest_version_time end |
#encryption_config ⇒ Google::Apis::SpannerV1::EncryptionConfig
Encryption configuration for a Cloud Spanner database.
Corresponds to the JSON property encryptionConfig
1162 1163 1164 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1162 def encryption_config @encryption_config end |
#encryption_info ⇒ Array<Google::Apis::SpannerV1::EncryptionInfo>
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
1172 1173 1174 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1172 def encryption_info @encryption_info end |
#name ⇒ String
Required. The name of the database. Values are of the form projects//
instances//databases/, where `is as specified in theCREATE DATABASE
statement. This name can be passed to other API methods to identify the
database.
Corresponds to the JSON propertyname`
1180 1181 1182 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1180 def name @name end |
#restore_info ⇒ Google::Apis::SpannerV1::RestoreInfo
Information about the database restore.
Corresponds to the JSON property restoreInfo
1185 1186 1187 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1185 def restore_info @restore_info end |
#state ⇒ String
Output only. The current database state.
Corresponds to the JSON property state
1190 1191 1192 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1190 def state @state end |
#version_retention_period ⇒ String
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
1197 1198 1199 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1197 def version_retention_period @version_retention_period end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1204 def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) @database_dialect = args[:database_dialect] if args.key?(:database_dialect) @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 |