@pulumi/aws-native
Version:
The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)
311 lines (310 loc) • 23.8 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";
/**
* The AWS::CloudFormation::Stack resource nests a stack as a resource in a top-level template.
*/
export declare 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: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Stack;
/**
* 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: any): obj is Stack;
/**
* In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for CloudFormation to create the stack.
*
* - `CAPABILITY_IAM` and `CAPABILITY_NAMED_IAM`
*
* Some stack templates might include resources that can affect permissions in your AWS account ; for example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly acknowledge this by specifying one of these capabilities.
*
* The following IAM resources require you to specify either the `CAPABILITY_IAM` or `CAPABILITY_NAMED_IAM` capability.
*
* - If you have IAM resources, you can specify either capability.
* - If you have IAM resources with custom names, you *must* specify `CAPABILITY_NAMED_IAM` .
* - If you don't specify either of these capabilities, CloudFormation returns an `InsufficientCapabilities` error.
*
* If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.
*
* - [AWS::IAM::AccessKey](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-accesskey.html)
* - [AWS::IAM::Group](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-group.html)
* - [AWS::IAM::InstanceProfile](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-instanceprofile.html)
* - [AWS::IAM::Policy](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-policy.html)
* - [AWS::IAM::Role](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-role.html)
* - [AWS::IAM::User](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-user.html)
* - [AWS::IAM::UserToGroupAddition](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-usertogroupaddition.html)
*
* For more information, see [Acknowledging IAM resources in CloudFormation templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/control-access-with-iam.html#using-iam-capabilities) in the *CloudFormation User Guide* .
* - `CAPABILITY_AUTO_EXPAND`
*
* Some template contain macros. Macros perform custom processing on templates; this can include simple actions like find-and-replace operations, all the way to extensive transformations of entire templates. Because of this, users typically create a change set from the processed template, so that they can review the changes resulting from the macros before actually creating the stack. If your stack template contains one or more macros, and you choose to create a stack directly from the processed template, without first reviewing the resulting changes in a change set, you must acknowledge this capability. This includes the [AWS::Include](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/transform-aws-include.html) and [AWS::Serverless](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/transform-aws-serverless.html) transforms, which are macros hosted by CloudFormation .
*
* If you want to create a stack from a stack template that contains macros *and* nested stacks, you must create the stack directly from the template using this capability.
*
* > You should only create stacks directly from a stack template that contains macros if you know what processing the macro performs.
* >
* > Each macro relies on an underlying Lambda service function for processing stack templates. Be aware that the Lambda function owner can update the function operation without CloudFormation being notified.
*
* For more information, see [Perform custom processing on CloudFormation templates with template macros](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html) in the *CloudFormation User Guide* .
*/
readonly capabilities: pulumi.Output<enums.cloudformation.StackCapabilitiesItem[] | undefined>;
/**
* The unique ID of the change set.
*/
readonly changeSetId: pulumi.Output<string>;
/**
* The time at which the stack was created.
*/
readonly creationTime: pulumi.Output<string>;
/**
* A user-defined description associated with the stack.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Set to `true` to disable rollback of the stack if stack creation failed. You can specify either `DisableRollback` or `OnFailure` , but not both.
*
* Default: `false`
*/
readonly disableRollback: pulumi.Output<boolean | undefined>;
/**
* Whether to enable termination protection on the specified stack. If a user attempts to delete a stack with termination protection enabled, the operation fails and the stack remains unchanged. For more information, see [Protect CloudFormation stacks from being deleted](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) in the *CloudFormation User Guide* . Termination protection is deactivated on stacks by default.
*
* For nested stacks, termination protection is set on the root stack and can't be changed directly on the nested stack.
*/
readonly enableTerminationProtection: pulumi.Output<boolean | undefined>;
/**
* The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
*/
readonly lastUpdateTime: pulumi.Output<string>;
/**
* The Amazon SNS topic ARNs to publish stack related events. You can find your Amazon SNS topic ARNs using the Amazon SNS console or your Command Line Interface (CLI).
*/
readonly notificationArns: pulumi.Output<string[] | undefined>;
/**
* A list of output structures.
*/
readonly outputs: pulumi.Output<outputs.cloudformation.StackOutput[]>;
/**
* The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created. Each parameter has a name corresponding to a parameter defined in the embedded template and a value representing the value that you want to set for the parameter.
*
* > If you use the `Ref` function to pass a parameter value to a nested stack, comma-delimited list parameters must be of type `String` . In other words, you can't pass values that are of type `CommaDelimitedList` to nested stacks.
*
* Required if the nested stack requires input parameters.
*
* Whether an update causes interruptions depends on the resources that are being updated. An update never causes a nested stack to be replaced.
*/
readonly parameters: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* For nested stacks, the stack ID of the direct parent of this stack. For the first level of nested stacks, the root stack is also the parent stack.
*
* For more information, see [Nested stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) in the *AWS CloudFormation User Guide* .
*/
readonly parentId: pulumi.Output<string>;
/**
* The Amazon Resource Name (ARN) of an IAM role that CloudFormation assumes to create the stack. CloudFormation uses the role's credentials to make calls on your behalf. CloudFormation always uses this role for all future operations on the stack. Provided that users have permission to operate on the stack, CloudFormation uses this role even if the users don't have permission to pass it. Ensure that the role grants least privilege.
*
* If you don't specify a value, CloudFormation uses the role that was previously associated with the stack. If no role is available, CloudFormation uses a temporary session that's generated from your user credentials.
*/
readonly roleArn: pulumi.Output<string | undefined>;
/**
* For nested stacks, the stack ID of the top-level stack to which the nested stack ultimately belongs.
*
* For more information, see [Nested stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) in the *AWS CloudFormation User Guide* .
*/
readonly rootId: pulumi.Output<string>;
/**
* Unique identifier of the stack.
*/
readonly stackId: pulumi.Output<string>;
/**
* The name that's associated with the stack. The name must be unique in the Region in which you are creating the stack.
*
* > A stack name can contain only alphanumeric characters (case sensitive) and hyphens. It must start with an alphabetical character and can't be longer than 128 characters.
*/
readonly stackName: pulumi.Output<string>;
/**
* Structure that contains the stack policy body. For more information, see [Prevent updates to stack resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html) in the *CloudFormation User Guide* . You can specify either the `StackPolicyBody` or the `StackPolicyURL` parameter, but not both.
*
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::CloudFormation::Stack` for more information about the expected schema for this property.
*/
readonly stackPolicyBody: pulumi.Output<any | undefined>;
/**
* Location of a file that contains the stack policy. The URL must point to a policy (maximum size: 16 KB) located in an S3 bucket in the same Region as the stack. You can specify either the `StackPolicyBody` or the `StackPolicyURL` parameter, but not both.
*/
readonly stackPolicyUrl: pulumi.Output<string | undefined>;
/**
* Current status of the stack.
*/
readonly stackStatus: pulumi.Output<enums.cloudformation.StackStatus>;
/**
* Success/failure message associated with the stack status.
*/
readonly stackStatusReason: pulumi.Output<string | undefined>;
/**
* Key-value pairs to associate with this stack. CloudFormation also propagates these tags to the resources created in the stack. A maximum number of 50 tags can be specified.
*/
readonly tags: pulumi.Output<outputs.Tag[] | undefined>;
/**
* Structure that contains the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes.
*
* Conditional: You must specify either the `TemplateBody` or the `TemplateURL` parameter, but not both.
*
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::CloudFormation::Stack` for more information about the expected schema for this property.
*/
readonly templateBody: pulumi.Output<any | undefined>;
/**
* The URL of a file that contains the template body. The URL must point to a template (max size: 1 MB) that's located in an Amazon S3 bucket. The location for an Amazon S3 bucket must start with `https://` .
*
* Whether an update causes interruptions depends on the resources that are being updated. An update never causes a nested stack to be replaced.
*/
readonly templateUrl: pulumi.Output<string | undefined>;
/**
* The length of time, in minutes, that CloudFormation waits for the nested stack to reach the `CREATE_COMPLETE` state. The default is no timeout. When CloudFormation detects that the nested stack has reached the `CREATE_COMPLETE` state, it marks the nested stack resource as `CREATE_COMPLETE` in the parent stack and resumes creating the parent stack. If the timeout period expires before the nested stack reaches `CREATE_COMPLETE` , CloudFormation marks the nested stack as failed and rolls back both the nested stack and parent stack.
*
* Updates aren't supported.
*/
readonly timeoutInMinutes: pulumi.Output<number | undefined>;
/**
* 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: string, args?: StackArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* The set of arguments for constructing a Stack resource.
*/
export interface StackArgs {
/**
* In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for CloudFormation to create the stack.
*
* - `CAPABILITY_IAM` and `CAPABILITY_NAMED_IAM`
*
* Some stack templates might include resources that can affect permissions in your AWS account ; for example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly acknowledge this by specifying one of these capabilities.
*
* The following IAM resources require you to specify either the `CAPABILITY_IAM` or `CAPABILITY_NAMED_IAM` capability.
*
* - If you have IAM resources, you can specify either capability.
* - If you have IAM resources with custom names, you *must* specify `CAPABILITY_NAMED_IAM` .
* - If you don't specify either of these capabilities, CloudFormation returns an `InsufficientCapabilities` error.
*
* If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.
*
* - [AWS::IAM::AccessKey](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-accesskey.html)
* - [AWS::IAM::Group](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-group.html)
* - [AWS::IAM::InstanceProfile](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-instanceprofile.html)
* - [AWS::IAM::Policy](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-policy.html)
* - [AWS::IAM::Role](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-role.html)
* - [AWS::IAM::User](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-user.html)
* - [AWS::IAM::UserToGroupAddition](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-usertogroupaddition.html)
*
* For more information, see [Acknowledging IAM resources in CloudFormation templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/control-access-with-iam.html#using-iam-capabilities) in the *CloudFormation User Guide* .
* - `CAPABILITY_AUTO_EXPAND`
*
* Some template contain macros. Macros perform custom processing on templates; this can include simple actions like find-and-replace operations, all the way to extensive transformations of entire templates. Because of this, users typically create a change set from the processed template, so that they can review the changes resulting from the macros before actually creating the stack. If your stack template contains one or more macros, and you choose to create a stack directly from the processed template, without first reviewing the resulting changes in a change set, you must acknowledge this capability. This includes the [AWS::Include](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/transform-aws-include.html) and [AWS::Serverless](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/transform-aws-serverless.html) transforms, which are macros hosted by CloudFormation .
*
* If you want to create a stack from a stack template that contains macros *and* nested stacks, you must create the stack directly from the template using this capability.
*
* > You should only create stacks directly from a stack template that contains macros if you know what processing the macro performs.
* >
* > Each macro relies on an underlying Lambda service function for processing stack templates. Be aware that the Lambda function owner can update the function operation without CloudFormation being notified.
*
* For more information, see [Perform custom processing on CloudFormation templates with template macros](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html) in the *CloudFormation User Guide* .
*/
capabilities?: pulumi.Input<pulumi.Input<enums.cloudformation.StackCapabilitiesItem>[]>;
/**
* A user-defined description associated with the stack.
*/
description?: pulumi.Input<string>;
/**
* Set to `true` to disable rollback of the stack if stack creation failed. You can specify either `DisableRollback` or `OnFailure` , but not both.
*
* Default: `false`
*/
disableRollback?: pulumi.Input<boolean>;
/**
* Whether to enable termination protection on the specified stack. If a user attempts to delete a stack with termination protection enabled, the operation fails and the stack remains unchanged. For more information, see [Protect CloudFormation stacks from being deleted](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) in the *CloudFormation User Guide* . Termination protection is deactivated on stacks by default.
*
* For nested stacks, termination protection is set on the root stack and can't be changed directly on the nested stack.
*/
enableTerminationProtection?: pulumi.Input<boolean>;
/**
* The Amazon SNS topic ARNs to publish stack related events. You can find your Amazon SNS topic ARNs using the Amazon SNS console or your Command Line Interface (CLI).
*/
notificationArns?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created. Each parameter has a name corresponding to a parameter defined in the embedded template and a value representing the value that you want to set for the parameter.
*
* > If you use the `Ref` function to pass a parameter value to a nested stack, comma-delimited list parameters must be of type `String` . In other words, you can't pass values that are of type `CommaDelimitedList` to nested stacks.
*
* Required if the nested stack requires input parameters.
*
* Whether an update causes interruptions depends on the resources that are being updated. An update never causes a nested stack to be replaced.
*/
parameters?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The Amazon Resource Name (ARN) of an IAM role that CloudFormation assumes to create the stack. CloudFormation uses the role's credentials to make calls on your behalf. CloudFormation always uses this role for all future operations on the stack. Provided that users have permission to operate on the stack, CloudFormation uses this role even if the users don't have permission to pass it. Ensure that the role grants least privilege.
*
* If you don't specify a value, CloudFormation uses the role that was previously associated with the stack. If no role is available, CloudFormation uses a temporary session that's generated from your user credentials.
*/
roleArn?: pulumi.Input<string>;
/**
* The name that's associated with the stack. The name must be unique in the Region in which you are creating the stack.
*
* > A stack name can contain only alphanumeric characters (case sensitive) and hyphens. It must start with an alphabetical character and can't be longer than 128 characters.
*/
stackName?: pulumi.Input<string>;
/**
* Structure that contains the stack policy body. For more information, see [Prevent updates to stack resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html) in the *CloudFormation User Guide* . You can specify either the `StackPolicyBody` or the `StackPolicyURL` parameter, but not both.
*
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::CloudFormation::Stack` for more information about the expected schema for this property.
*/
stackPolicyBody?: any;
/**
* Location of a file that contains the stack policy. The URL must point to a policy (maximum size: 16 KB) located in an S3 bucket in the same Region as the stack. You can specify either the `StackPolicyBody` or the `StackPolicyURL` parameter, but not both.
*/
stackPolicyUrl?: pulumi.Input<string>;
/**
* Success/failure message associated with the stack status.
*/
stackStatusReason?: pulumi.Input<string>;
/**
* Key-value pairs to associate with this stack. CloudFormation also propagates these tags to the resources created in the stack. A maximum number of 50 tags can be specified.
*/
tags?: pulumi.Input<pulumi.Input<inputs.TagArgs>[]>;
/**
* Structure that contains the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes.
*
* Conditional: You must specify either the `TemplateBody` or the `TemplateURL` parameter, but not both.
*
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::CloudFormation::Stack` for more information about the expected schema for this property.
*/
templateBody?: any;
/**
* The URL of a file that contains the template body. The URL must point to a template (max size: 1 MB) that's located in an Amazon S3 bucket. The location for an Amazon S3 bucket must start with `https://` .
*
* Whether an update causes interruptions depends on the resources that are being updated. An update never causes a nested stack to be replaced.
*/
templateUrl?: pulumi.Input<string>;
/**
* The length of time, in minutes, that CloudFormation waits for the nested stack to reach the `CREATE_COMPLETE` state. The default is no timeout. When CloudFormation detects that the nested stack has reached the `CREATE_COMPLETE` state, it marks the nested stack resource as `CREATE_COMPLETE` in the parent stack and resumes creating the parent stack. If the timeout period expires before the nested stack reaches `CREATE_COMPLETE` , CloudFormation marks the nested stack as failed and rolls back both the nested stack and parent stack.
*
* Updates aren't supported.
*/
timeoutInMinutes?: pulumi.Input<number>;
}