UNPKG

@pulumi/gcp

Version:

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

176 lines • 7.89 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExtensionsInstance = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * An Instance is an installation of an Extension into a user's project. * * > **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. * See Provider Versions for more details on beta resources. * * To get more information about Instance, see: * * How-to Guides * * [Official Documentation](https://firebase.google.com/products/extensions) * * ## Example Usage * * ### Firebase Extensions 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.10", * 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, * BACKFILL_BATCH_SIZE: "3", * CONTENT_FILTER_LEVEL: "OFF", * REGENERATE_TOKEN: "true", * }, * systemParams: { * "firebaseextensions.v1beta.function/location": "us-central1", * "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/us-central1/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}} * $ pulumi import gcp:firebase/extensionsInstance:ExtensionsInstance default {{project}}/{{instance_id}} * $ 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, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:firebase/extensionsInstance:ExtensionsInstance'; /** * 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?.config; resourceInputs["createTime"] = state?.createTime; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["errorStatuses"] = state?.errorStatuses; resourceInputs["etag"] = state?.etag; resourceInputs["instanceId"] = state?.instanceId; resourceInputs["lastOperationName"] = state?.lastOperationName; resourceInputs["lastOperationType"] = state?.lastOperationType; resourceInputs["name"] = state?.name; resourceInputs["project"] = state?.project; resourceInputs["runtimeDatas"] = state?.runtimeDatas; resourceInputs["serviceAccountEmail"] = state?.serviceAccountEmail; resourceInputs["state"] = state?.state; resourceInputs["updateTime"] = state?.updateTime; } else { const args = argsOrState; if (args?.config === undefined && !opts.urn) { throw new Error("Missing required property 'config'"); } if (args?.instanceId === undefined && !opts.urn) { throw new Error("Missing required property 'instanceId'"); } resourceInputs["config"] = args?.config; resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["instanceId"] = args?.instanceId; resourceInputs["project"] = args?.project; 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; //# sourceMappingURL=extensionsInstance.js.map