Google Native

Pulumi Official
Package maintained by Pulumi
v0.22.0 published on Friday, Jul 29, 2022 by Pulumi

Database

Create a database. Note - this resource’s API doesn’t support deletion. When deleted, the resource will persist on Google Cloud even though it will be deleted from Pulumi state.

Create a Database Resource

new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);
@overload
def Database(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             app_engine_integration_mode: Optional[DatabaseAppEngineIntegrationMode] = None,
             concurrency_mode: Optional[DatabaseConcurrencyMode] = None,
             database_id: Optional[str] = None,
             etag: Optional[str] = None,
             location: Optional[str] = None,
             name: Optional[str] = None,
             project: Optional[str] = None,
             type: Optional[DatabaseType] = None)
@overload
def Database(resource_name: str,
             args: DatabaseArgs,
             opts: Optional[ResourceOptions] = None)
func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)
public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
public Database(String name, DatabaseArgs args)
public Database(String name, DatabaseArgs args, CustomResourceOptions options)
type: google-native:firestore/v1:Database
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Database Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Database resource accepts the following input properties:

DatabaseId string

Required. The ID to use for the database, which will become the final component of the database's resource name. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also valid.

AppEngineIntegrationMode Pulumi.GoogleNative.Firestore.V1.DatabaseAppEngineIntegrationMode

The App Engine integration mode to use for this database.

ConcurrencyMode Pulumi.GoogleNative.Firestore.V1.DatabaseConcurrencyMode

The concurrency control mode to use for this database.

Etag string

This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

Location string

The location of the database. Available databases are listed at https://cloud.google.com/firestore/docs/locations.

Name string

The resource name of the Database. Format: projects/{project}/databases/{database}

Project string
Type Pulumi.GoogleNative.Firestore.V1.DatabaseType

The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.

DatabaseId string

Required. The ID to use for the database, which will become the final component of the database's resource name. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also valid.

AppEngineIntegrationMode DatabaseAppEngineIntegrationMode

The App Engine integration mode to use for this database.

ConcurrencyMode DatabaseConcurrencyMode

The concurrency control mode to use for this database.

Etag string

This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

Location string

The location of the database. Available databases are listed at https://cloud.google.com/firestore/docs/locations.

Name string

The resource name of the Database. Format: projects/{project}/databases/{database}

Project string
Type DatabaseType

The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.

databaseId String

Required. The ID to use for the database, which will become the final component of the database's resource name. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also valid.

appEngineIntegrationMode DatabaseAppEngineIntegrationMode

The App Engine integration mode to use for this database.

concurrencyMode DatabaseConcurrencyMode

The concurrency control mode to use for this database.

etag String

This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

location String

The location of the database. Available databases are listed at https://cloud.google.com/firestore/docs/locations.

name String

The resource name of the Database. Format: projects/{project}/databases/{database}

project String
type DatabaseType

The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.

databaseId string

Required. The ID to use for the database, which will become the final component of the database's resource name. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also valid.

appEngineIntegrationMode DatabaseAppEngineIntegrationMode

The App Engine integration mode to use for this database.

concurrencyMode DatabaseConcurrencyMode

The concurrency control mode to use for this database.

etag string

This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

location string

The location of the database. Available databases are listed at https://cloud.google.com/firestore/docs/locations.

name string

The resource name of the Database. Format: projects/{project}/databases/{database}

project string
type DatabaseType

The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.

database_id str

Required. The ID to use for the database, which will become the final component of the database's resource name. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also valid.

app_engine_integration_mode DatabaseAppEngineIntegrationMode

The App Engine integration mode to use for this database.

concurrency_mode DatabaseConcurrencyMode

The concurrency control mode to use for this database.

etag str

This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

location str

The location of the database. Available databases are listed at https://cloud.google.com/firestore/docs/locations.

name str

The resource name of the Database. Format: projects/{project}/databases/{database}

project str
type DatabaseType

The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.

databaseId String

Required. The ID to use for the database, which will become the final component of the database's resource name. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also valid.

appEngineIntegrationMode "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED" | "ENABLED" | "DISABLED"

The App Engine integration mode to use for this database.

concurrencyMode "CONCURRENCY_MODE_UNSPECIFIED" | "OPTIMISTIC" | "PESSIMISTIC" | "OPTIMISTIC_WITH_ENTITY_GROUPS"

The concurrency control mode to use for this database.

etag String

This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

location String

The location of the database. Available databases are listed at https://cloud.google.com/firestore/docs/locations.

name String

The resource name of the Database. Format: projects/{project}/databases/{database}

project String
type "DATABASE_TYPE_UNSPECIFIED" | "FIRESTORE_NATIVE" | "DATASTORE_MODE"

The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.

Outputs

All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

KeyPrefix string

