Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.gcp.firestore.kotlin.DatabaseArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.firestore.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.firestore.DatabaseArgs.builder
import com.pulumi.gcp.firestore.kotlin.inputs.DatabaseCmekConfigArgs
import com.pulumi.gcp.firestore.kotlin.inputs.DatabaseCmekConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* A Cloud Firestore Database.
* If you wish to use Firestore with App Engine, use the
* `gcp.appengine.Application`
* resource instead. If you were previously using the `gcp.appengine.Application` resource exclusively for managing a Firestore database
* and would like to use the `gcp.firestore.Database` resource instead, please follow the instructions
* [here](https://cloud.google.com/firestore/docs/app-engine-requirement).
* To get more information about Database, see:
* * [API documentation](https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/firestore/docs/)
* ## Example Usage
* ### Firestore Default Database
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const database = new gcp.firestore.Database("database", {
* project: "my-project-name",
* name: "(default)",
* locationId: "nam5",
* type: "FIRESTORE_NATIVE",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* database = gcp.firestore.Database("database",
* project="my-project-name",
* name="(default)",
* location_id="nam5",
* type="FIRESTORE_NATIVE")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var database = new Gcp.Firestore.Database("database", new()
* {
* Project = "my-project-name",
* Name = "(default)",
* LocationId = "nam5",
* Type = "FIRESTORE_NATIVE",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firestore"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := firestore.NewDatabase(ctx, "database", &firestore.DatabaseArgs{
* Project: pulumi.String("my-project-name"),
* Name: pulumi.String("(default)"),
* LocationId: pulumi.String("nam5"),
* Type: pulumi.String("FIRESTORE_NATIVE"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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 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("my-project-name")
* .name("(default)")
* .locationId("nam5")
* .type("FIRESTORE_NATIVE")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* database:
* type: gcp:firestore:Database
* properties:
* project: my-project-name
* name: (default)
* locationId: nam5
* type: FIRESTORE_NATIVE
* ```
*
* ### Firestore Database
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const database = new gcp.firestore.Database("database", {
* project: "my-project-name",
* name: "database-id",
* locationId: "nam5",
* type: "FIRESTORE_NATIVE",
* concurrencyMode: "OPTIMISTIC",
* appEngineIntegrationMode: "DISABLED",
* pointInTimeRecoveryEnablement: "POINT_IN_TIME_RECOVERY_ENABLED",
* deleteProtectionState: "DELETE_PROTECTION_ENABLED",
* deletionPolicy: "DELETE",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* database = gcp.firestore.Database("database",
* project="my-project-name",
* name="database-id",
* location_id="nam5",
* type="FIRESTORE_NATIVE",
* concurrency_mode="OPTIMISTIC",
* app_engine_integration_mode="DISABLED",
* point_in_time_recovery_enablement="POINT_IN_TIME_RECOVERY_ENABLED",
* delete_protection_state="DELETE_PROTECTION_ENABLED",
* deletion_policy="DELETE")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var database = new Gcp.Firestore.Database("database", new()
* {
* Project = "my-project-name",
* Name = "database-id",
* LocationId = "nam5",
* Type = "FIRESTORE_NATIVE",
* ConcurrencyMode = "OPTIMISTIC",
* AppEngineIntegrationMode = "DISABLED",
* PointInTimeRecoveryEnablement = "POINT_IN_TIME_RECOVERY_ENABLED",
* DeleteProtectionState = "DELETE_PROTECTION_ENABLED",
* DeletionPolicy = "DELETE",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firestore"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := firestore.NewDatabase(ctx, "database", &firestore.DatabaseArgs{
* Project: pulumi.String("my-project-name"),
* Name: pulumi.String("database-id"),
* LocationId: pulumi.String("nam5"),
* Type: pulumi.String("FIRESTORE_NATIVE"),
* ConcurrencyMode: pulumi.String("OPTIMISTIC"),
* AppEngineIntegrationMode: pulumi.String("DISABLED"),
* PointInTimeRecoveryEnablement: pulumi.String("POINT_IN_TIME_RECOVERY_ENABLED"),
* DeleteProtectionState: pulumi.String("DELETE_PROTECTION_ENABLED"),
* DeletionPolicy: pulumi.String("DELETE"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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 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("my-project-name")
* .name("database-id")
* .locationId("nam5")
* .type("FIRESTORE_NATIVE")
* .concurrencyMode("OPTIMISTIC")
* .appEngineIntegrationMode("DISABLED")
* .pointInTimeRecoveryEnablement("POINT_IN_TIME_RECOVERY_ENABLED")
* .deleteProtectionState("DELETE_PROTECTION_ENABLED")
* .deletionPolicy("DELETE")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* database:
* type: gcp:firestore:Database
* properties:
* project: my-project-name
* name: database-id
* locationId: nam5
* type: FIRESTORE_NATIVE
* concurrencyMode: OPTIMISTIC
* appEngineIntegrationMode: DISABLED
* pointInTimeRecoveryEnablement: POINT_IN_TIME_RECOVERY_ENABLED
* deleteProtectionState: DELETE_PROTECTION_ENABLED
* deletionPolicy: DELETE
* ```
*
* ### Firestore Cmek Database
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const project = gcp.organizations.getProject({});
* const keyRing = new gcp.kms.KeyRing("key_ring", {
* name: "kms-key-ring",
* location: "us",
* });
* const cryptoKey = new gcp.kms.CryptoKey("crypto_key", {
* name: "kms-key",
* keyRing: keyRing.id,
* purpose: "ENCRYPT_DECRYPT",
* });
* const firestoreCmekKeyuser = new gcp.kms.CryptoKeyIAMBinding("firestore_cmek_keyuser", {
* cryptoKeyId: cryptoKey.id,
* role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
* members: [project.then(project => `serviceAccount:service-${project.number}@gcp-sa-firestore.iam.gserviceaccount.com`)],
* });
* const database = new gcp.firestore.Database("database", {
* project: "my-project-name",
* name: "cmek-database-id",
* locationId: "nam5",
* type: "FIRESTORE_NATIVE",
* concurrencyMode: "OPTIMISTIC",
* appEngineIntegrationMode: "DISABLED",
* pointInTimeRecoveryEnablement: "POINT_IN_TIME_RECOVERY_ENABLED",
* deleteProtectionState: "DELETE_PROTECTION_ENABLED",
* deletionPolicy: "DELETE",
* cmekConfig: {
* kmsKeyName: cryptoKey.id,
* },
* }, {
* dependsOn: [firestoreCmekKeyuser],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* project = gcp.organizations.get_project()
* key_ring = gcp.kms.KeyRing("key_ring",
* name="kms-key-ring",
* location="us")
* crypto_key = gcp.kms.CryptoKey("crypto_key",
* name="kms-key",
* key_ring=key_ring.id,
* purpose="ENCRYPT_DECRYPT")
* firestore_cmek_keyuser = gcp.kms.CryptoKeyIAMBinding("firestore_cmek_keyuser",
* crypto_key_id=crypto_key.id,
* role="roles/cloudkms.cryptoKeyEncrypterDecrypter",
* members=[f"serviceAccount:service-{project.number}@gcp-sa-firestore.iam.gserviceaccount.com"])
* database = gcp.firestore.Database("database",
* project="my-project-name",
* name="cmek-database-id",
* location_id="nam5",
* type="FIRESTORE_NATIVE",
* concurrency_mode="OPTIMISTIC",
* app_engine_integration_mode="DISABLED",
* point_in_time_recovery_enablement="POINT_IN_TIME_RECOVERY_ENABLED",
* delete_protection_state="DELETE_PROTECTION_ENABLED",
* deletion_policy="DELETE",
* cmek_config={
* "kms_key_name": crypto_key.id,
* },
* opts = pulumi.ResourceOptions(depends_on=[firestore_cmek_keyuser]))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var project = Gcp.Organizations.GetProject.Invoke();
* var keyRing = new Gcp.Kms.KeyRing("key_ring", new()
* {
* Name = "kms-key-ring",
* Location = "us",
* });
* var cryptoKey = new Gcp.Kms.CryptoKey("crypto_key", new()
* {
* Name = "kms-key",
* KeyRing = keyRing.Id,
* Purpose = "ENCRYPT_DECRYPT",
* });
* var firestoreCmekKeyuser = new Gcp.Kms.CryptoKeyIAMBinding("firestore_cmek_keyuser", new()
* {
* CryptoKeyId = cryptoKey.Id,
* Role = "roles/cloudkms.cryptoKeyEncrypterDecrypter",
* Members = new[]
* {
* $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-firestore.iam.gserviceaccount.com",
* },
* });
* var database = new Gcp.Firestore.Database("database", new()
* {
* Project = "my-project-name",
* Name = "cmek-database-id",
* LocationId = "nam5",
* Type = "FIRESTORE_NATIVE",
* ConcurrencyMode = "OPTIMISTIC",
* AppEngineIntegrationMode = "DISABLED",
* PointInTimeRecoveryEnablement = "POINT_IN_TIME_RECOVERY_ENABLED",
* DeleteProtectionState = "DELETE_PROTECTION_ENABLED",
* DeletionPolicy = "DELETE",
* CmekConfig = new Gcp.Firestore.Inputs.DatabaseCmekConfigArgs
* {
* KmsKeyName = cryptoKey.Id,
* },
* }, new CustomResourceOptions
* {
* DependsOn =
* {
* firestoreCmekKeyuser,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firestore"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/kms"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* project, err := organizations.LookupProject(ctx, nil, nil)
* if err != nil {
* return err
* }
* keyRing, err := kms.NewKeyRing(ctx, "key_ring", &kms.KeyRingArgs{
* Name: pulumi.String("kms-key-ring"),
* Location: pulumi.String("us"),
* })
* if err != nil {
* return err
* }
* cryptoKey, err := kms.NewCryptoKey(ctx, "crypto_key", &kms.CryptoKeyArgs{
* Name: pulumi.String("kms-key"),
* KeyRing: keyRing.ID(),
* Purpose: pulumi.String("ENCRYPT_DECRYPT"),
* })
* if err != nil {
* return err
* }
* firestoreCmekKeyuser, err := kms.NewCryptoKeyIAMBinding(ctx, "firestore_cmek_keyuser", &kms.CryptoKeyIAMBindingArgs{
* CryptoKeyId: cryptoKey.ID(),
* Role: pulumi.String("roles/cloudkms.cryptoKeyEncrypterDecrypter"),
* Members: pulumi.StringArray{
* pulumi.Sprintf("serviceAccount:service-%[email protected] ", project.Number),
* },
* })
* if err != nil {
* return err
* }
* _, err = firestore.NewDatabase(ctx, "database", &firestore.DatabaseArgs{
* Project: pulumi.String("my-project-name"),
* Name: pulumi.String("cmek-database-id"),
* LocationId: pulumi.String("nam5"),
* Type: pulumi.String("FIRESTORE_NATIVE"),
* ConcurrencyMode: pulumi.String("OPTIMISTIC"),
* AppEngineIntegrationMode: pulumi.String("DISABLED"),
* PointInTimeRecoveryEnablement: pulumi.String("POINT_IN_TIME_RECOVERY_ENABLED"),
* DeleteProtectionState: pulumi.String("DELETE_PROTECTION_ENABLED"),
* DeletionPolicy: pulumi.String("DELETE"),
* CmekConfig: &firestore.DatabaseCmekConfigArgs{
* KmsKeyName: cryptoKey.ID(),
* },
* }, pulumi.DependsOn([]pulumi.Resource{
* firestoreCmekKeyuser,
* }))
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.organizations.OrganizationsFunctions;
* import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
* import com.pulumi.gcp.kms.KeyRing;
* import com.pulumi.gcp.kms.KeyRingArgs;
* import com.pulumi.gcp.kms.CryptoKey;
* import com.pulumi.gcp.kms.CryptoKeyArgs;
* import com.pulumi.gcp.kms.CryptoKeyIAMBinding;
* import com.pulumi.gcp.kms.CryptoKeyIAMBindingArgs;
* import com.pulumi.gcp.firestore.Database;
* import com.pulumi.gcp.firestore.DatabaseArgs;
* import com.pulumi.gcp.firestore.inputs.DatabaseCmekConfigArgs;
* 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) {
* final var project = OrganizationsFunctions.getProject();
* var keyRing = new KeyRing("keyRing", KeyRingArgs.builder()
* .name("kms-key-ring")
* .location("us")
* .build());
* var cryptoKey = new CryptoKey("cryptoKey", CryptoKeyArgs.builder()
* .name("kms-key")
* .keyRing(keyRing.id())
* .purpose("ENCRYPT_DECRYPT")
* .build());
* var firestoreCmekKeyuser = new CryptoKeyIAMBinding("firestoreCmekKeyuser", CryptoKeyIAMBindingArgs.builder()
* .cryptoKeyId(cryptoKey.id())
* .role("roles/cloudkms.cryptoKeyEncrypterDecrypter")
* .members(String.format("serviceAccount:service-%[email protected] ", project.applyValue(getProjectResult -> getProjectResult.number())))
* .build());
* var database = new Database("database", DatabaseArgs.builder()
* .project("my-project-name")
* .name("cmek-database-id")
* .locationId("nam5")
* .type("FIRESTORE_NATIVE")
* .concurrencyMode("OPTIMISTIC")
* .appEngineIntegrationMode("DISABLED")
* .pointInTimeRecoveryEnablement("POINT_IN_TIME_RECOVERY_ENABLED")
* .deleteProtectionState("DELETE_PROTECTION_ENABLED")
* .deletionPolicy("DELETE")
* .cmekConfig(DatabaseCmekConfigArgs.builder()
* .kmsKeyName(cryptoKey.id())
* .build())
* .build(), CustomResourceOptions.builder()
* .dependsOn(firestoreCmekKeyuser)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* database:
* type: gcp:firestore:Database
* properties:
* project: my-project-name
* name: cmek-database-id
* locationId: nam5
* type: FIRESTORE_NATIVE
* concurrencyMode: OPTIMISTIC
* appEngineIntegrationMode: DISABLED
* pointInTimeRecoveryEnablement: POINT_IN_TIME_RECOVERY_ENABLED
* deleteProtectionState: DELETE_PROTECTION_ENABLED
* deletionPolicy: DELETE
* cmekConfig:
* kmsKeyName: ${cryptoKey.id}
* options:
* dependson:
* - ${firestoreCmekKeyuser}
* cryptoKey:
* type: gcp:kms:CryptoKey
* name: crypto_key
* properties:
* name: kms-key
* keyRing: ${keyRing.id}
* purpose: ENCRYPT_DECRYPT
* keyRing:
* type: gcp:kms:KeyRing
* name: key_ring
* properties:
* name: kms-key-ring
* location: us
* firestoreCmekKeyuser:
* type: gcp:kms:CryptoKeyIAMBinding
* name: firestore_cmek_keyuser
* properties:
* cryptoKeyId: ${cryptoKey.id}
* role: roles/cloudkms.cryptoKeyEncrypterDecrypter
* members:
* - serviceAccount:service-${project.number}@gcp-sa-firestore.iam.gserviceaccount.com
* variables:
* project:
* fn::invoke:
* Function: gcp:organizations:getProject
* Arguments: {}
* ```
*
* ### Firestore Default Database In Datastore Mode
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const datastoreModeDatabase = new gcp.firestore.Database("datastore_mode_database", {
* project: "my-project-name",
* name: "(default)",
* locationId: "nam5",
* type: "DATASTORE_MODE",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* datastore_mode_database = gcp.firestore.Database("datastore_mode_database",
* project="my-project-name",
* name="(default)",
* location_id="nam5",
* type="DATASTORE_MODE")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var datastoreModeDatabase = new Gcp.Firestore.Database("datastore_mode_database", new()
* {
* Project = "my-project-name",
* Name = "(default)",
* LocationId = "nam5",
* Type = "DATASTORE_MODE",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firestore"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := firestore.NewDatabase(ctx, "datastore_mode_database", &firestore.DatabaseArgs{
* Project: pulumi.String("my-project-name"),
* Name: pulumi.String("(default)"),
* LocationId: pulumi.String("nam5"),
* Type: pulumi.String("DATASTORE_MODE"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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 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 datastoreModeDatabase = new Database("datastoreModeDatabase", DatabaseArgs.builder()
* .project("my-project-name")
* .name("(default)")
* .locationId("nam5")
* .type("DATASTORE_MODE")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* datastoreModeDatabase:
* type: gcp:firestore:Database
* name: datastore_mode_database
* properties:
* project: my-project-name
* name: (default)
* locationId: nam5
* type: DATASTORE_MODE
* ```
*
* ### Firestore Database In Datastore Mode
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const datastoreModeDatabase = new gcp.firestore.Database("datastore_mode_database", {
* project: "my-project-name",
* name: "database-id",
* locationId: "nam5",
* type: "DATASTORE_MODE",
* concurrencyMode: "OPTIMISTIC",
* appEngineIntegrationMode: "DISABLED",
* pointInTimeRecoveryEnablement: "POINT_IN_TIME_RECOVERY_ENABLED",
* deleteProtectionState: "DELETE_PROTECTION_ENABLED",
* deletionPolicy: "DELETE",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* datastore_mode_database = gcp.firestore.Database("datastore_mode_database",
* project="my-project-name",
* name="database-id",
* location_id="nam5",
* type="DATASTORE_MODE",
* concurrency_mode="OPTIMISTIC",
* app_engine_integration_mode="DISABLED",
* point_in_time_recovery_enablement="POINT_IN_TIME_RECOVERY_ENABLED",
* delete_protection_state="DELETE_PROTECTION_ENABLED",
* deletion_policy="DELETE")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var datastoreModeDatabase = new Gcp.Firestore.Database("datastore_mode_database", new()
* {
* Project = "my-project-name",
* Name = "database-id",
* LocationId = "nam5",
* Type = "DATASTORE_MODE",
* ConcurrencyMode = "OPTIMISTIC",
* AppEngineIntegrationMode = "DISABLED",
* PointInTimeRecoveryEnablement = "POINT_IN_TIME_RECOVERY_ENABLED",
* DeleteProtectionState = "DELETE_PROTECTION_ENABLED",
* DeletionPolicy = "DELETE",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firestore"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := firestore.NewDatabase(ctx, "datastore_mode_database", &firestore.DatabaseArgs{
* Project: pulumi.String("my-project-name"),
* Name: pulumi.String("database-id"),
* LocationId: pulumi.String("nam5"),
* Type: pulumi.String("DATASTORE_MODE"),
* ConcurrencyMode: pulumi.String("OPTIMISTIC"),
* AppEngineIntegrationMode: pulumi.String("DISABLED"),
* PointInTimeRecoveryEnablement: pulumi.String("POINT_IN_TIME_RECOVERY_ENABLED"),
* DeleteProtectionState: pulumi.String("DELETE_PROTECTION_ENABLED"),
* DeletionPolicy: pulumi.String("DELETE"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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 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 datastoreModeDatabase = new Database("datastoreModeDatabase", DatabaseArgs.builder()
* .project("my-project-name")
* .name("database-id")
* .locationId("nam5")
* .type("DATASTORE_MODE")
* .concurrencyMode("OPTIMISTIC")
* .appEngineIntegrationMode("DISABLED")
* .pointInTimeRecoveryEnablement("POINT_IN_TIME_RECOVERY_ENABLED")
* .deleteProtectionState("DELETE_PROTECTION_ENABLED")
* .deletionPolicy("DELETE")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* datastoreModeDatabase:
* type: gcp:firestore:Database
* name: datastore_mode_database
* properties:
* project: my-project-name
* name: database-id
* locationId: nam5
* type: DATASTORE_MODE
* concurrencyMode: OPTIMISTIC
* appEngineIntegrationMode: DISABLED
* pointInTimeRecoveryEnablement: POINT_IN_TIME_RECOVERY_ENABLED
* deleteProtectionState: DELETE_PROTECTION_ENABLED
* deletionPolicy: DELETE
* ```
*
* ### Firestore Cmek Database In Datastore Mode
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const project = gcp.organizations.getProject({});
* const keyRing = new gcp.kms.KeyRing("key_ring", {
* name: "kms-key-ring",
* location: "us",
* });
* const cryptoKey = new gcp.kms.CryptoKey("crypto_key", {
* name: "kms-key",
* keyRing: keyRing.id,
* purpose: "ENCRYPT_DECRYPT",
* });
* const firestoreCmekKeyuser = new gcp.kms.CryptoKeyIAMBinding("firestore_cmek_keyuser", {
* cryptoKeyId: cryptoKey.id,
* role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
* members: [project.then(project => `serviceAccount:service-${project.number}@gcp-sa-firestore.iam.gserviceaccount.com`)],
* });
* const database = new gcp.firestore.Database("database", {
* project: "my-project-name",
* name: "cmek-database-id",
* locationId: "nam5",
* type: "DATASTORE_MODE",
* concurrencyMode: "OPTIMISTIC",
* appEngineIntegrationMode: "DISABLED",
* pointInTimeRecoveryEnablement: "POINT_IN_TIME_RECOVERY_ENABLED",
* deleteProtectionState: "DELETE_PROTECTION_ENABLED",
* deletionPolicy: "DELETE",
* cmekConfig: {
* kmsKeyName: cryptoKey.id,
* },
* }, {
* dependsOn: [firestoreCmekKeyuser],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* project = gcp.organizations.get_project()
* key_ring = gcp.kms.KeyRing("key_ring",
* name="kms-key-ring",
* location="us")
* crypto_key = gcp.kms.CryptoKey("crypto_key",
* name="kms-key",
* key_ring=key_ring.id,
* purpose="ENCRYPT_DECRYPT")
* firestore_cmek_keyuser = gcp.kms.CryptoKeyIAMBinding("firestore_cmek_keyuser",
* crypto_key_id=crypto_key.id,
* role="roles/cloudkms.cryptoKeyEncrypterDecrypter",
* members=[f"serviceAccount:service-{project.number}@gcp-sa-firestore.iam.gserviceaccount.com"])
* database = gcp.firestore.Database("database",
* project="my-project-name",
* name="cmek-database-id",
* location_id="nam5",
* type="DATASTORE_MODE",
* concurrency_mode="OPTIMISTIC",
* app_engine_integration_mode="DISABLED",
* point_in_time_recovery_enablement="POINT_IN_TIME_RECOVERY_ENABLED",
* delete_protection_state="DELETE_PROTECTION_ENABLED",
* deletion_policy="DELETE",
* cmek_config={
* "kms_key_name": crypto_key.id,
* },
* opts = pulumi.ResourceOptions(depends_on=[firestore_cmek_keyuser]))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var project = Gcp.Organizations.GetProject.Invoke();
* var keyRing = new Gcp.Kms.KeyRing("key_ring", new()
* {
* Name = "kms-key-ring",
* Location = "us",
* });
* var cryptoKey = new Gcp.Kms.CryptoKey("crypto_key", new()
* {
* Name = "kms-key",
* KeyRing = keyRing.Id,
* Purpose = "ENCRYPT_DECRYPT",
* });
* var firestoreCmekKeyuser = new Gcp.Kms.CryptoKeyIAMBinding("firestore_cmek_keyuser", new()
* {
* CryptoKeyId = cryptoKey.Id,
* Role = "roles/cloudkms.cryptoKeyEncrypterDecrypter",
* Members = new[]
* {
* $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-firestore.iam.gserviceaccount.com",
* },
* });
* var database = new Gcp.Firestore.Database("database", new()
* {
* Project = "my-project-name",
* Name = "cmek-database-id",
* LocationId = "nam5",
* Type = "DATASTORE_MODE",
* ConcurrencyMode = "OPTIMISTIC",
* AppEngineIntegrationMode = "DISABLED",
* PointInTimeRecoveryEnablement = "POINT_IN_TIME_RECOVERY_ENABLED",
* DeleteProtectionState = "DELETE_PROTECTION_ENABLED",
* DeletionPolicy = "DELETE",
* CmekConfig = new Gcp.Firestore.Inputs.DatabaseCmekConfigArgs
* {
* KmsKeyName = cryptoKey.Id,
* },
* }, new CustomResourceOptions
* {
* DependsOn =
* {
* firestoreCmekKeyuser,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firestore"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/kms"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* project, err := organizations.LookupProject(ctx, nil, nil)
* if err != nil {
* return err
* }
* keyRing, err := kms.NewKeyRing(ctx, "key_ring", &kms.KeyRingArgs{
* Name: pulumi.String("kms-key-ring"),
* Location: pulumi.String("us"),
* })
* if err != nil {
* return err
* }
* cryptoKey, err := kms.NewCryptoKey(ctx, "crypto_key", &kms.CryptoKeyArgs{
* Name: pulumi.String("kms-key"),
* KeyRing: keyRing.ID(),
* Purpose: pulumi.String("ENCRYPT_DECRYPT"),
* })
* if err != nil {
* return err
* }
* firestoreCmekKeyuser, err := kms.NewCryptoKeyIAMBinding(ctx, "firestore_cmek_keyuser", &kms.CryptoKeyIAMBindingArgs{
* CryptoKeyId: cryptoKey.ID(),
* Role: pulumi.String("roles/cloudkms.cryptoKeyEncrypterDecrypter"),
* Members: pulumi.StringArray{
* pulumi.Sprintf("serviceAccount:service-%[email protected] ", project.Number),
* },
* })
* if err != nil {
* return err
* }
* _, err = firestore.NewDatabase(ctx, "database", &firestore.DatabaseArgs{
* Project: pulumi.String("my-project-name"),
* Name: pulumi.String("cmek-database-id"),
* LocationId: pulumi.String("nam5"),
* Type: pulumi.String("DATASTORE_MODE"),
* ConcurrencyMode: pulumi.String("OPTIMISTIC"),
* AppEngineIntegrationMode: pulumi.String("DISABLED"),
* PointInTimeRecoveryEnablement: pulumi.String("POINT_IN_TIME_RECOVERY_ENABLED"),
* DeleteProtectionState: pulumi.String("DELETE_PROTECTION_ENABLED"),
* DeletionPolicy: pulumi.String("DELETE"),
* CmekConfig: &firestore.DatabaseCmekConfigArgs{
* KmsKeyName: cryptoKey.ID(),
* },
* }, pulumi.DependsOn([]pulumi.Resource{
* firestoreCmekKeyuser,
* }))
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.organizations.OrganizationsFunctions;
* import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
* import com.pulumi.gcp.kms.KeyRing;
* import com.pulumi.gcp.kms.KeyRingArgs;
* import com.pulumi.gcp.kms.CryptoKey;
* import com.pulumi.gcp.kms.CryptoKeyArgs;
* import com.pulumi.gcp.kms.CryptoKeyIAMBinding;
* import com.pulumi.gcp.kms.CryptoKeyIAMBindingArgs;
* import com.pulumi.gcp.firestore.Database;
* import com.pulumi.gcp.firestore.DatabaseArgs;
* import com.pulumi.gcp.firestore.inputs.DatabaseCmekConfigArgs;
* 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) {
* final var project = OrganizationsFunctions.getProject();
* var keyRing = new KeyRing("keyRing", KeyRingArgs.builder()
* .name("kms-key-ring")
* .location("us")
* .build());
* var cryptoKey = new CryptoKey("cryptoKey", CryptoKeyArgs.builder()
* .name("kms-key")
* .keyRing(keyRing.id())
* .purpose("ENCRYPT_DECRYPT")
* .build());
* var firestoreCmekKeyuser = new CryptoKeyIAMBinding("firestoreCmekKeyuser", CryptoKeyIAMBindingArgs.builder()
* .cryptoKeyId(cryptoKey.id())
* .role("roles/cloudkms.cryptoKeyEncrypterDecrypter")
* .members(String.format("serviceAccount:service-%[email protected] ", project.applyValue(getProjectResult -> getProjectResult.number())))
* .build());
* var database = new Database("database", DatabaseArgs.builder()
* .project("my-project-name")
* .name("cmek-database-id")
* .locationId("nam5")
* .type("DATASTORE_MODE")
* .concurrencyMode("OPTIMISTIC")
* .appEngineIntegrationMode("DISABLED")
* .pointInTimeRecoveryEnablement("POINT_IN_TIME_RECOVERY_ENABLED")
* .deleteProtectionState("DELETE_PROTECTION_ENABLED")
* .deletionPolicy("DELETE")
* .cmekConfig(DatabaseCmekConfigArgs.builder()
* .kmsKeyName(cryptoKey.id())
* .build())
* .build(), CustomResourceOptions.builder()
* .dependsOn(firestoreCmekKeyuser)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* database:
* type: gcp:firestore:Database
* properties:
* project: my-project-name
* name: cmek-database-id
* locationId: nam5
* type: DATASTORE_MODE
* concurrencyMode: OPTIMISTIC
* appEngineIntegrationMode: DISABLED
* pointInTimeRecoveryEnablement: POINT_IN_TIME_RECOVERY_ENABLED
* deleteProtectionState: DELETE_PROTECTION_ENABLED
* deletionPolicy: DELETE
* cmekConfig:
* kmsKeyName: ${cryptoKey.id}
* options:
* dependson:
* - ${firestoreCmekKeyuser}
* cryptoKey:
* type: gcp:kms:CryptoKey
* name: crypto_key
* properties:
* name: kms-key
* keyRing: ${keyRing.id}
* purpose: ENCRYPT_DECRYPT
* keyRing:
* type: gcp:kms:KeyRing
* name: key_ring
* properties:
* name: kms-key-ring
* location: us
* firestoreCmekKeyuser:
* type: gcp:kms:CryptoKeyIAMBinding
* name: firestore_cmek_keyuser
* properties:
* cryptoKeyId: ${cryptoKey.id}
* role: roles/cloudkms.cryptoKeyEncrypterDecrypter
* members:
* - serviceAccount:service-${project.number}@gcp-sa-firestore.iam.gserviceaccount.com
* variables:
* project:
* fn::invoke:
* Function: gcp:organizations:getProject
* Arguments: {}
* ```
*
* ## Import
* Database can be imported using any of these accepted formats:
* * `projects/{{project}}/databases/{{name}}`
* * `{{project}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, Database can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:firestore/database:Database default projects/{{project}}/databases/{{name}}
* ```
* ```sh
* $ pulumi import gcp:firestore/database:Database default {{project}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:firestore/database:Database default {{name}}
* ```
* @property appEngineIntegrationMode The App Engine integration mode to use for this database.
* Possible values are: `ENABLED`, `DISABLED`.
* @property cmekConfig The CMEK (Customer Managed Encryption Key) configuration for a Firestore
* database. If not present, the database is secured by the default Google
* encryption key.
* Structure is documented below.
* @property concurrencyMode The concurrency control mode to use for this database.
* Possible values are: `OPTIMISTIC`, `PESSIMISTIC`, `OPTIMISTIC_WITH_ENTITY_GROUPS`.
* @property deleteProtectionState
* @property deletionPolicy
* @property locationId The location of the database. Available locations are listed at
* https://cloud.google.com/firestore/docs/locations.
* @property name 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][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.
* @property pointInTimeRecoveryEnablement 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`.
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property type 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`.
* - - -
*/
public data class DatabaseArgs(
public val appEngineIntegrationMode: Output? = null,
public val cmekConfig: Output? = null,
public val concurrencyMode: Output? = null,
public val deleteProtectionState: Output? = null,
public val deletionPolicy: Output? = null,
public val locationId: Output? = null,
public val name: Output? = null,
public val pointInTimeRecoveryEnablement: Output? = null,
public val project: Output? = null,
public val type: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.firestore.DatabaseArgs =
com.pulumi.gcp.firestore.DatabaseArgs.builder()
.appEngineIntegrationMode(appEngineIntegrationMode?.applyValue({ args0 -> args0 }))
.cmekConfig(cmekConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.concurrencyMode(concurrencyMode?.applyValue({ args0 -> args0 }))
.deleteProtectionState(deleteProtectionState?.applyValue({ args0 -> args0 }))
.deletionPolicy(deletionPolicy?.applyValue({ args0 -> args0 }))
.locationId(locationId?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.pointInTimeRecoveryEnablement(pointInTimeRecoveryEnablement?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.type(type?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [DatabaseArgs].
*/
@PulumiTagMarker
public class DatabaseArgsBuilder internal constructor() {
private var appEngineIntegrationMode: Output? = null
private var cmekConfig: Output? = null
private var concurrencyMode: Output? = null
private var deleteProtectionState: Output? = null
private var deletionPolicy: Output? = null
private var locationId: Output? = null
private var name: Output? = null
private var pointInTimeRecoveryEnablement: Output? = null
private var project: Output? = null
private var type: Output? = null
/**
* @param value The App Engine integration mode to use for this database.
* Possible values are: `ENABLED`, `DISABLED`.
*/
@JvmName("iwuuaopdjcwqaehy")
public suspend fun appEngineIntegrationMode(`value`: Output) {
this.appEngineIntegrationMode = value
}
/**
* @param value The CMEK (Customer Managed Encryption Key) configuration for a Firestore
* database. If not present, the database is secured by the default Google
* encryption key.
* Structure is documented below.
*/
@JvmName("qurcwfnnnpigtkrj")
public suspend fun cmekConfig(`value`: Output) {
this.cmekConfig = value
}
/**
* @param value The concurrency control mode to use for this database.
* Possible values are: `OPTIMISTIC`, `PESSIMISTIC`, `OPTIMISTIC_WITH_ENTITY_GROUPS`.
*/
@JvmName("lqqyflxgqbypuiqv")
public suspend fun concurrencyMode(`value`: Output) {
this.concurrencyMode = value
}
/**
* @param value
*/
@JvmName("fbejarnwpqgmhvyu")
public suspend fun deleteProtectionState(`value`: Output) {
this.deleteProtectionState = value
}
/**
* @param value
*/
@JvmName("gfcfuwwfeykyuyty")
public suspend fun deletionPolicy(`value`: Output) {
this.deletionPolicy = value
}
/**
* @param value The location of the database. Available locations are listed at
* https://cloud.google.com/firestore/docs/locations.
*/
@JvmName("agccfobgijerxoro")
public suspend fun locationId(`value`: Output) {
this.locationId = value
}
/**
* @param value 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][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.
*/
@JvmName("cjisgsjxpofvdofb")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value 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`.
*/
@JvmName("ismjxaoxgmsugsxg")
public suspend fun pointInTimeRecoveryEnablement(`value`: Output) {
this.pointInTimeRecoveryEnablement = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("lhwywslhtvxbihgf")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value 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`.
* - - -
*/
@JvmName("bccyspwbybejmrmb")
public suspend fun type(`value`: Output) {
this.type = value
}
/**
* @param value The App Engine integration mode to use for this database.
* Possible values are: `ENABLED`, `DISABLED`.
*/
@JvmName("kfnvvykpnqwtjfbk")
public suspend fun appEngineIntegrationMode(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.appEngineIntegrationMode = mapped
}
/**
* @param value The CMEK (Customer Managed Encryption Key) configuration for a Firestore
* database. If not present, the database is secured by the default Google
* encryption key.
* Structure is documented below.
*/
@JvmName("oysbqwtpxsfmgdua")
public suspend fun cmekConfig(`value`: DatabaseCmekConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.cmekConfig = mapped
}
/**
* @param argument The CMEK (Customer Managed Encryption Key) configuration for a Firestore
* database. If not present, the database is secured by the default Google
* encryption key.
* Structure is documented below.
*/
@JvmName("qwfontdnyhukvhvf")
public suspend fun cmekConfig(argument: suspend DatabaseCmekConfigArgsBuilder.() -> Unit) {
val toBeMapped = DatabaseCmekConfigArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.cmekConfig = mapped
}
/**
* @param value The concurrency control mode to use for this database.
* Possible values are: `OPTIMISTIC`, `PESSIMISTIC`, `OPTIMISTIC_WITH_ENTITY_GROUPS`.
*/
@JvmName("kkhmhxkbeqwpeifg")
public suspend fun concurrencyMode(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.concurrencyMode = mapped
}
/**
* @param value
*/
@JvmName("ghixkrprktdtwnad")
public suspend fun deleteProtectionState(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deleteProtectionState = mapped
}
/**
* @param value
*/
@JvmName("wivtdmgxliexytiu")
public suspend fun deletionPolicy(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deletionPolicy = mapped
}
/**
* @param value The location of the database. Available locations are listed at
* https://cloud.google.com/firestore/docs/locations.
*/
@JvmName("enpbyriwrgcxmbcu")
public suspend fun locationId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.locationId = mapped
}
/**
* @param value 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][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.
*/
@JvmName("ainoguhxmmdsrmri")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value 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`.
*/
@JvmName("dqmoyovkpxphrslq")
public suspend fun pointInTimeRecoveryEnablement(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.pointInTimeRecoveryEnablement = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("pmouydvdfcmgirtq")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value 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`.
* - - -
*/
@JvmName("ftjirwkfdwtxjcma")
public suspend fun type(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.type = mapped
}
internal fun build(): DatabaseArgs = DatabaseArgs(
appEngineIntegrationMode = appEngineIntegrationMode,
cmekConfig = cmekConfig,
concurrencyMode = concurrencyMode,
deleteProtectionState = deleteProtectionState,
deletionPolicy = deletionPolicy,
locationId = locationId,
name = name,
pointInTimeRecoveryEnablement = pointInTimeRecoveryEnablement,
project = project,
type = type,
)
}