UNPKG

@pulumi/pulumiservice

Version:
71 lines 3.25 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! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Stack = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * A stack is a collection of resources that share a common lifecycle. Stacks are uniquely identified by their name and the project they belong to. */ class Stack extends pulumi.CustomResource { /** * Get an existing Stack 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, opts) { return new Stack(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Stack. 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'] === Stack.__pulumiType; } /** * Create a Stack resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name, args, opts) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { if ((!args || args.organizationName === undefined) && !opts.urn) { throw new Error("Missing required property 'organizationName'"); } if ((!args || args.projectName === undefined) && !opts.urn) { throw new Error("Missing required property 'projectName'"); } if ((!args || args.stackName === undefined) && !opts.urn) { throw new Error("Missing required property 'stackName'"); } resourceInputs["forceDestroy"] = args ? args.forceDestroy : undefined; resourceInputs["organizationName"] = args ? args.organizationName : undefined; resourceInputs["projectName"] = args ? args.projectName : undefined; resourceInputs["stackName"] = args ? args.stackName : undefined; } else { resourceInputs["forceDestroy"] = undefined /*out*/; resourceInputs["organizationName"] = undefined /*out*/; resourceInputs["projectName"] = undefined /*out*/; resourceInputs["stackName"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Stack.__pulumiType, name, resourceInputs, opts); } } exports.Stack = Stack; /** @internal */ Stack.__pulumiType = 'pulumiservice:index:Stack'; //# sourceMappingURL=stack.js.map