CfnStackSet
- class aws_cdk.aws_cloudformation.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
A CloudFormation
AWS::CloudFormation::StackSet
.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.- CloudformationResource:
AWS::CloudFormation::StackSet
- Link:
- 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.aws_cloudformation as cloudformation # managed_execution: Any cfn_stack_set = cloudformation.CfnStackSet(self, "MyCfnStackSet", permission_model="permissionModel", stack_set_name="stackSetName", # the properties below are optional administration_role_arn="administrationRoleArn", auto_deployment=cloudformation.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=cloudformation.CfnStackSet.OperationPreferencesProperty( 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.CfnStackSet.ParameterProperty( parameter_key="parameterKey", parameter_value="parameterValue" )], stack_instances_group=[cloudformation.CfnStackSet.StackInstancesProperty( deployment_targets=cloudformation.CfnStackSet.DeploymentTargetsProperty( account_filter_type="accountFilterType", accounts=["accounts"], organizational_unit_ids=["organizationalUnitIds"] ), regions=["regions"], # the properties below are optional parameter_overrides=[cloudformation.CfnStackSet.ParameterProperty( parameter_key="parameterKey", parameter_value="parameterValue" )] )], tags=[CfnTag( key="key", value="value" )], template_body="templateBody", template_url="templateUrl" )
Create a new
AWS::CloudFormation::StackSet
.- Parameters:
scope (
Construct
) –scope in which this resource is defined.
id (
str
) –scoped id of the resource.
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 . For more information, see Grant Service-Managed Stack Set Permissions .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. Maximum :128
Pattern :^[a-zA-Z][a-zA-Z0-9-]{0,127}$
.. 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 (
Optional
[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
]]]]) – The key-value pairs to associate with this stack set and the stacks created from it. AWS CloudFormation also propagates these tags to supported resources that are created in the stacks. A maximum number of 50 tags can be specified.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. Minimum :1
Maximum :51200
template_url (
Optional
[str
]) – Location 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. You must include eitherTemplateURL
orTemplateBody
in a StackSet, but you can’t use both. Minimum :1
Maximum :1024
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_depends_on(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_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 intermdediate 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
).- 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 resoure, please consult that specific resource’s documentation.
- Return type:
None
- get_att(attribute_name)
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.- 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
- 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
- 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.
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
- 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.
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, specify
SELF
.To create a stack set with service-managed permissions while signed in to a delegated administrator account, specify
DELEGATED_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
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 .
- 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.
Minimum :
1
Maximum :
1024
- execution_role_name
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 the
AWSCloudFormationStackSetExecutionRole
role for the stack set operation.Minimum :
1
Maximum :
64
Pattern :
[a-zA-Z_0-9+=,.@-]+
- 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.
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.
- node
The construct tree node associated with this construct.
- 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.
With
SELF_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 .With
SERVICE_MANAGED
permissions, StackSets automatically creates the IAM roles required to deploy to accounts managed by AWS Organizations . For more information, see Grant Service-Managed Stack Set Permissions .
- 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.
The name must be unique in the Region where you create your stack set.
Maximum :
128
Pattern :
^[a-zA-Z][a-zA-Z0-9-]{0,127}$
.. epigraph:The ``StackSetName`` property is required.
- tags
The key-value pairs to associate with this stack set and the stacks created from it.
AWS CloudFormation also propagates these tags to supported resources that are created in the stacks. A maximum number of 50 tags can be specified.
- template_body
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 either
TemplateURL
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.Minimum :
1
Maximum :
51200
- template_url
Location 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.
You must include either
TemplateURL
orTemplateBody
in a StackSet, but you can’t use both.Minimum :
1
Maximum :
1024
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(construct)
Check whether the given construct is a CfnResource.
- Parameters:
construct (
IConstruct
)- Return type:
bool
- classmethod is_construct(x)
Return whether the given object is a Construct.
- Parameters:
x (
Any
)- Return type:
bool
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
.
- Link:
- 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.aws_cloudformation as cloudformation auto_deployment_property = cloudformation.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, 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
: StackSets deploys to the accounts specified inAccounts
parameter. -DIFFERENCE
: StackSets excludes the accounts specified inAccounts
parameter. This enables user to avoid certain accounts within an OU such as suspended accounts. -UNION
: StackSets includes additional accounts deployment targets. This is the default value ifAccountFilterType
is not provided. This enables user to update an entire OU and individual accounts from a different OU in one request, which used to be two separate requests. -NONE
: Deploys to all the accounts in specified organizational units (OU).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}$
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})$
- Link:
- 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.aws_cloudformation as cloudformation deployment_targets_property = cloudformation.CfnStackSet.DeploymentTargetsProperty( account_filter_type="accountFilterType", accounts=["accounts"], 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
: StackSets deploys to the accounts specified inAccounts
parameter.DIFFERENCE
: StackSets excludes the accounts specified inAccounts
parameter. This enables user to avoid certain accounts within an OU such as suspended accounts.UNION
: StackSets includes additional accounts deployment targets.
This is the default value if
AccountFilterType
is not provided. This enables user to update an entire OU and individual accounts from a different OU in one request, which used to be two separate requests.NONE
: Deploys to all the accounts in specified organizational units (OU).
- accounts
The names of one or more AWS accounts for which you want to deploy stack set updates.
Pattern :
^[0-9]{12}$
- 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.- Link:
- 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.aws_cloudformation as cloudformation managed_execution_property = cloudformation.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(*, 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:
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.
- Link:
- 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.aws_cloudformation as cloudformation operation_preferences_property = cloudformation.CfnStackSet.OperationPreferencesProperty( failure_tolerance_count=123, failure_tolerance_percentage=123, max_concurrent_count=123, max_concurrent_percentage=123, region_concurrency_type="regionConcurrencyType", region_order=["regionOrder"] )
Attributes
- 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.
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.
- Link:
- 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.aws_cloudformation as cloudformation parameter_property = cloudformation.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.
- Link:
- 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.aws_cloudformation as cloudformation stack_instances_property = cloudformation.CfnStackSet.StackInstancesProperty( deployment_targets=cloudformation.CfnStackSet.DeploymentTargetsProperty( account_filter_type="accountFilterType", accounts=["accounts"], organizational_unit_ids=["organizationalUnitIds"] ), regions=["regions"], # the properties below are optional parameter_overrides=[cloudformation.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 .