We recommend new projects start with resources from the AWS provider.
aws-native.cloudformation.getStack
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
The AWS::CloudFormation::Stack resource nests a stack as a resource in a top-level template.
Using getStack
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getStack(args: GetStackArgs, opts?: InvokeOptions): Promise<GetStackResult>
function getStackOutput(args: GetStackOutputArgs, opts?: InvokeOptions): Output<GetStackResult>
def get_stack(stack_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetStackResult
def get_stack_output(stack_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetStackResult]
func LookupStack(ctx *Context, args *LookupStackArgs, opts ...InvokeOption) (*LookupStackResult, error)
func LookupStackOutput(ctx *Context, args *LookupStackOutputArgs, opts ...InvokeOption) LookupStackResultOutput
> Note: This function is named LookupStack
in the Go SDK.
public static class GetStack
{
public static Task<GetStackResult> InvokeAsync(GetStackArgs args, InvokeOptions? opts = null)
public static Output<GetStackResult> Invoke(GetStackInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetStackResult> getStack(GetStackArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws-native:cloudformation:getStack
arguments:
# arguments dictionary
The following arguments are supported:
- Stack
Id string - Unique identifier of the stack.
- Stack
Id string - Unique identifier of the stack.
- stack
Id String - Unique identifier of the stack.
- stack
Id string - Unique identifier of the stack.
- stack_
id str - Unique identifier of the stack.
- stack
Id String - Unique identifier of the stack.
getStack Result
The following output properties are available:
- Capabilities
List<Pulumi.
Aws Native. Cloud Formation. Stack Capabilities Item> In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for AWS CloudFormation to create the stack.
CAPABILITY_IAM
andCAPABILITY_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
orCAPABILITY_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, AWS 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
AWS::IAM::Group
AWS::IAM::InstanceProfile
AWS::IAM::Policy
AWS::IAM::Role
AWS::IAM::User
AWS::IAM::UserToGroupAddition
For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .
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 and AWS::Serverless transforms, which are macros hosted by AWS 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 AWS CloudFormation being notified.
For more information, see Using AWS CloudFormation macros to perform custom processing on templates .
- Change
Set stringId - The unique ID of the change set.
- Creation
Time string - The time at which the stack was created.
- Description string
- A user-defined description associated with the stack.
- Disable
Rollback bool Set to
true
to disable rollback of the stack if stack creation failed. You can specify eitherDisableRollback
orOnFailure
, but not both.Default:
false
- Enable
Termination boolProtection 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 Protecting a Stack From Being Deleted 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.
- Last
Update stringTime - The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
- Notification
Arns List<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).
- Outputs
List<Pulumi.
Aws Native. Cloud Formation. Outputs. Stack Output> - A list of output structures.
- Parameters Dictionary<string, 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 typeString
. In other words, you can't pass values that are of typeCommaDelimitedList
to nested stacks.Conditional. 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.
- Parent
Id string For nested stacks--stacks created as resources for another stack--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 Embed stacks within other stacks using nested stacks in the AWS CloudFormation User Guide .
- Role
Arn string The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes to create the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. Provided that users have permission to operate on the stack, AWS 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, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that's generated from your user credentials.
- Root
Id string For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which the nested stack ultimately belongs.
For more information, see Embed stacks within other stacks using nested stacks in the AWS CloudFormation User Guide .
- Stack
Id string - Unique identifier of the stack.
- Stack
Policy objectBody Structure containing the stack policy body. For more information, go to Prevent Updates to Stack Resources in the AWS CloudFormation User Guide . You can specify either the
StackPolicyBody
or theStackPolicyURL
parameter, but not both.Search the CloudFormation User Guide for
AWS::CloudFormation::Stack
for more information about the expected schema for this property.- Stack
Status Pulumi.Aws Native. Cloud Formation. Stack Status - Current status of the stack.
- Stack
Status stringReason - Success/failure message associated with the stack status.
- List<Pulumi.
Aws Native. Outputs. Tag> - 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.
- Template
Body object Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information, go to Template anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify either the
TemplateBody
or theTemplateURL
parameter, but not both.Search the CloudFormation User Guide for
AWS::CloudFormation::Stack
for more information about the expected schema for this property.- Timeout
In intMinutes 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 theCREATE_COMPLETE
state, it marks the nested stack resource asCREATE_COMPLETE
in the parent stack and resumes creating the parent stack. If the timeout period expires before the nested stack reachesCREATE_COMPLETE
, CloudFormation marks the nested stack as failed and rolls back both the nested stack and parent stack.Updates aren't supported.
- Capabilities
[]Stack
Capabilities Item In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for AWS CloudFormation to create the stack.
CAPABILITY_IAM
andCAPABILITY_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
orCAPABILITY_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, AWS 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
AWS::IAM::Group
AWS::IAM::InstanceProfile
AWS::IAM::Policy
AWS::IAM::Role
AWS::IAM::User
AWS::IAM::UserToGroupAddition
For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .
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 and AWS::Serverless transforms, which are macros hosted by AWS 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 AWS CloudFormation being notified.
For more information, see Using AWS CloudFormation macros to perform custom processing on templates .
- Change
Set stringId - The unique ID of the change set.
- Creation
Time string - The time at which the stack was created.
- Description string
- A user-defined description associated with the stack.
- Disable
Rollback bool Set to
true
to disable rollback of the stack if stack creation failed. You can specify eitherDisableRollback
orOnFailure
, but not both.Default:
false
- Enable
Termination boolProtection 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 Protecting a Stack From Being Deleted 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.
- Last
Update stringTime - The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
- Notification
Arns []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).
- Outputs
[]Stack
Output Type - A list of output structures.
- Parameters map[string]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 typeString
. In other words, you can't pass values that are of typeCommaDelimitedList
to nested stacks.Conditional. 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.
- Parent
Id string For nested stacks--stacks created as resources for another stack--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 Embed stacks within other stacks using nested stacks in the AWS CloudFormation User Guide .
- Role
Arn string The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes to create the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. Provided that users have permission to operate on the stack, AWS 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, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that's generated from your user credentials.
- Root
Id string For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which the nested stack ultimately belongs.
For more information, see Embed stacks within other stacks using nested stacks in the AWS CloudFormation User Guide .
- Stack
Id string - Unique identifier of the stack.
- Stack
Policy interface{}Body Structure containing the stack policy body. For more information, go to Prevent Updates to Stack Resources in the AWS CloudFormation User Guide . You can specify either the
StackPolicyBody
or theStackPolicyURL
parameter, but not both.Search the CloudFormation User Guide for
AWS::CloudFormation::Stack
for more information about the expected schema for this property.- Stack
Status StackStatus - Current status of the stack.
- Stack
Status stringReason - Success/failure message associated with the stack status.
- Tag
- 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.
- Template
Body interface{} Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information, go to Template anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify either the
TemplateBody
or theTemplateURL
parameter, but not both.Search the CloudFormation User Guide for
AWS::CloudFormation::Stack
for more information about the expected schema for this property.- Timeout
In intMinutes 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 theCREATE_COMPLETE
state, it marks the nested stack resource asCREATE_COMPLETE
in the parent stack and resumes creating the parent stack. If the timeout period expires before the nested stack reachesCREATE_COMPLETE
, CloudFormation marks the nested stack as failed and rolls back both the nested stack and parent stack.Updates aren't supported.
- capabilities
List<Stack
Capabilities Item> In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for AWS CloudFormation to create the stack.
CAPABILITY_IAM
andCAPABILITY_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
orCAPABILITY_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, AWS 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
AWS::IAM::Group
AWS::IAM::InstanceProfile
AWS::IAM::Policy
AWS::IAM::Role
AWS::IAM::User
AWS::IAM::UserToGroupAddition
For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .
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 and AWS::Serverless transforms, which are macros hosted by AWS 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 AWS CloudFormation being notified.
For more information, see Using AWS CloudFormation macros to perform custom processing on templates .
- change
Set StringId - The unique ID of the change set.
- creation
Time String - The time at which the stack was created.
- description String
- A user-defined description associated with the stack.
- disable
Rollback Boolean Set to
true
to disable rollback of the stack if stack creation failed. You can specify eitherDisableRollback
orOnFailure
, but not both.Default:
false
- enable
Termination BooleanProtection 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 Protecting a Stack From Being Deleted 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.
- last
Update StringTime - The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
- notification
Arns List<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).
- outputs
List<Stack
Output> - A list of output structures.
- parameters Map<String,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 typeString
. In other words, you can't pass values that are of typeCommaDelimitedList
to nested stacks.Conditional. 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.
- parent
Id String For nested stacks--stacks created as resources for another stack--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 Embed stacks within other stacks using nested stacks in the AWS CloudFormation User Guide .
- role
Arn String The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes to create the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. Provided that users have permission to operate on the stack, AWS 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, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that's generated from your user credentials.
- root
Id String For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which the nested stack ultimately belongs.
For more information, see Embed stacks within other stacks using nested stacks in the AWS CloudFormation User Guide .
- stack
Id String - Unique identifier of the stack.
- stack
Policy ObjectBody Structure containing the stack policy body. For more information, go to Prevent Updates to Stack Resources in the AWS CloudFormation User Guide . You can specify either the
StackPolicyBody
or theStackPolicyURL
parameter, but not both.Search the CloudFormation User Guide for
AWS::CloudFormation::Stack
for more information about the expected schema for this property.- stack
Status StackStatus - Current status of the stack.
- stack
Status StringReason - Success/failure message associated with the stack status.
- List<Tag>
- 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.
- template
Body Object Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information, go to Template anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify either the
TemplateBody
or theTemplateURL
parameter, but not both.Search the CloudFormation User Guide for
AWS::CloudFormation::Stack
for more information about the expected schema for this property.- timeout
In IntegerMinutes 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 theCREATE_COMPLETE
state, it marks the nested stack resource asCREATE_COMPLETE
in the parent stack and resumes creating the parent stack. If the timeout period expires before the nested stack reachesCREATE_COMPLETE
, CloudFormation marks the nested stack as failed and rolls back both the nested stack and parent stack.Updates aren't supported.
- capabilities
Stack
Capabilities Item[] In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for AWS CloudFormation to create the stack.
CAPABILITY_IAM
andCAPABILITY_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
orCAPABILITY_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, AWS 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
AWS::IAM::Group
AWS::IAM::InstanceProfile
AWS::IAM::Policy
AWS::IAM::Role
AWS::IAM::User
AWS::IAM::UserToGroupAddition
For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .
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 and AWS::Serverless transforms, which are macros hosted by AWS 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 AWS CloudFormation being notified.
For more information, see Using AWS CloudFormation macros to perform custom processing on templates .
- change
Set stringId - The unique ID of the change set.
- creation
Time string - The time at which the stack was created.
- description string
- A user-defined description associated with the stack.
- disable
Rollback boolean Set to
true
to disable rollback of the stack if stack creation failed. You can specify eitherDisableRollback
orOnFailure
, but not both.Default:
false
- enable
Termination booleanProtection 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 Protecting a Stack From Being Deleted 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.
- last
Update stringTime - The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
- notification
Arns 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).
- outputs
Stack
Output[] - A list of output structures.
- parameters {[key: string]: 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 typeString
. In other words, you can't pass values that are of typeCommaDelimitedList
to nested stacks.Conditional. 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.
- parent
Id string For nested stacks--stacks created as resources for another stack--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 Embed stacks within other stacks using nested stacks in the AWS CloudFormation User Guide .
- role
Arn string The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes to create the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. Provided that users have permission to operate on the stack, AWS 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, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that's generated from your user credentials.
- root
Id string For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which the nested stack ultimately belongs.
For more information, see Embed stacks within other stacks using nested stacks in the AWS CloudFormation User Guide .
- stack
Id string - Unique identifier of the stack.
- stack
Policy anyBody Structure containing the stack policy body. For more information, go to Prevent Updates to Stack Resources in the AWS CloudFormation User Guide . You can specify either the
StackPolicyBody
or theStackPolicyURL
parameter, but not both.Search the CloudFormation User Guide for
AWS::CloudFormation::Stack
for more information about the expected schema for this property.- stack
Status StackStatus - Current status of the stack.
- stack
Status stringReason - Success/failure message associated with the stack status.
- Tag[]
- 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.
- template
Body any Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information, go to Template anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify either the
TemplateBody
or theTemplateURL
parameter, but not both.Search the CloudFormation User Guide for
AWS::CloudFormation::Stack
for more information about the expected schema for this property.- timeout
In numberMinutes 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 theCREATE_COMPLETE
state, it marks the nested stack resource asCREATE_COMPLETE
in the parent stack and resumes creating the parent stack. If the timeout period expires before the nested stack reachesCREATE_COMPLETE
, CloudFormation marks the nested stack as failed and rolls back both the nested stack and parent stack.Updates aren't supported.
- capabilities
Sequence[Stack
Capabilities Item] In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for AWS CloudFormation to create the stack.
CAPABILITY_IAM
andCAPABILITY_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
orCAPABILITY_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, AWS 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
AWS::IAM::Group
AWS::IAM::InstanceProfile
AWS::IAM::Policy
AWS::IAM::Role
AWS::IAM::User
AWS::IAM::UserToGroupAddition
For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .
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 and AWS::Serverless transforms, which are macros hosted by AWS 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 AWS CloudFormation being notified.
For more information, see Using AWS CloudFormation macros to perform custom processing on templates .
- change_
set_ strid - The unique ID of the change set.
- creation_
time str - The time at which the stack was created.
- description str
- A user-defined description associated with the stack.
- disable_
rollback bool Set to
true
to disable rollback of the stack if stack creation failed. You can specify eitherDisableRollback
orOnFailure
, but not both.Default:
false
- enable_
termination_ boolprotection 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 Protecting a Stack From Being Deleted 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.
- last_
update_ strtime - The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
- notification_
arns Sequence[str] - 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).
- outputs
Sequence[Stack
Output] - A list of output structures.
- parameters Mapping[str, str]
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 typeString
. In other words, you can't pass values that are of typeCommaDelimitedList
to nested stacks.Conditional. 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.
- parent_
id str For nested stacks--stacks created as resources for another stack--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 Embed stacks within other stacks using nested stacks in the AWS CloudFormation User Guide .
- role_
arn str The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes to create the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. Provided that users have permission to operate on the stack, AWS 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, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that's generated from your user credentials.
- root_
id str For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which the nested stack ultimately belongs.
For more information, see Embed stacks within other stacks using nested stacks in the AWS CloudFormation User Guide .
- stack_
id str - Unique identifier of the stack.
- stack_
policy_ Anybody Structure containing the stack policy body. For more information, go to Prevent Updates to Stack Resources in the AWS CloudFormation User Guide . You can specify either the
StackPolicyBody
or theStackPolicyURL
parameter, but not both.Search the CloudFormation User Guide for
AWS::CloudFormation::Stack
for more information about the expected schema for this property.- stack_
status StackStatus - Current status of the stack.
- stack_
status_ strreason - Success/failure message associated with the stack status.
- Sequence[root_Tag]
- 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.
- template_
body Any Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information, go to Template anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify either the
TemplateBody
or theTemplateURL
parameter, but not both.Search the CloudFormation User Guide for
AWS::CloudFormation::Stack
for more information about the expected schema for this property.- timeout_
in_ intminutes 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 theCREATE_COMPLETE
state, it marks the nested stack resource asCREATE_COMPLETE
in the parent stack and resumes creating the parent stack. If the timeout period expires before the nested stack reachesCREATE_COMPLETE
, CloudFormation marks the nested stack as failed and rolls back both the nested stack and parent stack.Updates aren't supported.
- capabilities List<"CAPABILITY_IAM" | "CAPABILITY_NAMED_IAM" | "CAPABILITY_AUTO_EXPAND">
In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for AWS CloudFormation to create the stack.
CAPABILITY_IAM
andCAPABILITY_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
orCAPABILITY_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, AWS 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
AWS::IAM::Group
AWS::IAM::InstanceProfile
AWS::IAM::Policy
AWS::IAM::Role
AWS::IAM::User
AWS::IAM::UserToGroupAddition
For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .
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 and AWS::Serverless transforms, which are macros hosted by AWS 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 AWS CloudFormation being notified.
For more information, see Using AWS CloudFormation macros to perform custom processing on templates .
- change
Set StringId - The unique ID of the change set.
- creation
Time String - The time at which the stack was created.
- description String
- A user-defined description associated with the stack.
- disable
Rollback Boolean Set to
true
to disable rollback of the stack if stack creation failed. You can specify eitherDisableRollback
orOnFailure
, but not both.Default:
false
- enable
Termination BooleanProtection 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 Protecting a Stack From Being Deleted 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.
- last
Update StringTime - The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
- notification
Arns List<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).
- outputs List<Property Map>
- A list of output structures.
- parameters Map<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 typeString
. In other words, you can't pass values that are of typeCommaDelimitedList
to nested stacks.Conditional. 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.
- parent
Id String For nested stacks--stacks created as resources for another stack--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 Embed stacks within other stacks using nested stacks in the AWS CloudFormation User Guide .
- role
Arn String The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes to create the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. Provided that users have permission to operate on the stack, AWS 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, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that's generated from your user credentials.
- root
Id String For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which the nested stack ultimately belongs.
For more information, see Embed stacks within other stacks using nested stacks in the AWS CloudFormation User Guide .
- stack
Id String - Unique identifier of the stack.
- stack
Policy AnyBody Structure containing the stack policy body. For more information, go to Prevent Updates to Stack Resources in the AWS CloudFormation User Guide . You can specify either the
StackPolicyBody
or theStackPolicyURL
parameter, but not both.Search the CloudFormation User Guide for
AWS::CloudFormation::Stack
for more information about the expected schema for this property.- stack
Status "CREATE_IN_PROGRESS" | "CREATE_FAILED" | "CREATE_COMPLETE" | "ROLLBACK_IN_PROGRESS" | "ROLLBACK_FAILED" | "ROLLBACK_COMPLETE" | "DELETE_IN_PROGRESS" | "DELETE_FAILED" | "DELETE_COMPLETE" | "UPDATE_IN_PROGRESS" | "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS" | "UPDATE_COMPLETE" | "UPDATE_FAILED" | "UPDATE_ROLLBACK_IN_PROGRESS" | "UPDATE_ROLLBACK_FAILED" | "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS" | "UPDATE_ROLLBACK_COMPLETE" | "REVIEW_IN_PROGRESS" | "IMPORT_IN_PROGRESS" | "IMPORT_COMPLETE" | "IMPORT_ROLLBACK_IN_PROGRESS" | "IMPORT_ROLLBACK_FAILED" | "IMPORT_ROLLBACK_COMPLETE" - Current status of the stack.
- stack
Status StringReason - Success/failure message associated with the stack status.
- List<Property Map>
- 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.
- template
Body Any Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information, go to Template anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify either the
TemplateBody
or theTemplateURL
parameter, but not both.Search the CloudFormation User Guide for
AWS::CloudFormation::Stack
for more information about the expected schema for this property.- timeout
In NumberMinutes 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 theCREATE_COMPLETE
state, it marks the nested stack resource asCREATE_COMPLETE
in the parent stack and resumes creating the parent stack. If the timeout period expires before the nested stack reachesCREATE_COMPLETE
, CloudFormation marks the nested stack as failed and rolls back both the nested stack and parent stack.Updates aren't supported.
Supporting Types
StackCapabilitiesItem
StackOutput
- Description string
- User defined description associated with the output.
- Export
Name string - The name of the export associated with the output.
- Output
Key string - The key associated with the output.
- Output
Value string - The value associated with the output.
- Description string
- User defined description associated with the output.
- Export
Name string - The name of the export associated with the output.
- Output
Key string - The key associated with the output.
- Output
Value string - The value associated with the output.
- description String
- User defined description associated with the output.
- export
Name String - The name of the export associated with the output.
- output
Key String - The key associated with the output.
- output
Value String - The value associated with the output.
- description string
- User defined description associated with the output.
- export
Name string - The name of the export associated with the output.
- output
Key string - The key associated with the output.
- output
Value string - The value associated with the output.
- description str
- User defined description associated with the output.
- export_
name str - The name of the export associated with the output.
- output_
key str - The key associated with the output.
- output_
value str - The value associated with the output.
- description String
- User defined description associated with the output.
- export
Name String - The name of the export associated with the output.
- output
Key String - The key associated with the output.
- output
Value String - The value associated with the output.
StackStatus
Tag
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.