@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
96 lines • 4.79 kB
JavaScript
;
// *** 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.SharedflowDeployment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Deploys a revision of a sharedflow.
*
* To get more information about SharedflowDeployment, see:
*
* * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.sharedflows.revisions.deployments)
* * How-to Guides
* * [sharedflows.revisions.deployments](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.sharedflows.revisions.deployments)
*
* ## Import
*
* SharedflowDeployment can be imported using any of these accepted formats:
*
* * `organizations/{{org_id}}/environments/{{environment}}/sharedflows/{{sharedflow_id}}/revisions/{{revision}}/deployments/{{name}}`
*
* * `{{org_id}}/{{environment}}/{{sharedflow_id}}/{{revision}}/{{name}}`
*
* When using the `pulumi import` command, SharedflowDeployment can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:apigee/sharedflowDeployment:SharedflowDeployment default organizations/{{org_id}}/environments/{{environment}}/sharedflows/{{sharedflow_id}}/revisions/{{revision}}/deployments/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:apigee/sharedflowDeployment:SharedflowDeployment default {{org_id}}/{{environment}}/{{sharedflow_id}}/{{revision}}/{{name}}
* ```
*/
class SharedflowDeployment extends pulumi.CustomResource {
/**
* Get an existing SharedflowDeployment 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 SharedflowDeployment(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SharedflowDeployment. 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'] === SharedflowDeployment.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["environment"] = state ? state.environment : undefined;
resourceInputs["orgId"] = state ? state.orgId : undefined;
resourceInputs["revision"] = state ? state.revision : undefined;
resourceInputs["serviceAccount"] = state ? state.serviceAccount : undefined;
resourceInputs["sharedflowId"] = state ? state.sharedflowId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.environment === undefined) && !opts.urn) {
throw new Error("Missing required property 'environment'");
}
if ((!args || args.orgId === undefined) && !opts.urn) {
throw new Error("Missing required property 'orgId'");
}
if ((!args || args.revision === undefined) && !opts.urn) {
throw new Error("Missing required property 'revision'");
}
if ((!args || args.sharedflowId === undefined) && !opts.urn) {
throw new Error("Missing required property 'sharedflowId'");
}
resourceInputs["environment"] = args ? args.environment : undefined;
resourceInputs["orgId"] = args ? args.orgId : undefined;
resourceInputs["revision"] = args ? args.revision : undefined;
resourceInputs["serviceAccount"] = args ? args.serviceAccount : undefined;
resourceInputs["sharedflowId"] = args ? args.sharedflowId : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SharedflowDeployment.__pulumiType, name, resourceInputs, opts);
}
}
exports.SharedflowDeployment = SharedflowDeployment;
/** @internal */
SharedflowDeployment.__pulumiType = 'gcp:apigee/sharedflowDeployment:SharedflowDeployment';
//# sourceMappingURL=sharedflowDeployment.js.map