Class: Google::Apis::SpannerV1::CreateDatabaseRequest
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::CreateDatabaseRequest
- 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
The request for CreateDatabase.
Instance Attribute Summary collapse
-
#create_statement ⇒ String
Required.
-
#database_dialect ⇒ String
Optional.
-
#encryption_config ⇒ Google::Apis::SpannerV1::EncryptionConfig
Encryption configuration for a Cloud Spanner database.
-
#extra_statements ⇒ Array<String>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CreateDatabaseRequest
constructor
A new instance of CreateDatabaseRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CreateDatabaseRequest
Returns a new instance of CreateDatabaseRequest.
1031 1032 1033 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1031 def initialize(**args) update!(**args) end |
Instance Attribute Details
#create_statement ⇒ String
Required. A CREATE DATABASE statement, which specifies the ID of the new
database. The database ID must conform to the regular expression a-z*[a-z0-9]
and be between 2 and 30 characters in length. If the database ID is a
reserved word or if it contains a hyphen, the database ID must be enclosed in
backticks (`).
Corresponds to the JSON property createStatement
1011 1012 1013 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1011 def create_statement @create_statement end |
#database_dialect ⇒ String
Optional. The dialect of the Cloud Spanner Database.
Corresponds to the JSON property databaseDialect
1016 1017 1018 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1016 def database_dialect @database_dialect end |
#encryption_config ⇒ Google::Apis::SpannerV1::EncryptionConfig
Encryption configuration for a Cloud Spanner database.
Corresponds to the JSON property encryptionConfig
1021 1022 1023 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1021 def encryption_config @encryption_config end |
#extra_statements ⇒ Array<String>
Optional. A list of DDL statements to run inside the newly created database.
Statements can create tables, indexes, etc. These statements execute
atomically with the creation of the database: if there is an error in any
statement, the database is not created.
Corresponds to the JSON property extraStatements
1029 1030 1031 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1029 def extra_statements @extra_statements end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1036 1037 1038 1039 1040 1041 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1036 def update!(**args) @create_statement = args[:create_statement] if args.key?(:create_statement) @database_dialect = args[:database_dialect] if args.key?(:database_dialect) @encryption_config = args[:encryption_config] if args.key?(:encryption_config) @extra_statements = args[:extra_statements] if args.key?(:extra_statements) end |