# Cloud Spanner Database Admin V1 API - Class Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest (v1.14.0)

1.14.0 (latest) 1.13.1 1.12.0 1.11.1 1.10.0 1.9.0 1.8.0 1.7.0 1.6.1 1.5.0 1.4.0 1.3.0 1.2.1 1.1.1 1.0.0 0.20.0 0.19.0 0.18.0 0.17.1 0.16.1 0.15.0 0.14.2 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.6 Reference documentation and code samples for the Cloud Spanner Database Admin V1 API class Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.

The request for
[CreateDatabase](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-database-v1/latest/Google-Cloud-Spanner-Admin-Database-V1-DatabaseAdmin-Client#Google__Cloud__Spanner__Admin__Database__V1__DatabaseAdmin__Client_create_database_instance_ "Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database (method)").

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #create_statement

    def create_statement() -> ::String

**Returns**

- (::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_\-]*[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 (`` ` ``).

### #create_statement=

    def create_statement=(value) -> ::String

**Parameter**

- **value** (::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_\-]*[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 (`` ` ``).
**Returns**

- (::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_\-]*[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 (`` ` ``).

### #database_dialect

    def database_dialect() -> ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect

**Returns**

- ([::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-database-v1/latest/Google-Cloud-Spanner-Admin-Database-V1-DatabaseDialect)) --- Optional. The dialect of the Cloud Spanner Database.

### #database_dialect=

    def database_dialect=(value) -> ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect

**Parameter**

- **value** ([::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-database-v1/latest/Google-Cloud-Spanner-Admin-Database-V1-DatabaseDialect)) --- Optional. The dialect of the Cloud Spanner Database.
**Returns**

- ([::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-database-v1/latest/Google-Cloud-Spanner-Admin-Database-V1-DatabaseDialect)) --- Optional. The dialect of the Cloud Spanner Database.

### #encryption_config

    def encryption_config() -> ::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig

**Returns**

- ([::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-database-v1/latest/Google-Cloud-Spanner-Admin-Database-V1-EncryptionConfig)) --- Optional. The encryption configuration for the database. If this field is not specified, Cloud Spanner will encrypt/decrypt all data at rest using Google default encryption.

### #encryption_config=

    def encryption_config=(value) -> ::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig

**Parameter**

- **value** ([::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-database-v1/latest/Google-Cloud-Spanner-Admin-Database-V1-EncryptionConfig)) --- Optional. The encryption configuration for the database. If this field is not specified, Cloud Spanner will encrypt/decrypt all data at rest using Google default encryption.
**Returns**

- ([::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-database-v1/latest/Google-Cloud-Spanner-Admin-Database-V1-EncryptionConfig)) --- Optional. The encryption configuration for the database. If this field is not specified, Cloud Spanner will encrypt/decrypt all data at rest using Google default encryption.

### #extra_statements

    def extra_statements() -> ::Array<::String>

**Returns**

- (::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.

### #extra_statements=

    def extra_statements=(value) -> ::Array<::String>

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #parent

    def parent() -> ::String

**Returns**

- (::String) --- Required. The name of the instance that will serve the new database. Values are of the form `projects/<project>/instances/<instance>`.

### #parent=

    def parent=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The name of the instance that will serve the new database. Values are of the form `projects/<project>/instances/<instance>`.
**Returns**

- (::String) --- Required. The name of the instance that will serve the new database. Values are of the form `projects/<project>/instances/<instance>`.

### #proto_descriptors

    def proto_descriptors() -> ::String

**Returns**

- (::String) --- Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in 'extra_statements' above. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). To generate it, [install](https://grpc.io/docs/protoc-installation/) and run `protoc` with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run `
  $protoc --proto_path=/app_path --proto_path=/lib_path \
  --include_imports \
  --descriptor_set_out=descriptors.data \
  moon/shot/app.proto
  ` For more details, see protobuffer [self
  description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).

### #proto_descriptors=

    def proto_descriptors=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in 'extra_statements' above. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). To generate it, [install](https://grpc.io/docs/protoc-installation/) and run `protoc` with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run `
  $protoc --proto_path=/app_path --proto_path=/lib_path \
  --include_imports \
  --descriptor_set_out=descriptors.data \
  moon/shot/app.proto
  ` For more details, see protobuffer [self
  description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
**Returns**

- (::String) --- Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in 'extra_statements' above. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). To generate it, [install](https://grpc.io/docs/protoc-installation/) and run `protoc` with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run `
  $protoc --proto_path=/app_path --proto_path=/lib_path \
  --include_imports \
  --descriptor_set_out=descriptors.data \
  moon/shot/app.proto
  ` For more details, see protobuffer [self
  description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).