class StackDeployment
Language | Type name |
---|---|
![]() | Amazon.CDK.Pipelines.StackDeployment |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/pipelines#StackDeployment |
![]() | software.amazon.awscdk.pipelines.StackDeployment |
![]() | aws_cdk.pipelines.StackDeployment |
![]() | aws-cdk-lib » pipelines » StackDeployment |
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
// 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
Name | Type | Description |
---|---|---|
absolute | string | Template path on disk to CloudAssembly. |
assets | Stack [] | Assets referenced by this stack. |
change | Step [] | Steps that take place after stack is prepared but before stack deploys. |
construct | string | Construct path for this stack. |
post | Step [] | Steps to execute after stack deploys. |
pre | Step [] | Steps that take place before stack is prepared. |
stack | string | Artifact ID for this stack. |
stack | Stack [] | Other stacks this stack depends on. |
stack | string | Name for this stack. |
tags | { [string]: string } | Tags to apply to the stack. |
account? | string | Account where the stack should be deployed. |
assume | string | Role to assume before deploying this stack. |
execution | string | Execution role to pass to CloudFormation. |
region? | string | Region where the stack should be deployed. |
template | Stack | The asset that represents the CloudFormation template for this stack. |
template | string | The S3 URL which points to the template asset location in the publishing bucket. |
absoluteTemplatePath
Type:
string
Template path on disk to CloudAssembly.
assets
Type:
Stack
[]
Assets referenced by this stack.
changeSet
Type:
Step
[]
Steps that take place after stack is prepared but before stack deploys.
Your pipeline engine may not disable prepareStep
.
constructPath
Type:
string
Construct path for this stack.
post
Type:
Step
[]
Steps to execute after stack deploys.
pre
Type:
Step
[]
Steps that take place before stack is prepared.
If your pipeline engine disables 'prepareStep', then this will happen before stack deploys
stackArtifactId
Type:
string
Artifact ID for this stack.
stackDependencies
Type:
Stack
[]
Other stacks this stack depends on.
stackName
Type:
string
Name for this stack.
tags
Type:
{ [string]: string }
Tags to apply to the stack.
account?
Type:
string
(optional, default: Pipeline account)
Account where the stack should be deployed.
assumeRoleArn?
Type:
string
(optional, default: Don't assume any role)
Role to assume before deploying this stack.
executionRoleArn?
Type:
string
(optional, default: No execution role)
Execution role to pass to CloudFormation.
region?
Type:
string
(optional, default: Pipeline region)
Region where the stack should be deployed.
templateAsset?
Type:
Stack
(optional)
The asset that represents the CloudFormation template for this stack.
templateUrl?
Type:
string
(optional)
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
Name | Description |
---|---|
add | Add a dependency on another stack. |
add | Adds steps to each phase of the stack. |
static from | Build a StackDeployment from a Stack Artifact in a Cloud Assembly. |
addStackDependency(stackDeployment)
public addStackDependency(stackDeployment: StackDeployment): void
Parameters
- stackDeployment
Stack
Deployment
Add a dependency on another stack.
addStackSteps(pre, changeSet, post)
public addStackSteps(pre: Step[], changeSet: Step[], post: Step[]): void
Parameters
- pre
Step
[]
— steps executed before stack.prepare. - changeSet
Step
[]
— steps executed after stack.prepare and before stack.deploy. - post
Step
[]
— steps executed after stack.deploy.
Adds steps to each phase of the stack.
static fromArtifact(stackArtifact)
public static fromArtifact(stackArtifact: CloudFormationStackArtifact): StackDeployment
Parameters
- stackArtifact
Cloud
Formation Stack Artifact
Returns
Build a StackDeployment
from a Stack Artifact in a Cloud Assembly.