@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
153 lines • 6.44 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** 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");
/**
* An Instance is an installation of an Extension into a user's project.
*
* To get more information about Instance, see:
* * How-to Guides
* * [Official Documentation](https://firebase.google.com/products/extensions)
*
* ## 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": "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}}
* ```
*
* ```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, { ...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?.config;
resourceInputs["createTime"] = state?.createTime;
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["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;
/** @internal */
ExtensionsInstance.__pulumiType = 'gcp:firebase/extensionsInstance:ExtensionsInstance';
//# sourceMappingURL=extensionsInstance.js.map
;