Skip to content
v2.275.0

StackDeployment Class ​

Deployment of a single Stack.

You don't need to instantiate this class -- it will be automatically instantiated as necessary when you add a Stage to a pipeline.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cx_api } from 'aws-cdk-lib';
import { pipelines } from 'aws-cdk-lib';

declare const cloudFormationStackArtifact: cx_api.CloudFormationStackArtifact;
const stackDeployment = pipelines.StackDeployment.fromArtifact(cloudFormationStackArtifact);

Properties ​

absoluteTemplatePathstringabsolute_template_pathstrabsoluteTemplatePathStringAbsoluteTemplatePathstringAbsoluteTemplatePath*string#
Template path on disk to CloudAssembly.
accountmay be undefinedstringaccountmay be undefinedstraccountmay be undefinedStringAccountmay be undefinedstringAccountmay be undefined*string#
Account where the stack should be deployed.

Default: Pipeline account

assetsStackAsset[]assetstyping.List[StackAsset]assetsList<StackAsset>AssetsStackAsset[]Assets*[]StackAsset#
Assets referenced by this stack.
assumeRoleArnmay be undefinedstringassume_role_arnmay be undefinedstrassumeRoleArnmay be undefinedStringAssumeRoleArnmay be undefinedstringAssumeRoleArnmay be undefined*string#
Role to assume before deploying this stack.

Default: Don't assume any role

changeSetStep[]change_settyping.List[Step]changeSetList<Step>ChangeSetStep[]ChangeSet*[]Step#
Steps that take place after stack is prepared but before stack deploys.

Your pipeline engine may not disable prepareStep.

constructPathstringconstruct_pathstrconstructPathStringConstructPathstringConstructPath*string#
Construct path for this stack.
executionRoleArnmay be undefinedstringexecution_role_arnmay be undefinedstrexecutionRoleArnmay be undefinedStringExecutionRoleArnmay be undefinedstringExecutionRoleArnmay be undefined*string#
Execution role to pass to CloudFormation.

Default: No execution role

postStep[]posttyping.List[Step]postList<Step>PostStep[]Post*[]Step#
Steps to execute after stack deploys.
preStep[]pretyping.List[Step]preList<Step>PreStep[]Pre*[]Step#
Steps that take place before stack is prepared.

If your pipeline engine disables 'prepareStep', then this will happen before stack deploys

regionmay be undefinedstringregionmay be undefinedstrregionmay be undefinedStringRegionmay be undefinedstringRegionmay be undefined*string#
Region where the stack should be deployed.

Default: Pipeline region

stackArtifactIdstringstack_artifact_idstrstackArtifactIdStringStackArtifactIdstringStackArtifactId*string#
Artifact ID for this stack.
stackDependenciesStackDeployment[]stack_dependenciestyping.List[StackDeployment]stackDependenciesList<StackDeployment>StackDependenciesStackDeployment[]StackDependencies*[]StackDeployment#
Other stacks this stack depends on.
stackNamestringstack_namestrstackNameStringStackNamestringStackName*string#
Name for this stack.
tags{ [key: string]: string }tagstyping.Mapping[str, str]tagsMap<String, String>TagsIDictionary<string, string>Tags*map[string]*string#
Tags to apply to the stack.
templateAssetmay be undefinedStackAssettemplate_assetmay be undefinedStackAssettemplateAssetmay be undefinedStackAssetTemplateAssetmay be undefinedStackAssetTemplateAssetmay be undefinedStackAsset#
The asset that represents the CloudFormation template for this stack.
templateUrlmay be undefinedstringtemplate_urlmay be undefinedstrtemplateUrlmay be undefinedStringTemplateUrlmay be undefinedstringTemplateUrlmay be undefined*string#
The S3 URL which points to the template asset location in the publishing bucket.

This is undefined if the stack template is not published. Use the DefaultStackSynthesizer to ensure it is.

Example value: https://bucket.s3.amazonaws.com/object/key

Methods ​

addStackDependency(stackDeployment: StackDeployment): voiddef add_stack_dependency(self, stack_deployment: StackDeployment) -> Nonepublic void addStackDependency(StackDeployment stackDeployment)public void AddStackDependency(StackDeployment stackDeployment)func AddStackDependency(StackDeployment StackDeployment)#
Add a dependency on another stack.
addStackSteps(pre: Step[], changeSet: Step[], post: Step[]): voiddef add_stack_steps(self, pre: typing.List[Step], change_set: typing.List[Step], post: typing.List[Step]) -> Nonepublic void addStackSteps(List<Step> pre, List<Step> changeSet, List<Step> post)public void AddStackSteps(Step[] pre, Step[] changeSet, Step[] post)func AddStackSteps(Pre *[]Step, ChangeSet *[]Step, Post *[]Step)#
Adds steps to each phase of the stack.
3 parameters

Parameters

  • preprepreprePre — steps executed before stack.prepare.
  • changeSetchange_setchangeSetchangeSetChangeSet — steps executed after stack.prepare and before stack.deploy.
  • postpostpostpostPost — steps executed after stack.deploy.
fromArtifact(stackArtifact: CloudFormationStackArtifact): StackDeployment // chainable@staticmethod def from_artifact(stack_artifact: CloudFormationStackArtifact) -> StackDeploymentpublic static StackDeployment fromArtifact(CloudFormationStackArtifact stackArtifact)public static StackDeployment FromArtifact(CloudFormationStackArtifact stackArtifact)func FromArtifact(StackArtifact CloudFormationStackArtifact) StackDeploymentstatic#
Build a `StackDeployment` from a Stack Artifact in a Cloud Assembly.