CloudFormationDeployStackInstancesActionProps

class aws_cdk.aws_codepipeline_actions.CloudFormationDeployStackInstancesActionProps(*, action_name, run_order=None, variables_namespace=None, role=None, failure_tolerance_percentage=None, max_account_concurrency_percentage=None, stack_set_region=None, stack_instances, stack_set_name, parameter_overrides=None)

Bases: CommonAwsActionProps, CommonCloudFormationStackSetOptions

Properties for the CloudFormationDeployStackInstancesAction.

Parameters:
  • action_name (str) – The physical, human-readable name of the Action. Note that Action names must be unique within a single Stage.

  • run_order (Union[int, float, None]) – The runOrder property for this Action. RunOrder determines the relative order in which multiple Actions in the same Stage execute. Default: 1

  • variables_namespace (Optional[str]) – The name of the namespace to use for variables emitted by this action. Default: - a name will be generated, based on the stage and action names, if any of the action’s variables were referenced - otherwise, no namespace will be set

  • role (Optional[IRole]) – The Role in which context’s this Action will be executing in. The Pipeline’s Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your {@link IAction.bind} method in the {@link ActionBindOptions.role} property. Default: a new Role will be generated

  • 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 subsequent Regions. When calculating the number of accounts based on the specified percentage, AWS CloudFormation rounds down to the next whole number. Default: 0%

  • max_account_concurrency_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. If rounding down would result in zero, AWS CloudFormation sets the number as one instead. Although you use this setting to specify the maximum, for large deployments the actual number of accounts acted upon concurrently may be lower due to service throttling. Default: 1%

  • stack_set_region (Optional[str]) – The AWS Region the StackSet is in. Note that a cross-region Pipeline requires replication buckets to function correctly. You can provide their names with the PipelineProps.crossRegionReplicationBuckets property. If you don’t, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets, that you will need to cdk deploy before deploying the main, Pipeline-containing Stack. Default: - same region as the Pipeline

  • stack_instances (StackInstances) – Specify where to create or update Stack Instances. You can specify either AWS Accounts Ids or AWS Organizations Organizational Units.

  • stack_set_name (str) – The name of the StackSet we are adding instances to.

  • parameter_overrides (Optional[StackSetParameters]) – Parameter values that only apply to the current Stack Instances. These parameters are shared between all instances added by this action. Default: - no parameters will be overridden

ExampleMetadata:

infused

Example:

# pipeline: codepipeline.Pipeline
# source_output: codepipeline.Artifact


pipeline.add_stage(
    stage_name="DeployStackSets",
    actions=[
        # First, update the StackSet itself with the newest template
        codepipeline_actions.CloudFormationDeployStackSetAction(
            action_name="UpdateStackSet",
            run_order=1,
            stack_set_name="MyStackSet",
            template=codepipeline_actions.StackSetTemplate.from_artifact_path(source_output.at_path("template.yaml")),

            # Change this to 'StackSetDeploymentModel.organizations()' if you want to deploy to OUs
            deployment_model=codepipeline_actions.StackSetDeploymentModel.self_managed(),
            # This deploys to a set of accounts
            stack_instances=codepipeline_actions.StackInstances.in_accounts(["111111111111"], ["us-east-1", "eu-west-1"])
        ),

        # Afterwards, update/create additional instances in other accounts
        codepipeline_actions.CloudFormationDeployStackInstancesAction(
            action_name="AddMoreInstances",
            run_order=2,
            stack_set_name="MyStackSet",
            stack_instances=codepipeline_actions.StackInstances.in_accounts(["222222222222", "333333333333"], ["us-east-1", "eu-west-1"])
        )
    ]
)

Attributes

action_name

The physical, human-readable name of the Action.

Note that Action names must be unique within a single Stage.

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 subsequent Regions. When calculating the number of accounts based on the specified percentage, AWS CloudFormation rounds down to the next whole number.

Default:

0%

max_account_concurrency_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. If rounding down would result in zero, AWS CloudFormation sets the number as one instead. Although you use this setting to specify the maximum, for large deployments the actual number of accounts acted upon concurrently may be lower due to service throttling.

Default:

1%

parameter_overrides

Parameter values that only apply to the current Stack Instances.

These parameters are shared between all instances added by this action.

Default:
  • no parameters will be overridden

role

The Role in which context’s this Action will be executing in.

The Pipeline’s Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your {@link IAction.bind} method in the {@link ActionBindOptions.role} property.

Default:

a new Role will be generated

run_order

The runOrder property for this Action.

RunOrder determines the relative order in which multiple Actions in the same Stage execute.

Default:

1

See:

https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html

stack_instances

Specify where to create or update Stack Instances.

You can specify either AWS Accounts Ids or AWS Organizations Organizational Units.

stack_set_name

The name of the StackSet we are adding instances to.

stack_set_region

The AWS Region the StackSet is in.

Note that a cross-region Pipeline requires replication buckets to function correctly. You can provide their names with the PipelineProps.crossRegionReplicationBuckets property. If you don’t, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets, that you will need to cdk deploy before deploying the main, Pipeline-containing Stack.

Default:
  • same region as the Pipeline

variables_namespace

The name of the namespace to use for variables emitted by this action.

Default:

  • a name will be generated, based on the stage and action names,

if any of the action’s variables were referenced - otherwise, no namespace will be set