All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.firebase.kotlin.AppCheckServiceConfigArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.firebase.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.firebase.AppCheckServiceConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * 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}}
 * ```
 * @property enforcementMode
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property serviceId 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 data class AppCheckServiceConfigArgs(
    public val enforcementMode: Output? = null,
    public val project: Output? = null,
    public val serviceId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.firebase.AppCheckServiceConfigArgs =
        com.pulumi.gcp.firebase.AppCheckServiceConfigArgs.builder()
            .enforcementMode(enforcementMode?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .serviceId(serviceId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AppCheckServiceConfigArgs].
 */
@PulumiTagMarker
public class AppCheckServiceConfigArgsBuilder internal constructor() {
    private var enforcementMode: Output? = null

    private var project: Output? = null

    private var serviceId: Output? = null

    /**
     * @param value
     */
    @JvmName("xmuwbofvynlinfwg")
    public suspend fun enforcementMode(`value`: Output) {
        this.enforcementMode = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("pknictynijtptrlp")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value 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)
     * - - -
     */
    @JvmName("mwhysrrjtgjbbagc")
    public suspend fun serviceId(`value`: Output) {
        this.serviceId = value
    }

    /**
     * @param value
     */
    @JvmName("yyulabsscqodwseh")
    public suspend fun enforcementMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enforcementMode = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("ggilktnkagraowfh")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value 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)
     * - - -
     */
    @JvmName("hicqbbyrmgrebukr")
    public suspend fun serviceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceId = mapped
    }

    internal fun build(): AppCheckServiceConfigArgs = AppCheckServiceConfigArgs(
        enforcementMode = enforcementMode,
        project = project,
        serviceId = serviceId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy