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

com.pulumi.gcp.firebase.kotlin.ExtensionsInstanceArgs.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.13.1.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.ExtensionsInstanceArgs.builder
import com.pulumi.gcp.firebase.kotlin.inputs.ExtensionsInstanceConfigArgs
import com.pulumi.gcp.firebase.kotlin.inputs.ExtensionsInstanceConfigArgsBuilder
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

/**
 * ## Example Usage
 * ### Firebase Extentions Instance Resize Image
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const images = new gcp.storage.Bucket("images", {
 *     project: "my-project-name",
 *     name: "bucket-id",
 *     location: "US",
 *     uniformBucketLevelAccess: true,
 *     forceDestroy: true,
 * });
 * const resizeImage = new gcp.firebase.ExtensionsInstance("resize_image", {
 *     project: "my-project-name",
 *     instanceId: "storage-resize-images",
 *     config: {
 *         extensionRef: "firebase/storage-resize-images",
 *         extensionVersion: "0.2.2",
 *         params: {
 *             DELETE_ORIGINAL_FILE: "false",
 *             MAKE_PUBLIC: "false",
 *             IMAGE_TYPE: "false",
 *             IS_ANIMATED: "true",
 *             FUNCTION_MEMORY: "1024",
 *             DO_BACKFILL: "false",
 *             IMG_SIZES: "200x200",
 *             IMG_BUCKET: images.name,
 *         },
 *         systemParams: {
 *             "firebaseextensions.v1beta.function/location": "",
 *             "firebaseextensions.v1beta.function/maxInstances": "3000",
 *             "firebaseextensions.v1beta.function/minInstances": "0",
 *             "firebaseextensions.v1beta.function/vpcConnectorEgressSettings": "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED",
 *         },
 *         allowedEventTypes: ["firebase.extensions.storage-resize-images.v1.onCompletion"],
 *         eventarcChannel: "projects/my-project-name/locations//channels/firebase",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * images = gcp.storage.Bucket("images",
 *     project="my-project-name",
 *     name="bucket-id",
 *     location="US",
 *     uniform_bucket_level_access=True,
 *     force_destroy=True)
 * resize_image = gcp.firebase.ExtensionsInstance("resize_image",
 *     project="my-project-name",
 *     instance_id="storage-resize-images",
 *     config={
 *         "extension_ref": "firebase/storage-resize-images",
 *         "extension_version": "0.2.2",
 *         "params": {
 *             "DELETE_ORIGINAL_FILE": "false",
 *             "MAKE_PUBLIC": "false",
 *             "IMAGE_TYPE": "false",
 *             "IS_ANIMATED": "true",
 *             "FUNCTION_MEMORY": "1024",
 *             "DO_BACKFILL": "false",
 *             "IMG_SIZES": "200x200",
 *             "IMG_BUCKET": images.name,
 *         },
 *         "system_params": {
 *             "firebaseextensions.v1beta.function/location": "",
 *             "firebaseextensions.v1beta.function/maxInstances": "3000",
 *             "firebaseextensions.v1beta.function/minInstances": "0",
 *             "firebaseextensions.v1beta.function/vpcConnectorEgressSettings": "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED",
 *         },
 *         "allowed_event_types": ["firebase.extensions.storage-resize-images.v1.onCompletion"],
 *         "eventarc_channel": "projects/my-project-name/locations//channels/firebase",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var images = new Gcp.Storage.Bucket("images", new()
 *     {
 *         Project = "my-project-name",
 *         Name = "bucket-id",
 *         Location = "US",
 *         UniformBucketLevelAccess = true,
 *         ForceDestroy = true,
 *     });
 *     var resizeImage = new Gcp.Firebase.ExtensionsInstance("resize_image", new()
 *     {
 *         Project = "my-project-name",
 *         InstanceId = "storage-resize-images",
 *         Config = new Gcp.Firebase.Inputs.ExtensionsInstanceConfigArgs
 *         {
 *             ExtensionRef = "firebase/storage-resize-images",
 *             ExtensionVersion = "0.2.2",
 *             Params =
 *             {
 *                 { "DELETE_ORIGINAL_FILE", "false" },
 *                 { "MAKE_PUBLIC", "false" },
 *                 { "IMAGE_TYPE", "false" },
 *                 { "IS_ANIMATED", "true" },
 *                 { "FUNCTION_MEMORY", "1024" },
 *                 { "DO_BACKFILL", "false" },
 *                 { "IMG_SIZES", "200x200" },
 *                 { "IMG_BUCKET", images.Name },
 *             },
 *             SystemParams =
 *             {
 *                 { "firebaseextensions.v1beta.function/location", "" },
 *                 { "firebaseextensions.v1beta.function/maxInstances", "3000" },
 *                 { "firebaseextensions.v1beta.function/minInstances", "0" },
 *                 { "firebaseextensions.v1beta.function/vpcConnectorEgressSettings", "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED" },
 *             },
 *             AllowedEventTypes = new[]
 *             {
 *                 "firebase.extensions.storage-resize-images.v1.onCompletion",
 *             },
 *             EventarcChannel = "projects/my-project-name/locations//channels/firebase",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/firebase"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/storage"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		images, err := storage.NewBucket(ctx, "images", &storage.BucketArgs{
 * 			Project:                  pulumi.String("my-project-name"),
 * 			Name:                     pulumi.String("bucket-id"),
 * 			Location:                 pulumi.String("US"),
 * 			UniformBucketLevelAccess: pulumi.Bool(true),
 * 			ForceDestroy:             pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = firebase.NewExtensionsInstance(ctx, "resize_image", &firebase.ExtensionsInstanceArgs{
 * 			Project:    pulumi.String("my-project-name"),
 * 			InstanceId: pulumi.String("storage-resize-images"),
 * 			Config: &firebase.ExtensionsInstanceConfigArgs{
 * 				ExtensionRef:     pulumi.String("firebase/storage-resize-images"),
 * 				ExtensionVersion: pulumi.String("0.2.2"),
 * 				Params: pulumi.StringMap{
 * 					"DELETE_ORIGINAL_FILE": pulumi.String("false"),
 * 					"MAKE_PUBLIC":          pulumi.String("false"),
 * 					"IMAGE_TYPE":           pulumi.String("false"),
 * 					"IS_ANIMATED":          pulumi.String("true"),
 * 					"FUNCTION_MEMORY":      pulumi.String("1024"),
 * 					"DO_BACKFILL":          pulumi.String("false"),
 * 					"IMG_SIZES":            pulumi.String("200x200"),
 * 					"IMG_BUCKET":           images.Name,
 * 				},
 * 				SystemParams: pulumi.StringMap{
 * 					"firebaseextensions.v1beta.function/location":                   pulumi.String(""),
 * 					"firebaseextensions.v1beta.function/maxInstances":               pulumi.String("3000"),
 * 					"firebaseextensions.v1beta.function/minInstances":               pulumi.String("0"),
 * 					"firebaseextensions.v1beta.function/vpcConnectorEgressSettings": pulumi.String("VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED"),
 * 				},
 * 				AllowedEventTypes: pulumi.StringArray{
 * 					pulumi.String("firebase.extensions.storage-resize-images.v1.onCompletion"),
 * 				},
 * 				EventarcChannel: pulumi.String("projects/my-project-name/locations//channels/firebase"),
 * 			},
 * 		})
 * 		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.storage.Bucket;
 * import com.pulumi.gcp.storage.BucketArgs;
 * import com.pulumi.gcp.firebase.ExtensionsInstance;
 * import com.pulumi.gcp.firebase.ExtensionsInstanceArgs;
 * import com.pulumi.gcp.firebase.inputs.ExtensionsInstanceConfigArgs;
 * 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 images = new Bucket("images", BucketArgs.builder()
 *             .project("my-project-name")
 *             .name("bucket-id")
 *             .location("US")
 *             .uniformBucketLevelAccess(true)
 *             .forceDestroy(true)
 *             .build());
 *         var resizeImage = new ExtensionsInstance("resizeImage", ExtensionsInstanceArgs.builder()
 *             .project("my-project-name")
 *             .instanceId("storage-resize-images")
 *             .config(ExtensionsInstanceConfigArgs.builder()
 *                 .extensionRef("firebase/storage-resize-images")
 *                 .extensionVersion("0.2.2")
 *                 .params(Map.ofEntries(
 *                     Map.entry("DELETE_ORIGINAL_FILE", false),
 *                     Map.entry("MAKE_PUBLIC", false),
 *                     Map.entry("IMAGE_TYPE", false),
 *                     Map.entry("IS_ANIMATED", true),
 *                     Map.entry("FUNCTION_MEMORY", 1024),
 *                     Map.entry("DO_BACKFILL", false),
 *                     Map.entry("IMG_SIZES", "200x200"),
 *                     Map.entry("IMG_BUCKET", images.name())
 *                 ))
 *                 .systemParams(Map.ofEntries(
 *                     Map.entry("firebaseextensions.v1beta.function/location", ""),
 *                     Map.entry("firebaseextensions.v1beta.function/maxInstances", 3000),
 *                     Map.entry("firebaseextensions.v1beta.function/minInstances", 0),
 *                     Map.entry("firebaseextensions.v1beta.function/vpcConnectorEgressSettings", "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED")
 *                 ))
 *                 .allowedEventTypes("firebase.extensions.storage-resize-images.v1.onCompletion")
 *                 .eventarcChannel("projects/my-project-name/locations//channels/firebase")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   images:
 *     type: gcp:storage:Bucket
 *     properties:
 *       project: my-project-name
 *       name: bucket-id
 *       location: US
 *       uniformBucketLevelAccess: true # Delete all objects when the bucket is deleted
 *       forceDestroy: true
 *   resizeImage:
 *     type: gcp:firebase:ExtensionsInstance
 *     name: resize_image
 *     properties:
 *       project: my-project-name
 *       instanceId: storage-resize-images
 *       config:
 *         extensionRef: firebase/storage-resize-images
 *         extensionVersion: 0.2.2
 *         params:
 *           DELETE_ORIGINAL_FILE: false
 *           MAKE_PUBLIC: false
 *           IMAGE_TYPE: false
 *           IS_ANIMATED: true
 *           FUNCTION_MEMORY: 1024
 *           DO_BACKFILL: false
 *           IMG_SIZES: 200x200
 *           IMG_BUCKET: ${images.name}
 *         systemParams:
 *           firebaseextensions.v1beta.function/location: ""
 *           firebaseextensions.v1beta.function/maxInstances: 3000
 *           firebaseextensions.v1beta.function/minInstances: 0
 *           firebaseextensions.v1beta.function/vpcConnectorEgressSettings: VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED
 *         allowedEventTypes:
 *           - firebase.extensions.storage-resize-images.v1.onCompletion
 *         eventarcChannel: projects/my-project-name/locations//channels/firebase
 * ```
 * 
 * ## Import
 * Instance can be imported using any of these accepted formats:
 * * `projects/{{project}}/instances/{{instance_id}}`
 * * `{{project}}/{{instance_id}}`
 * * `{{instance_id}}`
 * When using the `pulumi import` command, Instance can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:firebase/extensionsInstance:ExtensionsInstance default projects/{{project}}/instances/{{instance_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:firebase/extensionsInstance:ExtensionsInstance default {{project}}/{{instance_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:firebase/extensionsInstance:ExtensionsInstance default {{instance_id}}
 * ```
 * @property config The current Config of the Extension Instance.
 * Structure is documented below.
 * @property instanceId The ID to use for the Extension Instance, which will become the final
 * component of the instance's name.
 * @property project
 */