The key_prefix for this database. This key_prefix is used, in combination with the project id ("~") to construct the application id that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes. This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).

Id string

The provider-assigned unique ID for this managed resource.

KeyPrefix string

The key_prefix for this database. This key_prefix is used, in combination with the project id ("~") to construct the application id that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes. This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).

id String

The provider-assigned unique ID for this managed resource.

keyPrefix String

The key_prefix for this database. This key_prefix is used, in combination with the project id ("~") to construct the application id that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes. This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).

id string

The provider-assigned unique ID for this managed resource.

keyPrefix string

The key_prefix for this database. This key_prefix is used, in combination with the project id ("~") to construct the application id that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes. This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).

id str

The provider-assigned unique ID for this managed resource.

key_prefix str

The key_prefix for this database. This key_prefix is used, in combination with the project id ("~") to construct the application id that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes. This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).

id String

The provider-assigned unique ID for this managed resource.

keyPrefix String

The key_prefix for this database. This key_prefix is used, in combination with the project id ("~") to construct the application id that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes. This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).

Supporting Types

DatabaseAppEngineIntegrationMode

AppEngineIntegrationModeUnspecified
APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED

Not used.

Enabled
ENABLED

If an App Engine application exists in the same region as this database, App Engine configuration will impact this database. This includes disabling of the application & database, as well as disabling writes to the database.

Disabled
DISABLED

Appengine has no affect on the ability of this database to serve requests.

DatabaseAppEngineIntegrationModeAppEngineIntegrationModeUnspecified
APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED

Not used.

DatabaseAppEngineIntegrationModeEnabled
ENABLED

If an App Engine application exists in the same region as this database, App Engine configuration will impact this database. This includes disabling of the application & database, as well as disabling writes to the database.

DatabaseAppEngineIntegrationModeDisabled
DISABLED

Appengine has no affect on the ability of this database to serve requests.

AppEngineIntegrationModeUnspecified
APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED

Not used.

Enabled
ENABLED

If an App Engine application exists in the same region as this database, App Engine configuration will impact this database. This includes disabling of the application & database, as well as disabling writes to the database.

Disabled
DISABLED

Appengine has no affect on the ability of this database to serve requests.

AppEngineIntegrationModeUnspecified
APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED

Not used.

Enabled
ENABLED

If an App Engine application exists in the same region as this database, App Engine configuration will impact this database. This includes disabling of the application & database, as well as disabling writes to the database.

Disabled
DISABLED

Appengine has no affect on the ability of this database to serve requests.

APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED
APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED

Not used.

ENABLED
ENABLED

If an App Engine application exists in the same region as this database, App Engine configuration will impact this database. This includes disabling of the application & database, as well as disabling writes to the database.

DISABLED
DISABLED

Appengine has no affect on the ability of this database to serve requests.

"APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"
APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED

Not used.

"ENABLED"
ENABLED

If an App Engine application exists in the same region as this database, App Engine configuration will impact this database. This includes disabling of the application & database, as well as disabling writes to the database.

"DISABLED"
DISABLED

Appengine has no affect on the ability of this database to serve requests.

DatabaseConcurrencyMode

ConcurrencyModeUnspecified
CONCURRENCY_MODE_UNSPECIFIED

Not used.

Optimistic
OPTIMISTIC

Use optimistic concurrency control by default. This mode is available for Cloud Firestore databases.

Pessimistic
PESSIMISTIC

Use pessimistic concurrency control by default. This mode is available for Cloud Firestore databases. This is the default setting for Cloud Firestore.

OptimisticWithEntityGroups
OPTIMISTIC_WITH_ENTITY_GROUPS

Use optimistic concurrency control with entity groups by default. This is the only available mode for Cloud Datastore. This mode is also available for Cloud Firestore with Datastore Mode but is not recommended.

DatabaseConcurrencyModeConcurrencyModeUnspecified
CONCURRENCY_MODE_UNSPECIFIED

Not used.

DatabaseConcurrencyModeOptimistic
OPTIMISTIC

Use optimistic concurrency control by default. This mode is available for Cloud Firestore databases.

DatabaseConcurrencyModePessimistic
PESSIMISTIC

Use pessimistic concurrency control by default. This mode is available for Cloud Firestore databases. This is the default setting for Cloud Firestore.

DatabaseConcurrencyModeOptimisticWithEntityGroups
OPTIMISTIC_WITH_ENTITY_GROUPS

Use optimistic concurrency control with entity groups by default. This is the only available mode for Cloud Datastore. This mode is also available for Cloud Firestore with Datastore Mode but is not recommended.

ConcurrencyModeUnspecified
CONCURRENCY_MODE_UNSPECIFIED

Not used.

