@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
127 lines • 5.66 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, 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;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["capabilities"] = state ? state.capabilities : undefined;
resourceInputs["disableRollback"] = state ? state.disableRollback : undefined;
resourceInputs["iamRoleArn"] = state ? state.iamRoleArn : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["notificationArns"] = state ? state.notificationArns : undefined;
resourceInputs["onFailure"] = state ? state.onFailure : undefined;
resourceInputs["outputs"] = state ? state.outputs : undefined;
resourceInputs["parameters"] = state ? state.parameters : undefined;
resourceInputs["policyBody"] = state ? state.policyBody : undefined;
resourceInputs["policyUrl"] = state ? state.policyUrl : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["templateBody"] = state ? state.templateBody : undefined;
resourceInputs["templateUrl"] = state ? state.templateUrl : undefined;
resourceInputs["timeoutInMinutes"] = state ? state.timeoutInMinutes : undefined;
}
else {
const args = argsOrState;
resourceInputs["capabilities"] = args ? args.capabilities : undefined;
resourceInputs["disableRollback"] = args ? args.disableRollback : undefined;
resourceInputs["iamRoleArn"] = args ? args.iamRoleArn : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["notificationArns"] = args ? args.notificationArns : undefined;
resourceInputs["onFailure"] = args ? args.onFailure : undefined;
resourceInputs["parameters"] = args ? args.parameters : undefined;
resourceInputs["policyBody"] = args ? args.policyBody : undefined;
resourceInputs["policyUrl"] = args ? args.policyUrl : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["templateBody"] = args ? args.templateBody : undefined;
resourceInputs["templateUrl"] = args ? args.templateUrl : undefined;
resourceInputs["timeoutInMinutes"] = args ? args.timeoutInMinutes : undefined;
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