class CdkStage (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.Pipelines.CdkStage |
![]() | software.amazon.awscdk.pipelines.CdkStage |
![]() | aws_cdk.pipelines.CdkStage |
![]() | @aws-cdk/pipelines » CdkStage |
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Implements
IConstruct
, IConstruct
, IDependable
Stage in a CdkPipeline.
You don't need to instantiate this class directly. Use
cdkPipeline.addStage()
instead.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as codepipeline from '@aws-cdk/aws-codepipeline';
import * as sns from '@aws-cdk/aws-sns';
import * as pipelines from '@aws-cdk/pipelines';
declare const artifact: codepipeline.Artifact;
declare const stage: codepipeline.IStage;
declare const stageHost: pipelines.IStageHost;
declare const topic: sns.Topic;
const cdkStage = new pipelines.CdkStage(this, 'MyCdkStage', {
cloudAssemblyArtifact: artifact,
host: stageHost,
pipelineStage: stage,
stageName: 'stageName',
// the properties below are optional
confirmBroadeningPermissions: false,
securityNotificationTopic: topic,
});
Initializer
new CdkStage(scope: Construct, id: string, props: CdkStageProps)
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Parameters
- scope
Construct
- id
string
- props
Cdk
Stage Props
Construct Props
Name | Type | Description |
---|---|---|
cloud | Artifact | The CodePipeline Artifact with the Cloud Assembly. |
host | IStage | Features the Stage needs from its environment. |
pipeline | IStage | The underlying Pipeline Stage associated with thisCdkStage. |
stage | string | Name of the stage that should be created. |
confirm | boolean | Run a security check before every application prepare/deploy actions. |
security | ITopic | Optional SNS topic to send notifications to when any security check registers changes within a application. |
cloudAssemblyArtifact
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Type:
Artifact
The CodePipeline Artifact with the Cloud Assembly.
host
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Type:
IStage
Features the Stage needs from its environment.
pipelineStage
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Type:
IStage
The underlying Pipeline Stage associated with thisCdkStage.
stageName
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Type:
string
Name of the stage that should be created.
confirmBroadeningPermissions?
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Type:
boolean
(optional, default: false)
Run a security check before every application prepare/deploy actions.
Note: Stage level security check can be overriden per application as follows:
stage.addApplication(app, { confirmBroadeningPermissions: false })
securityNotificationTopic?
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Type:
ITopic
(optional, default: undefined no stage level notification topic)
Optional SNS topic to send notifications to when any security check registers changes within a application.
Note: The Stage Notification Topic can be overriden per application as follows:
stage.addApplication(app, { securityNotificationTopic: newTopic })
Properties
Name | Type | Description |
---|---|---|
node | Construct | The construct tree node associated with this construct. |
node
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Type:
Construct
The construct tree node associated with this construct.
Methods
Name | Description |
---|---|
add | Add one or more CodePipeline Actions. |
add | Add all stacks in the application Stage to this stage. |
add | Add a manual approval action. |
add | Add a deployment action based on a stack artifact. |
deploys | Whether this Stage contains an action to deploy the given stack, identified by its artifact ID. |
next | Return the runOrder number necessary to run the next Action in sequence with the rest. |
to | Returns a string representation of this construct. |
addActions(...actions)
public addActions(...actions: IAction[]): void
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Parameters
- actions
IAction
Add one or more CodePipeline Actions.
You need to make sure it is created with the right runOrder. Call nextSequentialRunOrder()
for every action to get actions to execute in sequence.
addApplication(appStage, options?)
public addApplication(appStage: Stage, options?: AddStageOptions): void
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Parameters
- appStage
Stage
- options
Add
Stage Options
Add all stacks in the application Stage to this stage.
The application construct should subclass Stage
and can contain any
number of Stacks
inside it that may have dependency relationships
on one another.
All stacks in the application will be deployed in the appropriate order, and all assets found in the application will be added to the asset publishing stage.
addManualApprovalAction(options?)
public addManualApprovalAction(options?: AddManualApprovalOptions): void
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Parameters
- options
Add
Manual Approval Options
Add a manual approval action.
If you need more flexibility than what this method offers,
use addAction
with a ManualApprovalAction
.
addStackArtifactDeployment(stackArtifact, options?)
public addStackArtifactDeployment(stackArtifact: CloudFormationStackArtifact, options?: AddStackOptions): void
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Parameters
- stackArtifact
Cloud
Formation Stack Artifact - options
Add
Stack Options
Add a deployment action based on a stack artifact.
deploysStack(artifactId)
public deploysStack(artifactId: string): boolean
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Parameters
- artifactId
string
Returns
boolean
Whether this Stage contains an action to deploy the given stack, identified by its artifact ID.
nextSequentialRunOrder(count?)
public nextSequentialRunOrder(count?: number): number
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Parameters
- count
number
Returns
number
Return the runOrder number necessary to run the next Action in sequence with the rest.
FIXME: This is here because Actions are immutable and can't be reordered after creation, nor is there a way to specify relative priorities, which is a limitation that we should take away in the base library.
toString()
public toString(): string
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Returns
string
Returns a string representation of this construct.