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

com.pulumi.gcp.firebase.kotlin.AndroidAppArgs.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.AndroidAppArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * ### Firebase Android App Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const basic = new gcp.firebase.AndroidApp("basic", {
 *     project: "my-project-name",
 *     displayName: "Display Name Basic",
 *     packageName: "android.package.app",
 *     sha1Hashes: ["2145bdf698b8715039bd0e83f2069bed435ac21c"],
 *     sha256Hashes: ["2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc"],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * basic = gcp.firebase.AndroidApp("basic",
 *     project="my-project-name",
 *     display_name="Display Name Basic",
 *     package_name="android.package.app",
 *     sha1_hashes=["2145bdf698b8715039bd0e83f2069bed435ac21c"],
 *     sha256_hashes=["2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc"])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var basic = new Gcp.Firebase.AndroidApp("basic", new()
 *     {
 *         Project = "my-project-name",
 *         DisplayName = "Display Name Basic",
 *         PackageName = "android.package.app",
 *         Sha1Hashes = new[]
 *         {
 *             "2145bdf698b8715039bd0e83f2069bed435ac21c",
 *         },
 *         Sha256Hashes = new[]
 *         {
 *             "2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firebase"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := firebase.NewAndroidApp(ctx, "basic", &firebase.AndroidAppArgs{
 * 			Project:     pulumi.String("my-project-name"),
 * 			DisplayName: pulumi.String("Display Name Basic"),
 * 			PackageName: pulumi.String("android.package.app"),
 * 			Sha1Hashes: pulumi.StringArray{
 * 				pulumi.String("2145bdf698b8715039bd0e83f2069bed435ac21c"),
 * 			},
 * 			Sha256Hashes: pulumi.StringArray{
 * 				pulumi.String("2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc"),
 * 			},
 * 		})
 * 		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.firebase.AndroidApp;
 * import com.pulumi.gcp.firebase.AndroidAppArgs;
 * 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 basic = new AndroidApp("basic", AndroidAppArgs.builder()
 *             .project("my-project-name")
 *             .displayName("Display Name Basic")
 *             .packageName("android.package.app")
 *             .sha1Hashes("2145bdf698b8715039bd0e83f2069bed435ac21c")
 *             .sha256Hashes("2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   basic:
 *     type: gcp:firebase:AndroidApp
 *     properties:
 *       project: my-project-name
 *       displayName: Display Name Basic
 *       packageName: android.package.app
 *       sha1Hashes:
 *         - 2145bdf698b8715039bd0e83f2069bed435ac21c
 *       sha256Hashes:
 *         - 2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc
 * ```
 * 
 * ### Firebase Android App Custom Api Key
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const android = new gcp.projects.ApiKey("android", {
 *     name: "api-key",
 *     displayName: "Display Name",
 *     project: "my-project-name",
 *     restrictions: {
 *         androidKeyRestrictions: {
 *             allowedApplications: [{
 *                 packageName: "android.package.app",
 *                 sha1Fingerprint: "2145bdf698b8715039bd0e83f2069bed435ac21c",
 *             }],
 *         },
 *     },
 * });
 * const _default = new gcp.firebase.AndroidApp("default", {
 *     project: "my-project-name",
 *     displayName: "Display Name",
 *     packageName: "android.package.app",
 *     sha1Hashes: ["2145bdf698b8715039bd0e83f2069bed435ac21c"],
 *     sha256Hashes: ["2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc"],
 *     apiKeyId: android.uid,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * android = gcp.projects.ApiKey("android",
 *     name="api-key",
 *     display_name="Display Name",
 *     project="my-project-name",
 *     restrictions=gcp.projects.ApiKeyRestrictionsArgs(
 *         android_key_restrictions=gcp.projects.ApiKeyRestrictionsAndroidKeyRestrictionsArgs(
 *             allowed_applications=[gcp.projects.ApiKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationArgs(
 *                 package_name="android.package.app",
 *                 sha1_fingerprint="2145bdf698b8715039bd0e83f2069bed435ac21c",
 *             )],
 *         ),
 *     ))
 * default = gcp.firebase.AndroidApp("default",
 *     project="my-project-name",
 *     display_name="Display Name",
 *     package_name="android.package.app",
 *     sha1_hashes=["2145bdf698b8715039bd0e83f2069bed435ac21c"],
 *     sha256_hashes=["2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc"],
 *     api_key_id=android.uid)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var android = new Gcp.Projects.ApiKey("android", new()
 *     {
 *         Name = "api-key",
 *         DisplayName = "Display Name",
 *         Project = "my-project-name",
 *         Restrictions = new Gcp.Projects.Inputs.ApiKeyRestrictionsArgs
 *         {
 *             AndroidKeyRestrictions = new Gcp.Projects.Inputs.ApiKeyRestrictionsAndroidKeyRestrictionsArgs
 *             {
 *                 AllowedApplications = new[]
 *                 {
 *                     new Gcp.Projects.Inputs.ApiKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationArgs
 *                     {
 *                         PackageName = "android.package.app",
 *                         Sha1Fingerprint = "2145bdf698b8715039bd0e83f2069bed435ac21c",
 *                     },
 *                 },
 *             },
 *         },
 *     });
 *     var @default = new Gcp.Firebase.AndroidApp("default", new()
 *     {
 *         Project = "my-project-name",
 *         DisplayName = "Display Name",
 *         PackageName = "android.package.app",
 *         Sha1Hashes = new[]
 *         {
 *             "2145bdf698b8715039bd0e83f2069bed435ac21c",
 *         },
 *         Sha256Hashes = new[]
 *         {
 *             "2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc",
 *         },
 *         ApiKeyId = android.Uid,
 *     });
 * });
 * ```
 * ```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 {
 * 		android, err := projects.NewApiKey(ctx, "android", &projects.ApiKeyArgs{
 * 			Name:        pulumi.String("api-key"),
 * 			DisplayName: pulumi.String("Display Name"),
 * 			Project:     pulumi.String("my-project-name"),
 * 			Restrictions: &projects.ApiKeyRestrictionsArgs{
 * 				AndroidKeyRestrictions: &projects.ApiKeyRestrictionsAndroidKeyRestrictionsArgs{
 * 					AllowedApplications: projects.ApiKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationArray{
 * 						&projects.ApiKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationArgs{
 * 							PackageName:     pulumi.String("android.package.app"),
 * 							Sha1Fingerprint: pulumi.String("2145bdf698b8715039bd0e83f2069bed435ac21c"),
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = firebase.NewAndroidApp(ctx, "default", &firebase.AndroidAppArgs{
 * 			Project:     pulumi.String("my-project-name"),
 * 			DisplayName: pulumi.String("Display Name"),
 * 			PackageName: pulumi.String("android.package.app"),
 * 			Sha1Hashes: pulumi.StringArray{
 * 				pulumi.String("2145bdf698b8715039bd0e83f2069bed435ac21c"),
 * 			},
 * 			Sha256Hashes: pulumi.StringArray{
 * 				pulumi.String("2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc"),
 * 			},
 * 			ApiKeyId: android.Uid,
 * 		})
 * 		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.ApiKey;
 * import com.pulumi.gcp.projects.ApiKeyArgs;
 * import com.pulumi.gcp.projects.inputs.ApiKeyRestrictionsArgs;
 * import com.pulumi.gcp.projects.inputs.ApiKeyRestrictionsAndroidKeyRestrictionsArgs;
 * import com.pulumi.gcp.firebase.AndroidApp;
 * import com.pulumi.gcp.firebase.AndroidAppArgs;
 * 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 android = new ApiKey("android", ApiKeyArgs.builder()
 *             .name("api-key")
 *             .displayName("Display Name")
 *             .project("my-project-name")
 *             .restrictions(ApiKeyRestrictionsArgs.builder()
 *                 .androidKeyRestrictions(ApiKeyRestrictionsAndroidKeyRestrictionsArgs.builder()
 *                     .allowedApplications(ApiKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationArgs.builder()
 *                         .packageName("android.package.app")
 *                         .sha1Fingerprint("2145bdf698b8715039bd0e83f2069bed435ac21c")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 *         var default_ = new AndroidApp("default", AndroidAppArgs.builder()
 *             .project("my-project-name")
 *             .displayName("Display Name")
 *             .packageName("android.package.app")
 *             .sha1Hashes("2145bdf698b8715039bd0e83f2069bed435ac21c")
 *             .sha256Hashes("2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc")
 *             .apiKeyId(android.uid())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:firebase:AndroidApp
 *     properties:
 *       project: my-project-name
 *       displayName: Display Name
 *       packageName: android.package.app
 *       sha1Hashes:
 *         - 2145bdf698b8715039bd0e83f2069bed435ac21c
 *       sha256Hashes:
 *         - 2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc
 *       apiKeyId: ${android.uid}
 *   android:
 *     type: gcp:projects:ApiKey
 *     properties:
 *       name: api-key
 *       displayName: Display Name
 *       project: my-project-name
 *       restrictions:
 *         androidKeyRestrictions:
 *           allowedApplications:
 *             - packageName: android.package.app
 *               sha1Fingerprint: 2145bdf698b8715039bd0e83f2069bed435ac21c
 * ```
 * 
 * ## Import
 * AndroidApp can be imported using any of these accepted formats:
 * * `{{project}} projects/{{project}}/androidApps/{{app_id}}`
 * * `projects/{{project}}/androidApps/{{app_id}}`
 * * `{{project}}/{{project}}/{{app_id}}`
 * * `androidApps/{{app_id}}`
 * * `{{app_id}}`
 * When using the `pulumi import` command, AndroidApp can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:firebase/androidApp:AndroidApp default {{project}} projects/{{project}}/androidApps/{{app_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:firebase/androidApp:AndroidApp default projects/{{project}}/androidApps/{{app_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:firebase/androidApp:AndroidApp default {{project}}/{{project}}/{{app_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:firebase/androidApp:AndroidApp default androidApps/{{app_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:firebase/androidApp:AndroidApp default {{app_id}}
 * ```
 * @property apiKeyId The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the AndroidApp.
 * If apiKeyId is not set during creation, then Firebase automatically associates an apiKeyId with the AndroidApp.
 * This auto-associated key may be an existing valid key or, if no valid key exists, a new one will be provisioned.
 * @property deletionPolicy
 * @property displayName The user-assigned display name of the AndroidApp.
 * @property packageName The canonical package name of the Android app as would appear in the Google Play
 * Developer Console.
 * - - -
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property sha1Hashes The SHA1 certificate hashes for the AndroidApp.
 * @property sha256Hashes The SHA256 certificate hashes for the AndroidApp.
 */
public data class AndroidAppArgs(
    public val apiKeyId: Output? = null,
    public val deletionPolicy: Output? = null,
    public val displayName: Output? = null,
    public val packageName: Output? = null,
    public val project: Output? = null,
    public val sha1Hashes: Output>? = null,
    public val sha256Hashes: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.firebase.AndroidAppArgs =
        com.pulumi.gcp.firebase.AndroidAppArgs.builder()
            .apiKeyId(apiKeyId?.applyValue({ args0 -> args0 }))
            .deletionPolicy(deletionPolicy?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .packageName(packageName?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .sha1Hashes(sha1Hashes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .sha256Hashes(sha256Hashes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [AndroidAppArgs].
 */
@PulumiTagMarker
public class AndroidAppArgsBuilder internal constructor() {
    private var apiKeyId: Output? = null

    private var deletionPolicy: Output? = null

    private var displayName: Output? = null

    private var packageName: Output? = null

    private var project: Output? = null

    private var sha1Hashes: Output>? = null

    private var sha256Hashes: Output>? = null

    /**
     * @param value The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the AndroidApp.
     * If apiKeyId is not set during creation, then Firebase automatically associates an apiKeyId with the AndroidApp.
     * This auto-associated key may be an existing valid key or, if no valid key exists, a new one will be provisioned.
     */
    @JvmName("tuluyqhusoyexjcx")
    public suspend fun apiKeyId(`value`: Output) {
        this.apiKeyId = value
    }

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

    /**
     * @param value The user-assigned display name of the AndroidApp.
     */
    @JvmName("kqodlyykyhntcqjv")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value The canonical package name of the Android app as would appear in the Google Play
     * Developer Console.
     * - - -
     */
    @JvmName("fmmhfeqolvjvtrkg")
    public suspend fun packageName(`value`: Output) {
        this.packageName = value
    }

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

    /**
     * @param value The SHA1 certificate hashes for the AndroidApp.
     */
    @JvmName("sxmxchdrlxebmbob")
    public suspend fun sha1Hashes(`value`: Output>) {
        this.sha1Hashes = value
    }

    @JvmName("abdfmgwvuqeejkrm")
    public suspend fun sha1Hashes(vararg values: Output) {
        this.sha1Hashes = Output.all(values.asList())
    }

    /**
     * @param values The SHA1 certificate hashes for the AndroidApp.
     */
    @JvmName("lksgjoadnhspheal")
    public suspend fun sha1Hashes(values: List>) {
        this.sha1Hashes = Output.all(values)
    }

    /**
     * @param value The SHA256 certificate hashes for the AndroidApp.
     */
    @JvmName("ksppwfwkfivyugey")
    public suspend fun sha256Hashes(`value`: Output>) {
        this.sha256Hashes = value
    }

    @JvmName("xmjctjkrlkvxbmmn")
    public suspend fun sha256Hashes(vararg values: Output) {
        this.sha256Hashes = Output.all(values.asList())
    }

    /**
     * @param values The SHA256 certificate hashes for the AndroidApp.
     */
    @JvmName("lbmuekqjhjruxkxq")
    public suspend fun sha256Hashes(values: List>) {
        this.sha256Hashes = Output.all(values)
    }

    /**
     * @param value The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the AndroidApp.
     * If apiKeyId is not set during creation, then Firebase automatically associates an apiKeyId with the AndroidApp.
     * This auto-associated key may be an existing valid key or, if no valid key exists, a new one will be provisioned.
     */
    @JvmName("yamvknhqtbqjtcls")
    public suspend fun apiKeyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiKeyId = mapped
    }

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

    /**
     * @param value The user-assigned display name of the AndroidApp.
     */
    @JvmName("manbbxjajvaeepeg")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value The canonical package name of the Android app as would appear in the Google Play
     * Developer Console.
     * - - -
     */
    @JvmName("wbsuhulqawygttnx")
    public suspend fun packageName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.packageName = mapped
    }

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

    /**
     * @param value The SHA1 certificate hashes for the AndroidApp.
     */
    @JvmName("sogviimavmxwriax")
    public suspend fun sha1Hashes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sha1Hashes = mapped
    }

    /**
     * @param values The SHA1 certificate hashes for the AndroidApp.
     */
    @JvmName("dhsyyrfiyildsifd")
    public suspend fun sha1Hashes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sha1Hashes = mapped
    }

    /**
     * @param value The SHA256 certificate hashes for the AndroidApp.
     */
    @JvmName("tssdwreggxvdvsia")
    public suspend fun sha256Hashes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sha256Hashes = mapped
    }

    /**
     * @param values The SHA256 certificate hashes for the AndroidApp.
     */
    @JvmName("sithqlehywumpkld")
    public suspend fun sha256Hashes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sha256Hashes = mapped
    }

    internal fun build(): AndroidAppArgs = AndroidAppArgs(
        apiKeyId = apiKeyId,
        deletionPolicy = deletionPolicy,
        displayName = displayName,
        packageName = packageName,
        project = project,
        sha1Hashes = sha1Hashes,
        sha256Hashes = sha256Hashes,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy