DeployCdkStackAction

class aws_cdk.pipelines.DeployCdkStackAction(*, action_role, stack_name, template_path, cloud_formation_execution_role=None, dependency_stack_artifact_ids=None, region=None, stack_artifact_id=None, template_configuration_path=None, cloud_assembly_input, base_action_name=None, change_set_name=None, execute_run_order=None, output=None, output_file_name=None, prepare_run_order=None)

Bases: object

(deprecated) Action to deploy a CDK Stack.

Adds two CodePipeline Actions to the pipeline: one to create a ChangeSet and one to execute it.

You do not need to instantiate this action yourself – it will automatically be added by the pipeline when you add stack artifacts or entire stages.

Deprecated:

This class is part of the old API. Use the API based on the CodePipeline class instead

Stability:

deprecated

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_codepipeline as codepipeline
import aws_cdk.aws_iam as iam
import aws_cdk.pipelines as pipelines

# artifact: codepipeline.Artifact
# role: iam.Role

deploy_cdk_stack_action = pipelines.DeployCdkStackAction(
    action_role=role,
    cloud_assembly_input=artifact,
    stack_name="stackName",
    template_path="templatePath",

    # the properties below are optional
    base_action_name="baseActionName",
    change_set_name="changeSetName",
    cloud_formation_execution_role=role,
    dependency_stack_artifact_ids=["dependencyStackArtifactIds"],
    execute_run_order=123,
    output=artifact,
    output_file_name="outputFileName",
    prepare_run_order=123,
    region="region",
    stack_artifact_id="stackArtifactId",
    template_configuration_path="templateConfigurationPath"
)
Parameters:
  • action_role (IRole) – (deprecated) Role for the action to assume. This controls the account to deploy into

  • stack_name (str) – (deprecated) The name of the stack that should be created/updated.

  • template_path (str) – (deprecated) Relative path of template in the input artifact.

  • cloud_formation_execution_role (Optional[IRole]) – (deprecated) Role to execute CloudFormation under. Default: - Execute CloudFormation using the action role

  • dependency_stack_artifact_ids (Optional[Sequence[str]]) – (deprecated) Artifact ID for the stacks this stack depends on. Used for pipeline order checking. Default: - No dependencies

  • region (Optional[str]) – (deprecated) Region to deploy into. Default: - Same region as pipeline

  • stack_artifact_id (Optional[str]) – (deprecated) Artifact ID for the stack deployed here. Used for pipeline order checking. Default: - Order will not be checked

  • template_configuration_path (Optional[str]) – (deprecated) Template configuration path relative to the input artifact. Default: - No template configuration

  • cloud_assembly_input (Artifact) – (deprecated) The CodePipeline artifact that holds the Cloud Assembly.

  • base_action_name (Optional[str]) – (deprecated) Base name of the action. Default: stackName

  • change_set_name (Optional[str]) – (deprecated) Name of the change set to create and deploy. Default: ‘PipelineChange’

  • execute_run_order (Union[int, float, None]) – (deprecated) Run order for the Execute action. Default: - prepareRunOrder + 1

  • output (Optional[Artifact]) – (deprecated) Artifact to write Stack Outputs to. Default: - No outputs

  • output_file_name (Optional[str]) – (deprecated) Filename in output to write Stack outputs to. Default: - Required when ‘output’ is set

  • prepare_run_order (Union[int, float, None]) – (deprecated) Run order for the Prepare action. Default: 1

Stability:

deprecated

Methods

bind(scope, stage, *, bucket, role)

(deprecated) Exists to implement IAction.

Parameters:
Stability:

deprecated

Return type:

ActionConfig

on_state_change(name, target=None, *, description=None, enabled=None, event_bus=None, event_pattern=None, rule_name=None, schedule=None, targets=None)

(deprecated) Exists to implement IAction.

Parameters:
  • name (str) –

  • target (Optional[IRuleTarget]) –

  • description (Optional[str]) – A description of the rule’s purpose. Default: - No description.

  • enabled (Optional[bool]) – Indicates whether the rule is enabled. Default: true

  • event_bus (Optional[IEventBus]) – The event bus to associate with this rule. Default: - The default event bus.

  • event_pattern (Union[EventPattern, Dict[str, Any], None]) – Describes which events EventBridge routes to the specified target. These routed events are matched events. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide. Default: - None.

  • rule_name (Optional[str]) – A name for the rule. Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the rule name. For more information, see Name Type.

  • schedule (Optional[Schedule]) – The schedule or rate (frequency) that determines when EventBridge runs the rule. For more information, see Schedule Expression Syntax for Rules in the Amazon EventBridge User Guide. Default: - None.

  • targets (Optional[Sequence[IRuleTarget]]) – Targets to invoke when this rule matches an event. Input will be the full matched event. If you wish to specify custom target input, use addTarget(target[, inputOptions]). Default: - No targets.

Stability:

deprecated

Return type:

Rule

Attributes

action_properties

(deprecated) Exists to implement IAction.

Stability:

deprecated

dependency_stack_artifact_ids

(deprecated) Artifact ids of the artifact this stack artifact depends on.

Stability:

deprecated

execute_run_order

(deprecated) The runorder for the execute action.

Stability:

deprecated

prepare_run_order

(deprecated) The runorder for the prepare action.

Stability:

deprecated

stack_artifact_id

(deprecated) Artifact id of the artifact this action was based on.

Stability:

deprecated

stack_name

(deprecated) Name of the deployed stack.

Stability:

deprecated

Static Methods

classmethod from_stack_artifact(scope, artifact, *, stack_name=None, cloud_assembly_input, base_action_name=None, change_set_name=None, execute_run_order=None, output=None, output_file_name=None, prepare_run_order=None)

(deprecated) Construct a DeployCdkStackAction from a Stack artifact.

Parameters:
  • scope (Construct) –

  • artifact (CloudFormationStackArtifact) –

  • stack_name (Optional[str]) – (deprecated) The name of the stack that should be created/updated. Default: - Same as stack artifact

  • cloud_assembly_input (Artifact) – (deprecated) The CodePipeline artifact that holds the Cloud Assembly.

  • base_action_name (Optional[str]) – (deprecated) Base name of the action. Default: stackName

  • change_set_name (Optional[str]) – (deprecated) Name of the change set to create and deploy. Default: ‘PipelineChange’

  • execute_run_order (Union[int, float, None]) – (deprecated) Run order for the Execute action. Default: - prepareRunOrder + 1

  • output (Optional[Artifact]) – (deprecated) Artifact to write Stack Outputs to. Default: - No outputs

  • output_file_name (Optional[str]) – (deprecated) Filename in output to write Stack outputs to. Default: - Required when ‘output’ is set

  • prepare_run_order (Union[int, float, None]) – (deprecated) Run order for the Prepare action. Default: 1

Stability:

deprecated

Return type:

DeployCdkStackAction