CfnStackPropsMixin
- class aws_cdk.mixins_preview.aws_cloudformation.mixins.CfnStackPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::CloudFormation::Stackresource nests a stack as a resource in a top-level template.For more information, see Nested stacks in the CloudFormation User Guide .
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 stacks that contain IAM resources, you must acknowledge IAM capabilities. Also, make sure that you have cancel update stack permissions, which are required if an update rolls back. For more information about IAM and CloudFormation , see Controlling access with AWS Identity and Access Management in the CloudFormation User Guide . .. epigraph:
A subset of ``AWS::CloudFormation::Stack`` resource type properties listed below are available to customers using CloudFormation , AWS CDK , and Cloud Control to configure. - ``NotificationARNs`` - ``Parameters`` - ``Tags`` - ``TemplateURL`` - ``TimeoutInMinutes`` These properties can be configured only when using Cloud Control . This is because the below properties are set by the parent stack, and thus cannot be configured using CloudFormation or AWS CDK but only Cloud Control . - ``Capabilities`` - ``Description`` - ``DisableRollback`` - ``EnableTerminationProtection`` - ``RoleARN`` - ``StackName`` - ``StackPolicyBody`` - ``StackPolicyURL`` - ``StackStatusReason`` - ``TemplateBody`` Customers that configure ``AWS::CloudFormation::Stack`` using 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 Cloud Control . - ``ChangeSetId`` - ``CreationTime`` - ``LastUpdateTime`` - ``Outputs`` - ``ParentId`` - ``RootId`` - ``StackId`` - ``StackStatus``
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stack.html
- CloudformationResource:
AWS::CloudFormation::Stack
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_cloudformation import mixins as cloudformation_mixins cfn_stack_props_mixin = cloudformation_mixins.CfnStackPropsMixin(cloudformation_mixins.CfnStackMixinProps( notification_arns=["notificationArns"], parameters={ "parameters_key": "parameters" }, tags=[CfnTag( key="key", value="value" )], template_url="templateUrl", timeout_in_minutes=123 ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::CloudFormation::Stack.- Parameters:
props (
Union[CfnStackMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['notificationArns', 'parameters', 'tags', 'templateUrl', 'timeoutInMinutes']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
OutputProperty
- class CfnStackPropsMixin.OutputProperty(*, description=None, export_name=None, output_key=None, output_value=None)
Bases:
objectThe
Outputdata type.- Parameters:
description (
Optional[str]) – User defined description associated with the output.export_name (
Optional[str]) – The name of the export associated with the output.output_key (
Optional[str]) – The key associated with the output.output_value (
Optional[str]) – The value associated with the output.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_cloudformation import mixins as cloudformation_mixins output_property = cloudformation_mixins.CfnStackPropsMixin.OutputProperty( description="description", export_name="exportName", output_key="outputKey", output_value="outputValue" )
Attributes
- description
User defined description associated with the output.
- export_name
The name of the export associated with the output.
- output_key
The key associated with the output.
- output_value
The value associated with the output.