CfnStackSetPropsMixin
- class aws_cdk.mixins_preview.aws_cloudformation.mixins.CfnStackSetPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::CloudFormation::StackSetresource contains information about a StackSet.With StackSets, you can provision stacks across AWS accounts and Regions from a single CloudFormation template. Each stack is based on the same CloudFormation template, but you can customize individual stacks using parameters. .. epigraph:
Run deployments to nested StackSets from the parent stack, not directly through the StackSet API.
- See:
- CloudformationResource:
AWS::CloudFormation::StackSet
- 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 # managed_execution: Any cfn_stack_set_props_mixin = cloudformation_mixins.CfnStackSetPropsMixin(cloudformation_mixins.CfnStackSetMixinProps( administration_role_arn="administrationRoleArn", auto_deployment=cloudformation_mixins.CfnStackSetPropsMixin.AutoDeploymentProperty( depends_on=["dependsOn"], enabled=False, retain_stacks_on_account_removal=False ), call_as="callAs", capabilities=["capabilities"], description="description", execution_role_name="executionRoleName", managed_execution=managed_execution, operation_preferences=cloudformation_mixins.CfnStackSetPropsMixin.OperationPreferencesProperty( concurrency_mode="concurrencyMode", failure_tolerance_count=123, failure_tolerance_percentage=123, max_concurrent_count=123, max_concurrent_percentage=123, region_concurrency_type="regionConcurrencyType", region_order=["regionOrder"] ), parameters=[cloudformation_mixins.CfnStackSetPropsMixin.ParameterProperty( parameter_key="parameterKey", parameter_value="parameterValue" )], permission_model="permissionModel", stack_instances_group=[cloudformation_mixins.CfnStackSetPropsMixin.StackInstancesProperty( deployment_targets=cloudformation_mixins.CfnStackSetPropsMixin.DeploymentTargetsProperty( account_filter_type="accountFilterType", accounts=["accounts"], accounts_url="accountsUrl", organizational_unit_ids=["organizationalUnitIds"] ), parameter_overrides=[cloudformation_mixins.CfnStackSetPropsMixin.ParameterProperty( parameter_key="parameterKey", parameter_value="parameterValue" )], regions=["regions"] )], stack_set_name="stackSetName", tags=[CfnTag( key="key", value="value" )], template_body="templateBody", template_url="templateUrl" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::CloudFormation::StackSet.- Parameters:
props (
Union[CfnStackSetMixinProps,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 = ['administrationRoleArn', 'autoDeployment', 'callAs', 'capabilities', 'description', 'executionRoleName', 'managedExecution', 'operationPreferences', 'parameters', 'permissionModel', 'stackInstancesGroup', 'stackSetName', 'tags', 'templateBody', 'templateUrl']
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
AutoDeploymentProperty
- class CfnStackSetPropsMixin.AutoDeploymentProperty(*, depends_on=None, enabled=None, retain_stacks_on_account_removal=None)
Bases:
objectDescribes whether StackSets automatically deploys to AWS Organizations accounts that are added to a target organization or organizational unit (OU).
For more information, see Enable or disable automatic deployments for StackSets in AWS Organizations in the CloudFormation User Guide .
- Parameters:
depends_on (
Optional[Sequence[str]]) – A list of StackSet ARNs that this StackSet depends on for auto-deployment operations. When auto-deployment is triggered, operations will be sequenced to ensure all dependencies complete successfully before this StackSet’s operation begins.enabled (
Union[bool,IResolvable,None]) – If set totrue, StackSets automatically deploys additional stack instances to AWS Organizations accounts that are added to a target organization or organizational unit (OU) in the specified Regions. If an account is removed from a target organization or OU, StackSets deletes stack instances from the account in the specified Regions.retain_stacks_on_account_removal (
Union[bool,IResolvable,None]) – If set totrue, stack resources are retained when an account is removed from a target organization or OU. If set tofalse, stack resources are deleted. Specify only ifEnabledis set toTrue.
- 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 auto_deployment_property = cloudformation_mixins.CfnStackSetPropsMixin.AutoDeploymentProperty( depends_on=["dependsOn"], enabled=False, retain_stacks_on_account_removal=False )
Attributes
- depends_on
A list of StackSet ARNs that this StackSet depends on for auto-deployment operations.
When auto-deployment is triggered, operations will be sequenced to ensure all dependencies complete successfully before this StackSet’s operation begins.
- enabled
If set to
true, StackSets automatically deploys additional stack instances to AWS Organizations accounts that are added to a target organization or organizational unit (OU) in the specified Regions.If an account is removed from a target organization or OU, StackSets deletes stack instances from the account in the specified Regions.
- retain_stacks_on_account_removal
If set to
true, stack resources are retained when an account is removed from a target organization or OU.If set to
false, stack resources are deleted. Specify only ifEnabledis set toTrue.
DeploymentTargetsProperty
- class CfnStackSetPropsMixin.DeploymentTargetsProperty(*, account_filter_type=None, accounts=None, accounts_url=None, organizational_unit_ids=None)
Bases:
objectThe AWS Organizations accounts or AWS accounts to deploy stacks to in the specified Regions.
When deploying to AWS Organizations accounts with
SERVICE_MANAGEDpermissions:You must specify the
OrganizationalUnitIdsproperty.If you specify organizational units (OUs) for
OrganizationalUnitIdsand use either theAccountsorAccountsUrlproperty, you must also specify theAccountFilterTypeproperty.
When deploying to AWS accounts with
SELF_MANAGEDpermissions:You must specify either the
AccountsorAccountsUrlproperty, but not both.
- Parameters:
account_filter_type (
Optional[str]) – Refines which accounts to deploy stacks to by specifying how to use theAccountsandOrganizationalUnitIdsproperties together. The following values determine how CloudFormation selects target accounts: -INTERSECTION: StackSet deploys to the accounts specified in theAccountsproperty. -DIFFERENCE: StackSet deploys to the OU, excluding the accounts specified in theAccountsproperty. -UNION: StackSet deploys to the OU, and the accounts specified in theAccountsproperty.UNIONis not supported for create operations when using StackSet as a resource or theCreateStackInstancesAPI.accounts (
Optional[Sequence[str]]) – The account IDs of the AWS accounts . If you have many account numbers, you can provide those accounts using theAccountsUrlproperty instead. Pattern :^[0-9]{12}$accounts_url (
Optional[str]) – The Amazon S3 URL path to a file that contains a list of AWS account IDs. The file format must be either.csvor.txt, and the data can be comma-separated or new-line-separated. There is currently a 10MB limit for the data (approximately 800,000 accounts). This property serves the same purpose asAccountsbut allows you to specify a large number of accounts.organizational_unit_ids (
Optional[Sequence[str]]) – The organization root ID or organizational unit (OU) IDs. Pattern :^(ou-[a-z0-9]{4,32}-[a-z0-9]{8,32}|r-[a-z0-9]{4,32})$
- 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 deployment_targets_property = cloudformation_mixins.CfnStackSetPropsMixin.DeploymentTargetsProperty( account_filter_type="accountFilterType", accounts=["accounts"], accounts_url="accountsUrl", organizational_unit_ids=["organizationalUnitIds"] )
Attributes
- account_filter_type
Refines which accounts to deploy stacks to by specifying how to use the
AccountsandOrganizationalUnitIdsproperties together.The following values determine how CloudFormation selects target accounts:
INTERSECTION: StackSet deploys to the accounts specified in theAccountsproperty.DIFFERENCE: StackSet deploys to the OU, excluding the accounts specified in theAccountsproperty.UNION: StackSet deploys to the OU, and the accounts specified in theAccountsproperty.UNIONis not supported for create operations when using StackSet as a resource or theCreateStackInstancesAPI.
- accounts
The account IDs of the AWS accounts .
If you have many account numbers, you can provide those accounts using the
AccountsUrlproperty instead.Pattern :
^[0-9]{12}$
- accounts_url
The Amazon S3 URL path to a file that contains a list of AWS account IDs.
The file format must be either
.csvor.txt, and the data can be comma-separated or new-line-separated. There is currently a 10MB limit for the data (approximately 800,000 accounts).This property serves the same purpose as
Accountsbut allows you to specify a large number of accounts.
- organizational_unit_ids
The organization root ID or organizational unit (OU) IDs.
Pattern :
^(ou-[a-z0-9]{4,32}-[a-z0-9]{8,32}|r-[a-z0-9]{4,32})$
ManagedExecutionProperty
- class CfnStackSetPropsMixin.ManagedExecutionProperty(*, active=None)
Bases:
objectDescribes whether StackSets performs non-conflicting operations concurrently and queues conflicting operations.
- Parameters:
active (
Union[bool,IResolvable,None]) – Whentrue, CloudFormation performs non-conflicting operations concurrently and queues conflicting operations. After conflicting operations finish, CloudFormation starts queued operations in request order. .. epigraph:: If there are already running or queued operations, CloudFormation queues all incoming operations even if they are non-conflicting. You can’t modify your StackSet’s execution configuration while there are running or queued operations for that StackSet. Whenfalse(default), StackSets performs one operation at a time in request order.- 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 managed_execution_property = cloudformation_mixins.CfnStackSetPropsMixin.ManagedExecutionProperty( active=False )
Attributes
- active
When
true, CloudFormation performs non-conflicting operations concurrently and queues conflicting operations.After conflicting operations finish, CloudFormation starts queued operations in request order. .. epigraph:
If there are already running or queued operations, CloudFormation queues all incoming operations even if they are non-conflicting. You can't modify your StackSet's execution configuration while there are running or queued operations for that StackSet.
When
false(default), StackSets performs one operation at a time in request order.
OperationPreferencesProperty
- class CfnStackSetPropsMixin.OperationPreferencesProperty(*, concurrency_mode=None, failure_tolerance_count=None, failure_tolerance_percentage=None, max_concurrent_count=None, max_concurrent_percentage=None, region_concurrency_type=None, region_order=None)
Bases:
objectThe user-specified preferences for how CloudFormation performs a StackSet operation.
For more information on maximum concurrent accounts and failure tolerance, see StackSet operation options in the CloudFormation User Guide .
- Parameters:
concurrency_mode (
Optional[str]) – Specifies how the concurrency level behaves during the operation execution. -STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value ofFailureToleranceCount+1. The initial actual concurrency is set to the lower of either the value of theMaxConcurrentCount, or the value ofFailureToleranceCount+1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior. If failure tolerance or Maximum concurrent accounts are set to percentages, the behavior is similar. -SOFT_FAILURE_TOLERANCE: This option decouplesFailureToleranceCountfrom the actual concurrency. This allows StackSet operations to run at the concurrency level set by theMaxConcurrentCountvalue, orMaxConcurrentPercentage, regardless of the number of failures.failure_tolerance_count (
Union[int,float,None]) – The number of accounts per Region this operation can fail in before CloudFormation stops the operation in that Region. If the operation is stopped in a Region, CloudFormation doesn’t attempt the operation in any subsequent Regions. Conditional: You must specify eitherFailureToleranceCountorFailureTolerancePercentage(but not both).failure_tolerance_percentage (
Union[int,float,None]) – The percentage of accounts per Region this stack operation can fail in before CloudFormation stops the operation in that Region. If the operation is stopped in a Region, CloudFormation doesn’t attempt the operation in any subsequent Regions. When calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number. Conditional: You must specify eitherFailureToleranceCountorFailureTolerancePercentage, but not both.max_concurrent_count (
Union[int,float,None]) – The maximum number of accounts in which to perform this operation at one time. This is dependent on the value ofFailureToleranceCount.MaxConcurrentCountis at most one more than theFailureToleranceCount. Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling. Conditional: You must specify eitherMaxConcurrentCountorMaxConcurrentPercentage, but not both.max_concurrent_percentage (
Union[int,float,None]) – The maximum percentage of accounts in which to perform this operation at one time. When calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number. This is true except in cases where rounding down would result is zero. In this case, CloudFormation sets the number as one instead. Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling. Conditional: You must specify eitherMaxConcurrentCountorMaxConcurrentPercentage, but not both.region_concurrency_type (
Optional[str]) – The concurrency type of deploying StackSets operations in Regions, could be in parallel or one Region at a time.region_order (
Optional[Sequence[str]]) – The order of the Regions where you want to perform the stack operation.
- 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 operation_preferences_property = cloudformation_mixins.CfnStackSetPropsMixin.OperationPreferencesProperty( concurrency_mode="concurrencyMode", failure_tolerance_count=123, failure_tolerance_percentage=123, max_concurrent_count=123, max_concurrent_percentage=123, region_concurrency_type="regionConcurrencyType", region_order=["regionOrder"] )
Attributes
- concurrency_mode
Specifies how the concurrency level behaves during the operation execution.
STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value ofFailureToleranceCount+1. The initial actual concurrency is set to the lower of either the value of theMaxConcurrentCount, or the value ofFailureToleranceCount+1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior.
If failure tolerance or Maximum concurrent accounts are set to percentages, the behavior is similar.
SOFT_FAILURE_TOLERANCE: This option decouplesFailureToleranceCountfrom the actual concurrency. This allows StackSet operations to run at the concurrency level set by theMaxConcurrentCountvalue, orMaxConcurrentPercentage, regardless of the number of failures.
- failure_tolerance_count
The number of accounts per Region this operation can fail in before CloudFormation stops the operation in that Region.
If the operation is stopped in a Region, CloudFormation doesn’t attempt the operation in any subsequent Regions.
Conditional: You must specify either
FailureToleranceCountorFailureTolerancePercentage(but not both).
- failure_tolerance_percentage
The percentage of accounts per Region this stack operation can fail in before CloudFormation stops the operation in that Region.
If the operation is stopped in a Region, CloudFormation doesn’t attempt the operation in any subsequent Regions.
When calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number.
Conditional: You must specify either
FailureToleranceCountorFailureTolerancePercentage, but not both.
- max_concurrent_count
The maximum number of accounts in which to perform this operation at one time.
This is dependent on the value of
FailureToleranceCount.MaxConcurrentCountis at most one more than theFailureToleranceCount.Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling.
Conditional: You must specify either
MaxConcurrentCountorMaxConcurrentPercentage, but not both.
- max_concurrent_percentage
The maximum percentage of accounts in which to perform this operation at one time.
When calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number. This is true except in cases where rounding down would result is zero. In this case, CloudFormation sets the number as one instead.
Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling.
Conditional: You must specify either
MaxConcurrentCountorMaxConcurrentPercentage, but not both.
- region_concurrency_type
The concurrency type of deploying StackSets operations in Regions, could be in parallel or one Region at a time.
- region_order
The order of the Regions where you want to perform the stack operation.
ParameterProperty
- class CfnStackSetPropsMixin.ParameterProperty(*, parameter_key=None, parameter_value=None)
Bases:
objectThe Parameter data type.
- Parameters:
parameter_key (
Optional[str]) – The key associated with the parameter. If you don’t specify a key and value for a particular parameter, CloudFormation uses the default value that’s specified in your template.parameter_value (
Optional[str]) – The input value associated with the parameter.
- 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 parameter_property = cloudformation_mixins.CfnStackSetPropsMixin.ParameterProperty( parameter_key="parameterKey", parameter_value="parameterValue" )
Attributes
- parameter_key
The key associated with the parameter.
If you don’t specify a key and value for a particular parameter, CloudFormation uses the default value that’s specified in your template.
- parameter_value
The input value associated with the parameter.
StackInstancesProperty
- class CfnStackSetPropsMixin.StackInstancesProperty(*, deployment_targets=None, parameter_overrides=None, regions=None)
Bases:
objectStack instances in some specific accounts and Regions.
- Parameters:
deployment_targets (
Union[IResolvable,DeploymentTargetsProperty,Dict[str,Any],None]) – The AWS Organizations accounts or AWS accounts to deploy stacks to in the specified Regions.parameter_overrides (
Union[IResolvable,Sequence[Union[IResolvable,ParameterProperty,Dict[str,Any]]],None]) – A list of StackSet parameters whose values you want to override in the selected stack instances.regions (
Optional[Sequence[str]]) – The names of one or more Regions where you want to create stack instances using the specified AWS accounts .
- 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 stack_instances_property = cloudformation_mixins.CfnStackSetPropsMixin.StackInstancesProperty( deployment_targets=cloudformation_mixins.CfnStackSetPropsMixin.DeploymentTargetsProperty( account_filter_type="accountFilterType", accounts=["accounts"], accounts_url="accountsUrl", organizational_unit_ids=["organizationalUnitIds"] ), parameter_overrides=[cloudformation_mixins.CfnStackSetPropsMixin.ParameterProperty( parameter_key="parameterKey", parameter_value="parameterValue" )], regions=["regions"] )
Attributes
- deployment_targets
The AWS Organizations accounts or AWS accounts to deploy stacks to in the specified Regions.
- parameter_overrides
A list of StackSet parameters whose values you want to override in the selected stack instances.
- regions
The names of one or more Regions where you want to create stack instances using the specified AWS accounts .