UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

147 lines 6.55 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.ExtensionsInstance = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## 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", * }, * }); * ``` * * ## 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}} * ``` */ class ExtensionsInstance extends pulumi.CustomResource { /** * Get an existing ExtensionsInstance resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new ExtensionsInstance(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ExtensionsInstance. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ExtensionsInstance.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["config"] = state ? state.config : undefined; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["errorStatuses"] = state ? state.errorStatuses : undefined; resourceInputs["etag"] = state ? state.etag : undefined; resourceInputs["instanceId"] = state ? state.instanceId : undefined; resourceInputs["lastOperationName"] = state ? state.lastOperationName : undefined; resourceInputs["lastOperationType"] = state ? state.lastOperationType : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["runtimeDatas"] = state ? state.runtimeDatas : undefined; resourceInputs["serviceAccountEmail"] = state ? state.serviceAccountEmail : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; } else { const args = argsOrState; if ((!args || args.config === undefined) && !opts.urn) { throw new Error("Missing required property 'config'"); } if ((!args || args.instanceId === undefined) && !opts.urn) { throw new Error("Missing required property 'instanceId'"); } resourceInputs["config"] = args ? args.config : undefined; resourceInputs["instanceId"] = args ? args.instanceId : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["errorStatuses"] = undefined /*out*/; resourceInputs["etag"] = undefined /*out*/; resourceInputs["lastOperationName"] = undefined /*out*/; resourceInputs["lastOperationType"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["runtimeDatas"] = undefined /*out*/; resourceInputs["serviceAccountEmail"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ExtensionsInstance.__pulumiType, name, resourceInputs, opts); } } exports.ExtensionsInstance = ExtensionsInstance; /** @internal */ ExtensionsInstance.__pulumiType = 'gcp:firebase/extensionsInstance:ExtensionsInstance'; //# sourceMappingURL=extensionsInstance.js.map