Class CfnStack
- All Implemented Interfaces:
- IConstruct,- IDependable,- IInspectable,- software.amazon.jsii.JsiiSerializable,- software.constructs.IConstruct
AWS::CloudFormation::Stack.
 
 The AWS::CloudFormation::Stack resource nests a stack as a resource in a top-level template.
 
 You can add output values from a nested stack within the containing template. You use the GetAtt function with the nested stack's logical name and the name of the output value in the nested stack in the format Outputs. *NestedStackOutputName* .
 
We strongly recommend that updates to nested stacks are run from the parent stack.
When you apply template changes to update a top-level stack, CloudFormation updates the top-level stack and initiates an update to its nested stacks. CloudFormation updates the resources of modified nested stacks, but doesn't update the resources of unmodified nested stacks. For more information, see CloudFormation stack updates .
You must acknowledge IAM capabilities for nested stacks that contain IAM resources. Also, verify that you have cancel update stack permissions, which is required if an update rolls back. For more information about IAM and CloudFormation , see Controlling access with AWS Identity and Access Management .
Example:
 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.core.*;
 CfnStack cfnStack = CfnStack.Builder.create(this, "MyCfnStack")
         .templateUrl("templateUrl")
         // the properties below are optional
         .notificationArns(List.of("notificationArns"))
         .parameters(Map.of(
                 "parametersKey", "parameters"))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .timeoutInMinutes(123)
         .build();
 - 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstructIConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstructsoftware.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectableIInspectable.Jsii$Default, IInspectable.Jsii$Proxy
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionThe Amazon Simple Notification Service (Amazon SNS) topic ARNs to publish stack related events.The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created.getTags()Key-value pairs to associate with this stack.Location of file containing the template body.The length of time, in minutes, that CloudFormation waits for the nested stack to reach theCREATE_COMPLETEstate.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetNotificationArns(List<String> value) The Amazon Simple Notification Service (Amazon SNS) topic ARNs to publish stack related events.voidsetParameters(Map<String, String> value) The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created.voidsetParameters(IResolvable value) The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created.voidsetTemplateUrl(String value) Location of file containing the template body.voidsetTimeoutInMinutes(Number value) The length of time, in minutes, that CloudFormation waits for the nested stack to reach theCREATE_COMPLETEstate.Methods inherited from class software.amazon.awscdk.core.CfnResourceaddDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElementgetRefMethods inherited from class software.amazon.awscdk.core.CfnElementgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.ConstructgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Field Details- 
CFN_RESOURCE_TYPE_NAMEThe CloudFormation resource type name for this resource class.
 
- 
- 
Constructor Details- 
CfnStackprotected CfnStack(software.amazon.jsii.JsiiObjectRef objRef) 
- 
CfnStackprotected CfnStack(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
- 
CfnStack@Stability(Stable) public CfnStack(@NotNull Construct scope, @NotNull String id, @NotNull CfnStackProps props) Create a newAWS::CloudFormation::Stack.- Parameters:
- scope-- scope in which this resource is defined.
 
- id-- scoped id of the resource.
 
- props-- resource properties.
 
 
 
- 
- 
Method Details- 
inspectExamines the CloudFormation resource and discloses attributes.- Specified by:
- inspectin interface- IInspectable
- Parameters:
- inspector-- tree inspector to collect and process attributes.
 
 
- 
renderProperties@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
- renderPropertiesin class- CfnResource
- Parameters:
- props- This parameter is required.
 
- 
getCfnProperties- Overrides:
- getCfnPropertiesin class- CfnResource
 
- 
getTagsKey-value pairs to associate with this stack.AWS CloudFormation also propagates these tags to the resources created in the stack. A maximum number of 50 tags can be specified. 
- 
getTemplateUrlLocation of file containing the template body.The URL must point to a template (max size: 460,800 bytes) that's located in an Amazon S3 bucket. For more information, see Template anatomy . Whether an update causes interruptions depends on the resources that are being updated. An update never causes a nested stack to be replaced. 
- 
setTemplateUrlLocation of file containing the template body.The URL must point to a template (max size: 460,800 bytes) that's located in an Amazon S3 bucket. For more information, see Template anatomy . Whether an update causes interruptions depends on the resources that are being updated. An update never causes a nested stack to be replaced. 
- 
getNotificationArnsThe Amazon Simple Notification Service (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). 
- 
setNotificationArnsThe Amazon Simple Notification Service (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). 
- 
getParametersThe 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 Reffunction 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 typeCommaDelimitedListto 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. 
- 
setParametersThe 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 Reffunction 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 typeCommaDelimitedListto 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. 
- 
setParametersThe 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 Reffunction 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 typeCommaDelimitedListto 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. 
- 
getTimeoutInMinutesThe length of time, in minutes, that CloudFormation waits for the nested stack to reach theCREATE_COMPLETEstate.The default is no timeout. When CloudFormation detects that the nested stack has reached the CREATE_COMPLETEstate, it marks the nested stack resource asCREATE_COMPLETEin 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. 
- 
setTimeoutInMinutesThe length of time, in minutes, that CloudFormation waits for the nested stack to reach theCREATE_COMPLETEstate.The default is no timeout. When CloudFormation detects that the nested stack has reached the CREATE_COMPLETEstate, it marks the nested stack resource asCREATE_COMPLETEin 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. 
 
-