@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)
165 lines (164 loc) • 11.3 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
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 function getStack(args: GetStackArgs, opts?: pulumi.InvokeOptions): Promise<GetStackResult>;
export interface GetStackArgs {
/**
* Unique identifier of the stack.
*/
stackId: string;
}
export interface GetStackResult {
/**
* 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 *AWS 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 *AWS CloudFormation User Guide* .
*/
readonly capabilities?: enums.cloudformation.StackCapabilitiesItem[];
/**
* The unique ID of the change set.
*/
readonly changeSetId?: string;
/**
* The time at which the stack was created.
*/
readonly creationTime?: string;
/**
* A user-defined description associated with the stack.
*/
readonly description?: 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`
*/
readonly disableRollback?: 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 *AWS 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?: boolean;
/**
* The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
*/
readonly lastUpdateTime?: 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?: string[];
/**
* A list of output structures.
*/
readonly outputs?: 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?: {
[key: string]: string;
};
/**
* 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?: 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?: string;
/**
* 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?: string;
/**
* Unique identifier of the stack.
*/
readonly stackId?: 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 *AWS 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?: any;
/**
* Current status of the stack.
*/
readonly stackStatus?: enums.cloudformation.StackStatus;
/**
* Success/failure message associated with the stack status.
*/
readonly stackStatusReason?: 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.
*/
readonly tags?: outputs.Tag[];
/**
* 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?: any;
/**
* 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?: number;
}
/**
* The AWS::CloudFormation::Stack resource nests a stack as a resource in a top-level template.
*/
export declare function getStackOutput(args: GetStackOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetStackResult>;
export interface GetStackOutputArgs {
/**
* Unique identifier of the stack.
*/
stackId: pulumi.Input<string>;
}