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.
-
#enable_drop_protection ⇒ Boolean
(also: #enable_drop_protection?)
Optional.
-
#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.
-
#quorum_info ⇒ Google::Apis::SpannerV1::QuorumInfo
Information about the dual-region quorum.
-
#reconciling ⇒ Boolean
(also: #reconciling?)
Output only.
-
#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.
2281 2282 2283 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2281 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
2195 2196 2197 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2195 def create_time @create_time end |
#database_dialect ⇒ String
Output only. The dialect of the Cloud Spanner Database.
Corresponds to the JSON property databaseDialect
2200 2201 2202 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2200 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
2208 2209 2210 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2208 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
2217 2218 2219 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2217 def earliest_version_time @earliest_version_time end |
#enable_drop_protection ⇒ Boolean Also known as: enable_drop_protection?
Optional. Whether drop protection is enabled for this database. Defaults to
false, if not set. For more details, please see how to prevent accidental
database deletion.
Corresponds to the JSON property enableDropProtection
2225 2226 2227 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2225 def enable_drop_protection @enable_drop_protection end |
#encryption_config ⇒ Google::Apis::SpannerV1::EncryptionConfig
Encryption configuration for a Cloud Spanner database.
Corresponds to the JSON property encryptionConfig
2231 2232 2233 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2231 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 all Cloud
KMS key versions that are in use. The encryption_status field inside of each
EncryptionInfo is not populated. 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
2242 2243 2244 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2242 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`
2250 2251 2252 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2250 def name @name end |
#quorum_info ⇒ Google::Apis::SpannerV1::QuorumInfo
Information about the dual-region quorum.
Corresponds to the JSON property quorumInfo
2255 2256 2257 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2255 def quorum_info @quorum_info end |
#reconciling ⇒ Boolean Also known as: reconciling?
Output only. If true, the database is being updated. If false, there are no
ongoing update operations for the database.
Corresponds to the JSON property reconciling
2261 2262 2263 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2261 def reconciling @reconciling end |
#restore_info ⇒ Google::Apis::SpannerV1::RestoreInfo
Information about the database restore.
Corresponds to the JSON property restoreInfo
2267 2268 2269 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2267 def restore_info @restore_info end |
#state ⇒ String
Output only. The current database state.
Corresponds to the JSON property state
2272 2273 2274 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2272 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
2279 2280 2281 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2279 def version_retention_period @version_retention_period end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 2286 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) @enable_drop_protection = args[:enable_drop_protection] if args.key?(:enable_drop_protection) @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) @quorum_info = args[:quorum_info] if args.key?(:quorum_info) @reconciling = args[:reconciling] if args.key?(:reconciling) @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 |