CfnStackSet

class aws_cdk.core.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

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html

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.core 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(
        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"],
            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"
)

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. - 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 . Allowed Values : SERVICE_MANAGED | SELF_MANAGED .. epigraph:: The PermissionModel property is required.

  • 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:: The StackSetName 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. Use SELF 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 (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 the AWSCloudFormationStackSetExecutionRole 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 either TemplateURL or TemplateBody in a StackSet, but you can’t use both. Dynamic references in the TemplateBody may not work correctly in all cases. It’s recommended to pass templates containing dynamic references through TemplateUrl 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 either TemplateURL or TemplateBody 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

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

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.

Return type

None

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path 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 to addOverride 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: true

  • default (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

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

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.

Return type

Any

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-administrationrolearn

Return type

Optional[str]

attr_stack_set_id

The ID of the stack that you’re creating.

CloudformationAttribute

StackSetId

Return type

str

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).

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-autodeployment

Return type

Union[IResolvable, AutoDeploymentProperty, None]

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. Use SELF 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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-callas

Return type

Optional[str]

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-capabilities

Return type

Optional[List[str]]

cfn_options

Options for this resource, such as condition, update policy etc.

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

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.

Return type

List[str]

description

A description of the stack set.

Minimum : 1

Maximum : 1024

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-description

Return type

Optional[str]

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+=,.@-]+

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-executionrolename

Return type

Optional[str]

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).

Return type

str

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-managedexecution

Return type

Any

node

The construct tree node associated with this construct.

Return type

ConstructNode

operation_preferences

The user-specified preferences for how AWS CloudFormation performs a stack set operation.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-operationpreferences

Return type

Union[IResolvable, OperationPreferencesProperty, None]

parameters

The input parameters for the stack set template.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-parameters

Return type

Union[IResolvable, List[Union[IResolvable, ParameterProperty]], None]

permission_model

Describes how the IAM roles required for stack set operations are created.

Allowed Values : SERVICE_MANAGED | SELF_MANAGED .. epigraph:

The ``PermissionModel`` property is required.
Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-permissionmodel

Return type

str

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 }).

Return type

str

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Return type

Stack

stack_instances_group

A group of stack instances with parameters in some specific accounts and Regions.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-stackinstancesgroup

Return type

Union[IResolvable, List[Union[IResolvable, StackInstancesProperty]], None]

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.
Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-stacksetname

Return type

str

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-tags

Return type

TagManager

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 or TemplateBody in a StackSet, but you can’t use both. Dynamic references in the TemplateBody may not work correctly in all cases. It’s recommended to pass templates containing dynamic references through TemplateUrl instead.

Minimum : 1

Maximum : 51200

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-templatebody

Return type

Optional[str]

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 or TemplateBody in a StackSet, but you can’t use both.

Minimum : 1

Maximum : 1024

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-stackset.html#cfn-cloudformation-stackset-templateurl

Return type

Optional[str]

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 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 (Union[bool, IResolvable, None]) – 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 if Enabled is set to True .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-autodeployment.html

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.core 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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-autodeployment.html#cfn-cloudformation-stackset-autodeployment-enabled

Return type

Union[bool, IResolvable, None]

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 if Enabled is set to True .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-autodeployment.html#cfn-cloudformation-stackset-autodeployment-retainstacksonaccountremoval

Return type

Union[bool, IResolvable, None]

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]) – CfnStackSet.DeploymentTargetsProperty.AccountFilterType.

  • 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

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-deploymenttargets.html

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.core as cdk

deployment_targets_property = cdk.CfnStackSet.DeploymentTargetsProperty(
    account_filter_type="accountFilterType",
    accounts=["accounts"],
    organizational_unit_ids=["organizationalUnitIds"]
)

Attributes

account_filter_type

CfnStackSet.DeploymentTargetsProperty.AccountFilterType.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-deploymenttargets.html#cfn-cloudformation-stackset-deploymenttargets-accountfiltertype

Return type

Optional[str]

accounts

The names of one or more AWS accounts for which you want to deploy stack set updates.

Pattern : ^[0-9]{12}$

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-deploymenttargets.html#cfn-cloudformation-stackset-deploymenttargets-accounts

Return type

Optional[List[str]]

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})$

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-deploymenttargets.html#cfn-cloudformation-stackset-deploymenttargets-organizationalunitids

Return type

Optional[List[str]]

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 either FailureToleranceCount or FailureTolerancePercentage (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 either FailureToleranceCount or FailureTolerancePercentage , 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 of FailureToleranceCount . MaxConcurrentCount is at most one more than the FailureToleranceCount . 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 or MaxConcurrentPercentage , 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 either MaxConcurrentCount or MaxConcurrentPercentage , 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. Allowed values : SEQUENTIAL | PARALLEL

  • region_order (Optional[Sequence[str]]) – The order of the Regions where you want to perform the stack operation.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-operationpreferences.html

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.core as cdk

operation_preferences_property = cdk.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 or FailureTolerancePercentage (but not both).

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-operationpreferences.html#cfn-cloudformation-stackset-operationpreferences-failuretolerancecount

Return type

Union[int, float, None]

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 or FailureTolerancePercentage , but not both.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-operationpreferences.html#cfn-cloudformation-stackset-operationpreferences-failuretolerancepercentage

Return type

Union[int, float, None]

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 the FailureToleranceCount .

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 or MaxConcurrentPercentage , but not both.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-operationpreferences.html#cfn-cloudformation-stackset-operationpreferences-maxconcurrentcount

Return type

Union[int, float, None]

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 or MaxConcurrentPercentage , but not both.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-operationpreferences.html#cfn-cloudformation-stackset-operationpreferences-maxconcurrentpercentage

Return type

Union[int, float, None]

region_concurrency_type

The concurrency type of deploying StackSets operations in Regions, could be in parallel or one Region at a time.

Allowed values : SEQUENTIAL | PARALLEL

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-operationpreferences.html#cfn-cloudformation-stackset-operationpreferences-regionconcurrencytype

Return type

Optional[str]

region_order

The order of the Regions where you want to perform the stack operation.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-operationpreferences.html#cfn-cloudformation-stackset-operationpreferences-regionorder

Return type

Optional[List[str]]

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

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-parameter.html

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.core 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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-parameter.html#cfn-cloudformation-stackset-parameter-parameterkey

Return type

str

parameter_value

The input value associated with the parameter.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-parameter.html#cfn-cloudformation-stackset-parameter-parametervalue

Return type

str

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 AWS OrganizationalUnitIds or Accounts 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

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-stackinstances.html

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.core as cdk

stack_instances_property = cdk.CfnStackSet.StackInstancesProperty(
    deployment_targets=cdk.CfnStackSet.DeploymentTargetsProperty(
        account_filter_type="accountFilterType",
        accounts=["accounts"],
        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 or Accounts for which to create stack instances in the specified Regions.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-stackinstances.html#cfn-cloudformation-stackset-stackinstances-deploymenttargets

Return type

Union[IResolvable, DeploymentTargetsProperty]

parameter_overrides

A list of stack set parameters whose values you want to override in the selected stack instances.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-stackinstances.html#cfn-cloudformation-stackset-stackinstances-parameteroverrides

Return type

Union[IResolvable, List[Union[IResolvable, ParameterProperty]], None]

regions

The names of one or more Regions where you want to create stack instances using the specified AWS accounts .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-stackinstances.html#cfn-cloudformation-stackset-stackinstances-regions

Return type

List[str]