public data class ExtensionsInstanceArgs(
    public val config: Output? = null,
    public val instanceId: Output? = null,
    public val project: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.firebase.ExtensionsInstanceArgs =
        com.pulumi.gcp.firebase.ExtensionsInstanceArgs.builder()
            .config(config?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .instanceId(instanceId?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ExtensionsInstanceArgs].
 */
@PulumiTagMarker
public class ExtensionsInstanceArgsBuilder internal constructor() {
    private var config: Output? = null

    private var instanceId: Output? = null

    private var project: Output? = null

    /**
     * @param value The current Config of the Extension Instance.
     * Structure is documented below.
     */
    @JvmName("uvrmktdlbgaghjom")
    public suspend fun config(`value`: Output) {
        this.config = value
    }

    /**
     * @param value The ID to use for the Extension Instance, which will become the final
     * component of the instance's name.
     */
    @JvmName("erlsqebbtgbodsgu")
    public suspend fun instanceId(`value`: Output) {
        this.instanceId = value
    }

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

    /**
     * @param value The current Config of the Extension Instance.
     * Structure is documented below.
     */
    @JvmName("xqbigyyqbecllujv")
    public suspend fun config(`value`: ExtensionsInstanceConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.config = mapped
    }

    /**
     * @param argument The current Config of the Extension Instance.
     * Structure is documented below.
     */
    @JvmName("dvtxrqsivvwusckh")
    public suspend fun config(argument: suspend ExtensionsInstanceConfigArgsBuilder.() -> Unit) {
        val toBeMapped = ExtensionsInstanceConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.config = mapped
    }

    /**
     * @param value The ID to use for the Extension Instance, which will become the final
     * component of the instance's name.
     */
    @JvmName("qowlyqbsjcwfxphj")
    public suspend fun instanceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceId = mapped
    }

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

    internal fun build(): ExtensionsInstanceArgs = ExtensionsInstanceArgs(
        config = config,
        instanceId = instanceId,
        project = project,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy