DatabaseArgs

data class DatabaseArgs(val appEngineIntegrationMode: Output<String>? = null, val concurrencyMode: Output<String>? = null, val deleteProtectionState: Output<String>? = null, val locationId: Output<String>? = null, val name: Output<String>? = null, val pointInTimeRecoveryEnablement: Output<String>? = null, val project: Output<String>? = null, val type: Output<String>? = null) : ConvertibleToJava<DatabaseArgs>

A Cloud Firestore Database. If you wish to use Firestore with App Engine, use the gcp.appengine.Application resource instead. To get more information about Database, see:

Example Usage

Firestore Database With Delete Protection

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firestore.Database;
import com.pulumi.gcp.firestore.DatabaseArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var database = new Database("database", DatabaseArgs.builder()
.project(google_project.project().project_id())
.locationId("nam5")
.type("FIRESTORE_NATIVE")
.deleteProtectionState("DELETE_PROTECTION_ENABLED")
.build(), CustomResourceOptions.builder()
.dependsOn(google_project_service.firestore())
.build());
}
}

Import

Database can be imported using any of these accepted formats

$ pulumi import gcp:firestore/database:Database default projects/{{project}}/databases/{{name}}
$ pulumi import gcp:firestore/database:Database default {{project}}/{{name}}
$ pulumi import gcp:firestore/database:Database default {{name}}

Constructors

Link copied to clipboard
constructor(appEngineIntegrationMode: Output<String>? = null, concurrencyMode: Output<String>? = null, deleteProtectionState: Output<String>? = null, locationId: Output<String>? = null, name: Output<String>? = null, pointInTimeRecoveryEnablement: Output<String>? = null, project: Output<String>? = null, type: Output<String>? = null)

Properties

Link copied to clipboard
val appEngineIntegrationMode: Output<String>? = null

The App Engine integration mode to use for this database. Possible values are: ENABLED, DISABLED.

Link copied to clipboard
val concurrencyMode: Output<String>? = null

The concurrency control mode to use for this database. Possible values are: OPTIMISTIC, PESSIMISTIC, OPTIMISTIC_WITH_ENTITY_GROUPS.

Link copied to clipboard
val deleteProtectionState: Output<String>? = null

State of delete protection for the database. Possible values are: DELETE_PROTECTION_STATE_UNSPECIFIED, DELETE_PROTECTION_ENABLED, DELETE_PROTECTION_DISABLED.

Link copied to clipboard
val locationId: Output<String>? = null

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

Link copied to clipboard
val name: Output<String>? = null

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 /0-9-/ 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.

Link copied to clipboard

Whether to enable the PITR feature on this database. If POINT_IN_TIME_RECOVERY_ENABLED is selected, reads are supported on selected versions of the data from within the past 7 days. versionRetentionPeriod and earliestVersionTime can be used to determine the supported versions. These include reads against any timestamp within the past hour and reads against 1-minute snapshots beyond 1 hour and within 7 days. If POINT_IN_TIME_RECOVERY_DISABLED is selected, reads are supported on any version of the data from within the past 1 hour. Default value is POINT_IN_TIME_RECOVERY_DISABLED. Possible values are: POINT_IN_TIME_RECOVERY_ENABLED, POINT_IN_TIME_RECOVERY_DISABLED.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val type: Output<String>? = null

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

Functions

Link copied to clipboard
open override fun toJava(): DatabaseArgs