Class CfnStack
The AWS::CloudFormation::Stack
resource nests a stack as a resource in a top-level template.
Inherited Members
Namespace: Amazon.CDK.AWS.CloudFormation
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnStack : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnStack
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
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 . > A subset of AWS::CloudFormation::Stack
resource type properties listed below are available to customers using AWS CloudFormation , AWS CDK , and AWS Cloud Control API to configure.
These properties can be configured only when using AWS Cloud Control API . This is because the below properties are set by the parent stack, and thus cannot be configured using AWS CloudFormation or AWS CDK but only AWS Cloud Control API .
Customers that configure AWS::CloudFormation::Stack
using AWS CloudFormation and AWS CDK can do so for nesting a CloudFormation stack as a resource in their top-level template.
These read-only properties can be accessed only when using AWS Cloud Control API .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stack.html
CloudformationResource: AWS::CloudFormation::Stack
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudFormation;
var cfnStack = new CfnStack(this, "MyCfnStack", new CfnStackProps {
NotificationArns = new [] { "notificationArns" },
Parameters = new Dictionary<string, string> {
{ "parametersKey", "parameters" }
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TemplateUrl = "templateUrl",
TimeoutInMinutes = 123
});
Synopsis
Constructors
CfnStack(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnStack(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnStack(Construct, String, ICfnStackProps) |
Properties
AttrChangeSetId | Returns the unique ID of the change set. |
AttrCreationTime | Returns The time at which the stack was created. |
AttrLastUpdateTime | Returns the time the stack was last updated. |
AttrOutputs | Returns a list of output structures. |
AttrParentId | For nested stacks--stacks created as resources for another stack--returns the stack ID of the direct parent of this stack. |
AttrRootId | For nested stacks--stacks created as resources for another stack--returns the stack ID of the top-level stack to which the nested stack ultimately belongs. |
AttrStackId | Returns the unique identifier of the stack. |
AttrStackStatus | Returns a success or failure message associated with the stack status. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
NotificationArns | The Amazon SNS topic ARNs to publish stack related events. |
Parameters | The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | Key-value pairs to associate with this stack. |
TemplateUrl | Location of file containing the template body. |
TimeoutInMinutes | The length of time, in minutes, that CloudFormation waits for the nested stack to reach the |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnStack(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnStack(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnStack(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnStack(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnStack(Construct, String, ICfnStackProps)
public CfnStack(Construct scope, string id, ICfnStackProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnStackProps
Resource properties.
Properties
AttrChangeSetId
Returns the unique ID of the change set.
public virtual string AttrChangeSetId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: ChangeSetId
AttrCreationTime
Returns The time at which the stack was created.
public virtual string AttrCreationTime { get; }
Property Value
System.String
Remarks
CloudformationAttribute: CreationTime
AttrLastUpdateTime
Returns the time the stack was last updated.
public virtual string AttrLastUpdateTime { get; }
Property Value
System.String
Remarks
This will only be returned if the stack has been updated at least once.
CloudformationAttribute: LastUpdateTime
AttrOutputs
Returns a list of output structures.
public virtual IResolvable AttrOutputs { get; }
Property Value
Remarks
CloudformationAttribute: Outputs
AttrParentId
For nested stacks--stacks created as resources for another stack--returns the stack ID of the direct parent of this stack.
public virtual string AttrParentId { get; }
Property Value
System.String
Remarks
For the first level of nested stacks, the root stack is also the parent stack.
For more information, see Working with Nested Stacks in the AWS CloudFormation User Guide .
CloudformationAttribute: ParentId
AttrRootId
For nested stacks--stacks created as resources for another stack--returns the stack ID of the top-level stack to which the nested stack ultimately belongs.
public virtual string AttrRootId { get; }
Property Value
System.String
Remarks
For more information, see Working with Nested Stacks in the AWS CloudFormation User Guide .
CloudformationAttribute: RootId
AttrStackId
Returns the unique identifier of the stack.
public virtual string AttrStackId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: StackId
AttrStackStatus
Returns a success or failure message associated with the stack status.
public virtual string AttrStackStatus { get; }
Property Value
System.String
Remarks
CloudformationAttribute: StackStatus
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
NotificationArns
The Amazon SNS topic ARNs to publish stack related events.
public virtual string[] NotificationArns { get; set; }
Property Value
System.String[]
Parameters
The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created.
public virtual object Parameters { get; set; }
Property Value
System.Object
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
Key-value pairs to associate with this stack.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
TemplateUrl
Location of file containing the template body.
public virtual string TemplateUrl { get; set; }
Property Value
System.String
TimeoutInMinutes
The length of time, in minutes, that CloudFormation waits for the nested stack to reach the CREATE_COMPLETE
state.
public virtual Nullable<double> TimeoutInMinutes { get; set; }
Property Value
System.Nullable<System.Double>
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>