Optimistic
OPTIMISTIC

Use optimistic concurrency control by default. This mode is available for Cloud Firestore databases.

Pessimistic
PESSIMISTIC

Use pessimistic concurrency control by default. This mode is available for Cloud Firestore databases. This is the default setting for Cloud Firestore.

OptimisticWithEntityGroups
OPTIMISTIC_WITH_ENTITY_GROUPS

Use optimistic concurrency control with entity groups by default. This is the only available mode for Cloud Datastore. This mode is also available for Cloud Firestore with Datastore Mode but is not recommended.

ConcurrencyModeUnspecified
CONCURRENCY_MODE_UNSPECIFIED

Not used.

Optimistic
OPTIMISTIC

Use optimistic concurrency control by default. This mode is available for Cloud Firestore databases.

Pessimistic
PESSIMISTIC

Use pessimistic concurrency control by default. This mode is available for Cloud Firestore databases. This is the default setting for Cloud Firestore.

OptimisticWithEntityGroups
OPTIMISTIC_WITH_ENTITY_GROUPS

Use optimistic concurrency control with entity groups by default. This is the only available mode for Cloud Datastore. This mode is also available for Cloud Firestore with Datastore Mode but is not recommended.

CONCURRENCY_MODE_UNSPECIFIED
CONCURRENCY_MODE_UNSPECIFIED

Not used.

OPTIMISTIC
OPTIMISTIC

Use optimistic concurrency control by default. This mode is available for Cloud Firestore databases.

PESSIMISTIC
PESSIMISTIC

Use pessimistic concurrency control by default. This mode is available for Cloud Firestore databases. This is the default setting for Cloud Firestore.

OPTIMISTIC_WITH_ENTITY_GROUPS
OPTIMISTIC_WITH_ENTITY_GROUPS

Use optimistic concurrency control with entity groups by default. This is the only available mode for Cloud Datastore. This mode is also available for Cloud Firestore with Datastore Mode but is not recommended.

"CONCURRENCY_MODE_UNSPECIFIED"
CONCURRENCY_MODE_UNSPECIFIED

Not used.

"OPTIMISTIC"
OPTIMISTIC

Use optimistic concurrency control by default. This mode is available for Cloud Firestore databases.

"PESSIMISTIC"
PESSIMISTIC

Use pessimistic concurrency control by default. This mode is available for Cloud Firestore databases. This is the default setting for Cloud Firestore.

"OPTIMISTIC_WITH_ENTITY_GROUPS"
OPTIMISTIC_WITH_ENTITY_GROUPS

Use optimistic concurrency control with entity groups by default. This is the only available mode for Cloud Datastore. This mode is also available for Cloud Firestore with Datastore Mode but is not recommended.

DatabaseType

DatabaseTypeUnspecified
DATABASE_TYPE_UNSPECIFIED

The default value. This value is used if the database type is omitted.

FirestoreNative
FIRESTORE_NATIVE

Firestore Native Mode

DatastoreMode
DATASTORE_MODE

Firestore in Datastore Mode.

DatabaseTypeDatabaseTypeUnspecified
DATABASE_TYPE_UNSPECIFIED

The default value. This value is used if the database type is omitted.

DatabaseTypeFirestoreNative
FIRESTORE_NATIVE

Firestore Native Mode

DatabaseTypeDatastoreMode
DATASTORE_MODE

Firestore in Datastore Mode.

DatabaseTypeUnspecified
DATABASE_TYPE_UNSPECIFIED

The default value. This value is used if the database type is omitted.

FirestoreNative
FIRESTORE_NATIVE

Firestore Native Mode

DatastoreMode
DATASTORE_MODE

Firestore in Datastore Mode.

DatabaseTypeUnspecified
DATABASE_TYPE_UNSPECIFIED

The default value. This value is used if the database type is omitted.

FirestoreNative
FIRESTORE_NATIVE

Firestore Native Mode

DatastoreMode
DATASTORE_MODE

Firestore in Datastore Mode.

DATABASE_TYPE_UNSPECIFIED
DATABASE_TYPE_UNSPECIFIED

The default value. This value is used if the database type is omitted.

FIRESTORE_NATIVE
FIRESTORE_NATIVE

Firestore Native Mode

DATASTORE_MODE
DATASTORE_MODE

Firestore in Datastore Mode.

"DATABASE_TYPE_UNSPECIFIED"
DATABASE_TYPE_UNSPECIFIED

The default value. This value is used if the database type is omitted.

"FIRESTORE_NATIVE"
FIRESTORE_NATIVE

Firestore Native Mode

"DATASTORE_MODE"
DATASTORE_MODE

Firestore in Datastore Mode.

Package Details

Repository
https://github.com/pulumi/pulumi-google-native
License
Apache-2.0