CfnStackSet
- class aws_cdk.CfnStackSet(scope, id, *, permission_model, stack_set_name, administration_role_arn=None, auto_deployment=None, call_as=None, capabilities=None, description=None, execution_role_name=None, managed_execution=None, operation_preferences=None, parameters=None, stack_instances_group=None, tags=None, template_body=None, template_url=None)
Bases:
CfnResource
The
AWS::CloudFormation::StackSet
enables you to provision stacks into AWS accounts and across Regions by using a single CloudFormation template.In the stack set, you specify the template to use, in addition to any parameters and capabilities that the template requires. .. epigraph:
Run deployments to nested StackSets from the parent stack, not directly through the StackSet API.
- See:
- CloudformationResource:
AWS::CloudFormation::StackSet
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk # managed_execution: Any cfn_stack_set = cdk.CfnStackSet(self, "MyCfnStackSet", permission_model="permissionModel", stack_set_name="stackSetName", # the properties below are optional administration_role_arn="administrationRoleArn", auto_deployment=cdk.CfnStackSet.AutoDeploymentProperty( 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=cdk.CfnStackSet.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=[cdk.CfnStackSet.ParameterProperty( parameter_key="parameterKey", parameter_value="parameterValue" )], stack_instances_group=[cdk.CfnStackSet.StackInstancesProperty( deployment_targets=cdk.CfnStackSet.DeploymentTargetsProperty( account_filter_type="accountFilterType", accounts=["accounts"], accounts_url="accountsUrl", organizational_unit_ids=["organizationalUnitIds"] ), regions=["regions"], # the properties below are optional parameter_overrides=[cdk.CfnStackSet.ParameterProperty( parameter_key="parameterKey", parameter_value="parameterValue" )] )], tags=[cdk.CfnTag( key="key", value="value" )], template_body="templateBody", template_url="templateUrl" )
- Parameters:
scope (
Construct
) – Scope in which this resource is defined.id (
str
) – Construct identifier for this resource (unique in its scope).permission_model (
str
) – Describes how the IAM roles required for stack set operations are created. - WithSELF_MANAGED
permissions, you must create the administrator and execution roles required to deploy to target accounts. For more information, see Grant Self-Managed Stack Set Permissions . - WithSERVICE_MANAGED
permissions, StackSets automatically creates the IAM roles required to deploy to accounts managed by AWS Organizations .stack_set_name (
str
) – The name to associate with the stack set. The name must be unique in the Region where you create your stack set. .. epigraph:: TheStackSetName
property is required.administration_role_arn (
Optional
[str
]) – The Amazon Resource Number (ARN) of the IAM role to use to create this stack set. Specify an IAM role only if you are using customized administrator roles to control which users or groups can manage specific stack sets within the same administrator account. Use customized administrator roles to control which users or groups can manage specific stack sets within the same administrator account. For more information, see Prerequisites: Granting Permissions for Stack Set Operations in the AWS CloudFormation User Guide . Minimum :20
Maximum :2048
auto_deployment (
Union
[IResolvable
,AutoDeploymentProperty
,Dict
[str
,Any
],None
]) – [Service-managed
permissions] Describes whether StackSets automatically deploys to AWS Organizations accounts that are added to a target organization or organizational unit (OU).call_as (
Optional
[str
]) – [Service-managed permissions] Specifies whether you are acting as an account administrator in the organization’s management account or as a delegated administrator in a member account. By default,SELF
is specified. UseSELF
for stack sets with self-managed permissions. - To create a stack set with service-managed permissions while signed in to the management account, specifySELF
. - To create a stack set with service-managed permissions while signed in to a delegated administrator account, specifyDELEGATED_ADMIN
. Your AWS account must be registered as a delegated admin in the management account. For more information, see Register a delegated administrator in the AWS CloudFormation User Guide . Stack sets with service-managed permissions are created in the management account, including stack sets that are created by delegated administrators. Valid Values :SELF
|DELEGATED_ADMIN
capabilities (
Optional
[Sequence
[str
]]) – The capabilities that are allowed in the stack set. Some stack set 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 more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .description (
Optional
[str
]) – A description of the stack set. Minimum :1
Maximum :1024
execution_role_name (
Optional
[str
]) – The name of the IAM execution role to use to create the stack set. If you don’t specify an execution role, AWS CloudFormation uses theAWSCloudFormationStackSetExecutionRole
role for the stack set operation. Minimum :1
Maximum :64
Pattern :[a-zA-Z_0-9+=,.@-]+
managed_execution (
Any
) – Describes whether StackSets performs non-conflicting operations concurrently and queues conflicting operations. When active, StackSets performs non-conflicting operations concurrently and queues conflicting operations. After conflicting operations finish, StackSets starts queued operations in request order. .. epigraph:: If there are already running or queued operations, StackSets queues all incoming operations even if they are non-conflicting. You can’t modify your stack set’s execution configuration while there are running or queued operations for that stack set. When inactive (default), StackSets performs one operation at a time in request order.operation_preferences (
Union
[IResolvable
,OperationPreferencesProperty
,Dict
[str
,Any
],None
]) – The user-specified preferences for how AWS CloudFormation performs a stack set operation.parameters (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ParameterProperty
,Dict
[str
,Any
]]],None
]) – The input parameters for the stack set template.stack_instances_group (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,StackInstancesProperty
,Dict
[str
,Any
]]],None
]) – A group of stack instances with parameters in some specific accounts and Regions.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – Key-value pairs to associate with this stack. CloudFormation also propagates these tags to supported resources in the stack. You can specify a maximum number of 50 tags. If you don’t specify this parameter, CloudFormation doesn’t modify the stack’s tags. If you specify an empty value, CloudFormation removes all associated tags.template_body (
Optional
[str
]) – The structure that contains the template body, with a minimum length of 1 byte and a maximum length of 51,200 bytes. You must include eitherTemplateURL
orTemplateBody
in a StackSet, but you can’t use both. Dynamic references in theTemplateBody
may not work correctly in all cases. It’s recommended to pass templates containing dynamic references throughTemplateUrl
instead.template_url (
Optional
[str
]) – Location of file containing the template body. The URL must point to a template that’s located in an Amazon S3 bucket or a Systems Manager document. For more information, go to Template Anatomy in the AWS CloudFormation User Guide. Conditional: You must specify only one of the following parameters:TemplateBody
,TemplateURL
.
Methods
- add_deletion_override(path)
Syntactic sugar for
addOverride(path, undefined)
.- Parameters:
path (
str
) – The path of the value to delete.- Return type:
None
- add_dependency(target)
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- add_depends_on(target)
(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
- Parameters:
target (
CfnResource
) –- Deprecated:
use addDependency
- Stability:
deprecated
- Return type:
None
- add_metadata(key, value)
Add a value to the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –value (
Any
) –
- See:
- Return type:
None
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- add_override(path, value)
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverride
or prefixpath
with “Properties.” (i.e.Properties.TopicName
).If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal
.
in the property name, prefix with a\
. In most programming languages you will need to write this as"\\."
because the\
itself will need to be escaped.For example:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The
value
argument toaddOverride
will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.- Parameters:
path (
str
) –The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.
value (
Any
) –The value. Could be primitive or complex.
- Return type:
None
- add_property_deletion_override(property_path)
Adds an override that deletes the value of a property from the resource definition.
- Parameters:
property_path (
str
) – The path to the property.- Return type:
None
- add_property_override(property_path, value)
Adds an override to a resource property.
Syntactic sugar for
addOverride("Properties.<...>", value)
.- Parameters:
property_path (
str
) – The path of the property.value (
Any
) – The value.
- Return type:
None
- apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT
). A list of resources that support this policy can be found in the following link:- Parameters:
policy (
Optional
[RemovalPolicy
]) –apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
Optional
[RemovalPolicy
]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.
- See:
- Return type:
None
- get_att(attribute_name, type_hint=None)
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g.
resource.arn
), but this can be used for future compatibility in case there is no generated attribute.- Parameters:
attribute_name (
str
) – The name of the attribute.type_hint (
Optional
[ResolutionTypeHint
]) –
- Return type:
- get_metadata(key)
Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –- See:
- Return type:
Any
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- inspect(inspector)
Examines the CloudFormation resource and discloses attributes.
- Parameters:
inspector (
TreeInspector
) – tree inspector to collect and process attributes.- Return type:
None
- obtain_dependencies()
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
- Return type:
List
[Union
[Stack
,CfnResource
]]
- obtain_resource_dependencies()
Get a shallow copy of dependencies between this resource and other resources in the same stack.
- Return type:
List
[CfnResource
]
- override_logical_id(new_logical_id)
Overrides the auto-generated logical ID with a specific ID.
- Parameters:
new_logical_id (
str
) – The new logical ID to use for this stack element.- Return type:
None
- remove_dependency(target)
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- replace_dependency(target, new_target)
Replaces one dependency with another.
- Parameters:
target (
CfnResource
) – The dependency to replace.new_target (
CfnResource
) – The new dependency to add.
- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str
- Returns:
a string representation of this resource
Attributes
- CFN_RESOURCE_TYPE_NAME = 'AWS::CloudFormation::StackSet'
- administration_role_arn
The Amazon Resource Number (ARN) of the IAM role to use to create this stack set.
- attr_stack_set_id
The ID of the stack that you’re creating.
- CloudformationAttribute:
StackSetId
- auto_deployment
[
Service-managed
permissions] Describes whether StackSets automatically deploys to AWS Organizations accounts that are added to a target organization or organizational unit (OU).
- call_as
[Service-managed permissions] Specifies whether you are acting as an account administrator in the organization’s management account or as a delegated administrator in a member account.
- capabilities
The capabilities that are allowed in the stack set.
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- creation_stack
return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- description
A description of the stack set.
- execution_role_name
The name of the IAM execution role to use to create the stack set.
- logical_id
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use
overrideLogicalId(newLogicalId)
.- Returns:
the logical ID as a stringified token. This value will only get resolved during synthesis.
- managed_execution
Describes whether StackSets performs non-conflicting operations concurrently and queues conflicting operations.
- node
The tree node.
- operation_preferences
The user-specified preferences for how AWS CloudFormation performs a stack set operation.
- parameters
The input parameters for the stack set template.
- permission_model
Describes how the IAM roles required for stack set operations are created.
- ref
Return a string that will be resolved to a CloudFormation
{ Ref }
for this element.If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through
Lazy.any({ produce: resource.ref })
.
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- stack_instances_group
A group of stack instances with parameters in some specific accounts and Regions.
- stack_set_name
The name to associate with the stack set.
- tags
Tag Manager which manages the tags for this resource.
- tags_raw
Key-value pairs to associate with this stack.
- template_body
The structure that contains the template body, with a minimum length of 1 byte and a maximum length of 51,200 bytes.
- template_url
Location of file containing the template body.
Static Methods
- classmethod is_cfn_element(x)
Returns
true
if a construct is a stack element (i.e. part of the synthesized cloudformation template).Uses duck-typing instead of
instanceof
to allow stack elements from different versions of this library to be included in the same stack.- Parameters:
x (
Any
) –- Return type:
bool
- Returns:
The construct as a stack element or undefined if it is not a stack element.
- classmethod is_cfn_resource(x)
Check whether the given object is a CfnResource.
- Parameters:
x (
Any
) –- Return type:
bool
- classmethod is_construct(x)
Checks if
x
is a construct.Use this method instead of
instanceof
to properly detectConstruct
instances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructs
library on disk are seen as independent, completely different libraries. As a consequence, the classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
the other class.npm install
will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, and using this type-testing method instead.- Parameters:
x (
Any
) – Any object.- Return type:
bool
- Returns:
true if
x
is an object created from a class which extendsConstruct
.
AutoDeploymentProperty
- class CfnStackSet.AutoDeploymentProperty(*, enabled=None, retain_stacks_on_account_removal=None)
Bases:
object
[
Service-managed
permissions] Describes whether StackSets automatically deploys to AWS Organizations accounts that are added to a target organizational unit (OU).- Parameters:
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 ifEnabled
is 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. import aws_cdk as cdk auto_deployment_property = cdk.CfnStackSet.AutoDeploymentProperty( enabled=False, retain_stacks_on_account_removal=False )
Attributes
- 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 ifEnabled
is set toTrue
.
DeploymentTargetsProperty
- class CfnStackSet.DeploymentTargetsProperty(*, account_filter_type=None, accounts=None, accounts_url=None, organizational_unit_ids=None)
Bases:
object
The AWS OrganizationalUnitIds or Accounts for which to create stack instances in the specified Regions.
- Parameters:
account_filter_type (
Optional
[str
]) – Limit deployment targets to individual accounts or include additional accounts with provided OUs. The following is a list of possible values for theAccountFilterType
operation. -INTERSECTION
: StackSet deploys to the accounts specified in theAccounts
parameter. -DIFFERENCE
: StackSet deploys to the OU, excluding the accounts specified in theAccounts
parameter. -UNION
StackSet deploys to the OU, and the accounts specified in theAccounts
parameter.UNION
is not supported for create operations when using StackSet as a resource.accounts (
Optional
[Sequence
[str
]]) – The names of one or more AWS accounts for which you want to deploy stack set updates. Pattern :^[0-9]{12}$
accounts_url (
Optional
[str
]) – Returns the value of theAccountsUrl
property.organizational_unit_ids (
Optional
[Sequence
[str
]]) – The organization root ID or organizational unit (OU) IDs to which StackSets deploys. 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. import aws_cdk as cdk deployment_targets_property = cdk.CfnStackSet.DeploymentTargetsProperty( account_filter_type="accountFilterType", accounts=["accounts"], accounts_url="accountsUrl", organizational_unit_ids=["organizationalUnitIds"] )
Attributes
- account_filter_type
Limit deployment targets to individual accounts or include additional accounts with provided OUs.
The following is a list of possible values for the
AccountFilterType
operation.INTERSECTION
: StackSet deploys to the accounts specified in theAccounts
parameter.DIFFERENCE
: StackSet deploys to the OU, excluding the accounts specified in theAccounts
parameter.UNION
StackSet deploys to the OU, and the accounts specified in theAccounts
parameter.UNION
is not supported for create operations when using StackSet as a resource.
- accounts
The names of one or more AWS accounts for which you want to deploy stack set updates.
Pattern :
^[0-9]{12}$
- accounts_url
Returns the value of the
AccountsUrl
property.
- organizational_unit_ids
The organization root ID or organizational unit (OU) IDs to which StackSets deploys.
Pattern :
^(ou-[a-z0-9]{4,32}-[a-z0-9]{8,32}|r-[a-z0-9]{4,32})$
ManagedExecutionProperty
- class CfnStackSet.ManagedExecutionProperty(*, active=None)
Bases:
object
Describes whether StackSets performs non-conflicting operations concurrently and queues conflicting operations.
- Parameters:
active (
Union
[bool
,IResolvable
,None
]) – Whentrue
, StackSets performs non-conflicting operations concurrently and queues conflicting operations. After conflicting operations finish, StackSets starts queued operations in request order. .. epigraph:: If there are already running or queued operations, StackSets queues all incoming operations even if they are non-conflicting. You can’t modify your stack set’s execution configuration while there are running or queued operations for that stack set. 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. import aws_cdk as cdk managed_execution_property = cdk.CfnStackSet.ManagedExecutionProperty( active=False )
Attributes
- active
When
true
, StackSets performs non-conflicting operations concurrently and queues conflicting operations.After conflicting operations finish, StackSets starts queued operations in request order. .. epigraph:
If there are already running or queued operations, StackSets queues all incoming operations even if they are non-conflicting. You can't modify your stack set's execution configuration while there are running or queued operations for that stack set.
When
false
(default), StackSets performs one operation at a time in request order.
OperationPreferencesProperty
- class CfnStackSet.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:
object
The user-specified preferences for how AWS CloudFormation performs a stack set operation.
For more information on maximum concurrent accounts and failure tolerance, see Stack set operation options .
- 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 decouplesFailureToleranceCount
from the actual concurrency. This allows stack set operations to run at the concurrency level set by theMaxConcurrentCount
value, orMaxConcurrentPercentage
, regardless of the number of failures.failure_tolerance_count (
Union
[int
,float
,None
]) – The number of accounts, per Region, for which this operation can fail before AWS CloudFormation stops the operation in that Region. If the operation is stopped in a Region, AWS CloudFormation doesn’t attempt the operation in any subsequent Regions. Conditional: You must specify eitherFailureToleranceCount
orFailureTolerancePercentage
(but not both).failure_tolerance_percentage (
Union
[int
,float
,None
]) – The percentage of accounts, per Region, for which this stack operation can fail before AWS CloudFormation stops the operation in that Region. If the operation is stopped in a Region, AWS CloudFormation doesn’t attempt the operation in any subsequent Regions. When calculating the number of accounts based on the specified percentage, AWS CloudFormation rounds down to the next whole number. Conditional: You must specify eitherFailureToleranceCount
orFailureTolerancePercentage
, 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
.MaxConcurrentCount
is 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 eitherMaxConcurrentCount
orMaxConcurrentPercentage
, 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, AWS 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 eitherMaxConcurrentCount
orMaxConcurrentPercentage
, 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. .. epigraph::RegionOrder
isn’t followed ifAutoDeployment
is enabled.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk operation_preferences_property = cdk.CfnStackSet.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 decouplesFailureToleranceCount
from the actual concurrency. This allows stack set operations to run at the concurrency level set by theMaxConcurrentCount
value, orMaxConcurrentPercentage
, regardless of the number of failures.
- failure_tolerance_count
The number of accounts, per Region, for which this operation can fail before AWS CloudFormation stops the operation in that Region.
If the operation is stopped in a Region, AWS CloudFormation doesn’t attempt the operation in any subsequent Regions.
Conditional: You must specify either
FailureToleranceCount
orFailureTolerancePercentage
(but not both).
- failure_tolerance_percentage
The percentage of accounts, per Region, for which this stack operation can fail before AWS CloudFormation stops the operation in that Region.
If the operation is stopped in a Region, AWS CloudFormation doesn’t attempt the operation in any subsequent Regions.
When calculating the number of accounts based on the specified percentage, AWS CloudFormation rounds down to the next whole number.
Conditional: You must specify either
FailureToleranceCount
orFailureTolerancePercentage
, 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
.MaxConcurrentCount
is 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
MaxConcurrentCount
orMaxConcurrentPercentage
, 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, AWS 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
MaxConcurrentCount
orMaxConcurrentPercentage
, 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.
RegionOrder
isn’t followed ifAutoDeployment
is enabled.
ParameterProperty
- class CfnStackSet.ParameterProperty(*, parameter_key, parameter_value)
Bases:
object
The Parameter data type.
- Parameters:
parameter_key (
str
) – The key associated with the parameter. If you don’t specify a key and value for a particular parameter, AWS CloudFormation uses the default value that’s specified in your template.parameter_value (
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. import aws_cdk as cdk parameter_property = cdk.CfnStackSet.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, AWS CloudFormation uses the default value that’s specified in your template.
- parameter_value
The input value associated with the parameter.
StackInstancesProperty
- class CfnStackSet.StackInstancesProperty(*, deployment_targets, regions, parameter_overrides=None)
Bases:
object
Stack instances in some specific accounts and Regions.
- Parameters:
deployment_targets (
Union
[IResolvable
,DeploymentTargetsProperty
,Dict
[str
,Any
]]) – The AWSOrganizationalUnitIds
orAccounts
for which to create stack instances in the specified Regions.regions (
Sequence
[str
]) – The names of one or more Regions where you want to create stack instances using the specified AWS accounts .parameter_overrides (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ParameterProperty
,Dict
[str
,Any
]]],None
]) – A list of stack set parameters whose values you want to override in the selected stack instances.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk stack_instances_property = cdk.CfnStackSet.StackInstancesProperty( deployment_targets=cdk.CfnStackSet.DeploymentTargetsProperty( account_filter_type="accountFilterType", accounts=["accounts"], accounts_url="accountsUrl", organizational_unit_ids=["organizationalUnitIds"] ), regions=["regions"], # the properties below are optional parameter_overrides=[cdk.CfnStackSet.ParameterProperty( parameter_key="parameterKey", parameter_value="parameterValue" )] )
Attributes
- deployment_targets
The AWS
OrganizationalUnitIds
orAccounts
for which to create stack instances in the specified Regions.
- parameter_overrides
A list of stack set 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 .