com.pulumi.gcp.firebase.kotlin.AppCheckServiceConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.firebase.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [AppCheckServiceConfig].
*/
@PulumiTagMarker
public class AppCheckServiceConfigResourceBuilder internal constructor() {
public var name: String? = null
public var args: AppCheckServiceConfigArgs = AppCheckServiceConfigArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend AppCheckServiceConfigArgsBuilder.() -> Unit) {
val builder = AppCheckServiceConfigArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): AppCheckServiceConfig {
val builtJavaResource = com.pulumi.gcp.firebase.AppCheckServiceConfig(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AppCheckServiceConfig(builtJavaResource)
}
}
/**
* The enforcement configuration for a service supported by App Check.
* To get more information about ServiceConfig, see:
* * [API documentation](https://firebase.google.com/docs/reference/appcheck/rest/v1/projects.services)
* * How-to Guides
* * [Official Documentation](https://firebase.google.com/docs/app-check)
* ## Example Usage
* ### Firebase App Check Service Config Off
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const appcheck = new gcp.projects.Service("appcheck", {
* project: "my-project-name",
* service: "firebaseappcheck.googleapis.com",
* disableOnDestroy: false,
* });
* const _default = new gcp.firebase.AppCheckServiceConfig("default", {
* project: "my-project-name",
* serviceId: "firestore.googleapis.com",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* appcheck = gcp.projects.Service("appcheck",
* project="my-project-name",
* service="firebaseappcheck.googleapis.com",
* disable_on_destroy=False)
* default = gcp.firebase.AppCheckServiceConfig("default",
* project="my-project-name",
* service_id="firestore.googleapis.com")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var appcheck = new Gcp.Projects.Service("appcheck", new()
* {
* Project = "my-project-name",
* ServiceName = "firebaseappcheck.googleapis.com",
* DisableOnDestroy = false,
* });
* var @default = new Gcp.Firebase.AppCheckServiceConfig("default", new()
* {
* Project = "my-project-name",
* ServiceId = "firestore.googleapis.com",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firebase"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/projects"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := projects.NewService(ctx, "appcheck", &projects.ServiceArgs{
* Project: pulumi.String("my-project-name"),
* Service: pulumi.String("firebaseappcheck.googleapis.com"),
* DisableOnDestroy: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* _, err = firebase.NewAppCheckServiceConfig(ctx, "default", &firebase.AppCheckServiceConfigArgs{
* Project: pulumi.String("my-project-name"),
* ServiceId: pulumi.String("firestore.googleapis.com"),
* })
* 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.projects.Service;
* import com.pulumi.gcp.projects.ServiceArgs;
* import com.pulumi.gcp.firebase.AppCheckServiceConfig;
* import com.pulumi.gcp.firebase.AppCheckServiceConfigArgs;
* 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 appcheck = new Service("appcheck", ServiceArgs.builder()
* .project("my-project-name")
* .service("firebaseappcheck.googleapis.com")
* .disableOnDestroy(false)
* .build());
* var default_ = new AppCheckServiceConfig("default", AppCheckServiceConfigArgs.builder()
* .project("my-project-name")
* .serviceId("firestore.googleapis.com")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* appcheck:
* type: gcp:projects:Service
* properties:
* project: my-project-name
* service: firebaseappcheck.googleapis.com
* disableOnDestroy: false
* default:
* type: gcp:firebase:AppCheckServiceConfig
* properties:
* project: my-project-name
* serviceId: firestore.googleapis.com
* ```
*
* ### Firebase App Check Service Config Enforced
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const appcheck = new gcp.projects.Service("appcheck", {
* project: "my-project-name",
* service: "firebaseappcheck.googleapis.com",
* disableOnDestroy: false,
* });
* const _default = new gcp.firebase.AppCheckServiceConfig("default", {
* project: "my-project-name",
* serviceId: "firebasestorage.googleapis.com",
* enforcementMode: "ENFORCED",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* appcheck = gcp.projects.Service("appcheck",
* project="my-project-name",
* service="firebaseappcheck.googleapis.com",
* disable_on_destroy=False)
* default = gcp.firebase.AppCheckServiceConfig("default",
* project="my-project-name",
* service_id="firebasestorage.googleapis.com",
* enforcement_mode="ENFORCED")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var appcheck = new Gcp.Projects.Service("appcheck", new()
* {
* Project = "my-project-name",
* ServiceName = "firebaseappcheck.googleapis.com",
* DisableOnDestroy = false,
* });
* var @default = new Gcp.Firebase.AppCheckServiceConfig("default", new()
* {
* Project = "my-project-name",
* ServiceId = "firebasestorage.googleapis.com",
* EnforcementMode = "ENFORCED",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firebase"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/projects"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := projects.NewService(ctx, "appcheck", &projects.ServiceArgs{
* Project: pulumi.String("my-project-name"),
* Service: pulumi.String("firebaseappcheck.googleapis.com"),
* DisableOnDestroy: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* _, err = firebase.NewAppCheckServiceConfig(ctx, "default", &firebase.AppCheckServiceConfigArgs{
* Project: pulumi.String("my-project-name"),
* ServiceId: pulumi.String("firebasestorage.googleapis.com"),
* EnforcementMode: pulumi.String("ENFORCED"),
* })
* 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.projects.Service;
* import com.pulumi.gcp.projects.ServiceArgs;
* import com.pulumi.gcp.firebase.AppCheckServiceConfig;
* import com.pulumi.gcp.firebase.AppCheckServiceConfigArgs;
* 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 appcheck = new Service("appcheck", ServiceArgs.builder()
* .project("my-project-name")
* .service("firebaseappcheck.googleapis.com")
* .disableOnDestroy(false)
* .build());
* var default_ = new AppCheckServiceConfig("default", AppCheckServiceConfigArgs.builder()
* .project("my-project-name")
* .serviceId("firebasestorage.googleapis.com")
* .enforcementMode("ENFORCED")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* appcheck:
* type: gcp:projects:Service
* properties:
* project: my-project-name
* service: firebaseappcheck.googleapis.com
* disableOnDestroy: false
* default:
* type: gcp:firebase:AppCheckServiceConfig
* properties:
* project: my-project-name
* serviceId: firebasestorage.googleapis.com
* enforcementMode: ENFORCED
* ```
*
* ### Firebase App Check Service Config Unenforced
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const appcheck = new gcp.projects.Service("appcheck", {
* project: "my-project-name",
* service: "firebaseappcheck.googleapis.com",
* disableOnDestroy: false,
* });
* const _default = new gcp.firebase.AppCheckServiceConfig("default", {
* project: "my-project-name",
* serviceId: "identitytoolkit.googleapis.com",
* enforcementMode: "UNENFORCED",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* appcheck = gcp.projects.Service("appcheck",
* project="my-project-name",
* service="firebaseappcheck.googleapis.com",
* disable_on_destroy=False)
* default = gcp.firebase.AppCheckServiceConfig("default",
* project="my-project-name",
* service_id="identitytoolkit.googleapis.com",
* enforcement_mode="UNENFORCED")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var appcheck = new Gcp.Projects.Service("appcheck", new()
* {
* Project = "my-project-name",
* ServiceName = "firebaseappcheck.googleapis.com",
* DisableOnDestroy = false,
* });
* var @default = new Gcp.Firebase.AppCheckServiceConfig("default", new()
* {
* Project = "my-project-name",
* ServiceId = "identitytoolkit.googleapis.com",
* EnforcementMode = "UNENFORCED",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firebase"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/projects"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := projects.NewService(ctx, "appcheck", &projects.ServiceArgs{
* Project: pulumi.String("my-project-name"),
* Service: pulumi.String("firebaseappcheck.googleapis.com"),
* DisableOnDestroy: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* _, err = firebase.NewAppCheckServiceConfig(ctx, "default", &firebase.AppCheckServiceConfigArgs{
* Project: pulumi.String("my-project-name"),
* ServiceId: pulumi.String("identitytoolkit.googleapis.com"),
* EnforcementMode: pulumi.String("UNENFORCED"),
* })
* 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.projects.Service;
* import com.pulumi.gcp.projects.ServiceArgs;
* import com.pulumi.gcp.firebase.AppCheckServiceConfig;
* import com.pulumi.gcp.firebase.AppCheckServiceConfigArgs;
* 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 appcheck = new Service("appcheck", ServiceArgs.builder()
* .project("my-project-name")
* .service("firebaseappcheck.googleapis.com")
* .disableOnDestroy(false)
* .build());
* var default_ = new AppCheckServiceConfig("default", AppCheckServiceConfigArgs.builder()
* .project("my-project-name")
* .serviceId("identitytoolkit.googleapis.com")
* .enforcementMode("UNENFORCED")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* appcheck:
* type: gcp:projects:Service
* properties:
* project: my-project-name
* service: firebaseappcheck.googleapis.com
* disableOnDestroy: false
* default:
* type: gcp:firebase:AppCheckServiceConfig
* properties:
* project: my-project-name
* serviceId: identitytoolkit.googleapis.com
* enforcementMode: UNENFORCED
* ```
*
* ## Import
* ServiceConfig can be imported using any of these accepted formats:
* * `projects/{{project}}/services/{{service_id}}`
* * `{{project}}/{{service_id}}`
* * `{{service_id}}`
* When using the `pulumi import` command, ServiceConfig can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:firebase/appCheckServiceConfig:AppCheckServiceConfig default projects/{{project}}/services/{{service_id}}
* ```
* ```sh
* $ pulumi import gcp:firebase/appCheckServiceConfig:AppCheckServiceConfig default {{project}}/{{service_id}}
* ```
* ```sh
* $ pulumi import gcp:firebase/appCheckServiceConfig:AppCheckServiceConfig default {{service_id}}
* ```
*/
public class AppCheckServiceConfig internal constructor(
override val javaResource: com.pulumi.gcp.firebase.AppCheckServiceConfig,
) : KotlinCustomResource(javaResource, AppCheckServiceConfigMapper) {
public val enforcementMode: Output?
get() = javaResource.enforcementMode().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The fully-qualified resource name of the service enforcement configuration.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* The identifier of the service to configure enforcement. Currently, the following service IDs are supported:
* firebasestorage.googleapis.com (Cloud Storage for Firebase)
* firebasedatabase.googleapis.com (Firebase Realtime Database)
* firestore.googleapis.com (Cloud Firestore)
* identitytoolkit.googleapis.com (Authentication)
* - - -
*/
public val serviceId: Output
get() = javaResource.serviceId().applyValue({ args0 -> args0 })
}
public object AppCheckServiceConfigMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.firebase.AppCheckServiceConfig::class == javaResource::class
override fun map(javaResource: Resource): AppCheckServiceConfig =
AppCheckServiceConfig(javaResource as com.pulumi.gcp.firebase.AppCheckServiceConfig)
}
/**
* @see [AppCheckServiceConfig].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AppCheckServiceConfig].
*/
public suspend fun appCheckServiceConfig(
name: String,
block: suspend AppCheckServiceConfigResourceBuilder.() -> Unit,
): AppCheckServiceConfig {
val builder = AppCheckServiceConfigResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AppCheckServiceConfig].
* @param name The _unique_ name of the resulting resource.
*/
public fun appCheckServiceConfig(name: String): AppCheckServiceConfig {
val builder = AppCheckServiceConfigResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy