@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
127 lines • 5.08 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.Stack = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a CloudFormation Stack resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const network = new aws.cloudformation.Stack("network", {
* name: "networking-stack",
* parameters: {
* VPCCidr: "10.0.0.0/16",
* },
* templateBody: JSON.stringify({
* Parameters: {
* VPCCidr: {
* Type: "String",
* Default: "10.0.0.0/16",
* Description: "Enter the CIDR block for the VPC. Default is 10.0.0.0/16.",
* },
* },
* Resources: {
* myVpc: {
* Type: "AWS::EC2::VPC",
* Properties: {
* CidrBlock: {
* Ref: "VPCCidr",
* },
* Tags: [{
* Key: "Name",
* Value: "Primary_CF_VPC",
* }],
* },
* },
* },
* }),
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Cloudformation Stacks using the `name`. For example:
*
* ```sh
* $ pulumi import aws:cloudformation/stack:Stack stack networking-stack
* ```
*/
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 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 Stack(name, state, { ...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;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["capabilities"] = state?.capabilities;
resourceInputs["disableRollback"] = state?.disableRollback;
resourceInputs["iamRoleArn"] = state?.iamRoleArn;
resourceInputs["name"] = state?.name;
resourceInputs["notificationArns"] = state?.notificationArns;
resourceInputs["onFailure"] = state?.onFailure;
resourceInputs["outputs"] = state?.outputs;
resourceInputs["parameters"] = state?.parameters;
resourceInputs["policyBody"] = state?.policyBody;
resourceInputs["policyUrl"] = state?.policyUrl;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["templateBody"] = state?.templateBody;
resourceInputs["templateUrl"] = state?.templateUrl;
resourceInputs["timeoutInMinutes"] = state?.timeoutInMinutes;
}
else {
const args = argsOrState;
resourceInputs["capabilities"] = args?.capabilities;
resourceInputs["disableRollback"] = args?.disableRollback;
resourceInputs["iamRoleArn"] = args?.iamRoleArn;
resourceInputs["name"] = args?.name;
resourceInputs["notificationArns"] = args?.notificationArns;
resourceInputs["onFailure"] = args?.onFailure;
resourceInputs["parameters"] = args?.parameters;
resourceInputs["policyBody"] = args?.policyBody;
resourceInputs["policyUrl"] = args?.policyUrl;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["templateBody"] = args?.templateBody;
resourceInputs["templateUrl"] = args?.templateUrl;
resourceInputs["timeoutInMinutes"] = args?.timeoutInMinutes;
resourceInputs["outputs"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Stack.__pulumiType, name, resourceInputs, opts);
}
}
exports.Stack = Stack;
/** @internal */
Stack.__pulumiType = 'aws:cloudformation/stack:Stack';
//# sourceMappingURL=stack.js.map
;