@cloudcomponents/cdk-blue-green-container-deployment
- DummyTaskDefinitionProps
- EcsDeploymentConfigurationProps
- EcsDeploymentGroupProps
- EcsServiceProps
- IDummyTaskDefinition
- IEcsDeploymentConfig
- IEcsDeploymentGroup
- IEcsService
- PushImageProjectProps
- TrafficListener
@cloudcomponents/cdk-blue-green-container-deployment / DummyTaskDefinition
-
Construct
↳
DummyTaskDefinition
IDummyTaskDefinition
ITaggable
- addToExecutionRolePolicy
- onPrepare
- onSynthesize
- onValidate
- prepare
- synthesize
- toString
- validate
- isConstruct
• new DummyTaskDefinition(scope
, id
, props
)
Name | Type |
---|---|
scope |
Construct |
id |
string |
props |
DummyTaskDefinitionProps |
Construct.constructor
• Readonly
containerName: string
IDummyTaskDefinition.containerName
• Readonly
containerPort: number
IDummyTaskDefinition.containerPort
• Readonly
executionRole: IRole
IDummyTaskDefinition.executionRole
• Readonly
family: string
• Readonly
node: ConstructNode
The construct tree node associated with this construct.
stability
stable
Construct.node
• Readonly
tags: TagManager
ITaggable.tags
• Readonly
taskDefinitionArn: string
IDummyTaskDefinition.taskDefinitionArn
▸ addToExecutionRolePolicy(statement
): void
Adds a policy statement to the task execution IAM role.
Name | Type |
---|---|
statement |
PolicyStatement |
void
▸ Protected
onPrepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
stability
stable
void
Construct.onPrepare
▸ Protected
onSynthesize(session
): void
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
stability
stable
Name | Type | Description |
---|---|---|
session |
ISynthesisSession |
The synthesis session. |
void
Construct.onSynthesize
▸ Protected
onValidate(): string
[]
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
stability
stable
string
[]
An array of validation error messages, or an empty array if the construct is valid.
Construct.onValidate
▸ Protected
prepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
stability
stable
void
Construct.prepare
▸ Protected
synthesize(session
): void
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
stability
stable
Name | Type | Description |
---|---|---|
session |
ISynthesisSession |
The synthesis session. |
void
Construct.synthesize
▸ toString(): string
Returns a string representation of this construct.
stability
stable
string
Construct.toString
▸ Protected
validate(): string
[]
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
stability
stable
string
[]
An array of validation error messages, or an empty array if the construct is valid.
Construct.validate
▸ Static
isConstruct(x
): x is Construct
Return whether the given object is a Construct.
stability
stable
Name | Type |
---|---|
x |
any |
x is Construct
Construct.isConstruct
@cloudcomponents/cdk-blue-green-container-deployment / EcsDeploymentConfig
-
Resource
↳
EcsDeploymentConfig
- deploymentConfigArn
- deploymentConfigName
- env
- node
- physicalName
- stack
- ALL_AT_ONCE
- CANARY_10PERCENT_15MINUTES
- CANARY_10PERCENT_5MINUTES
- LINEAR_10PERCENT_EVERY_1MINUTE
- LINEAR_10PERCENT_EVERY_3MINUTES
- _enableCrossEnvironment
- applyRemovalPolicy
- generatePhysicalName
- getResourceArnAttribute
- getResourceNameAttribute
- onPrepare
- onSynthesize
- onValidate
- prepare
- synthesize
- toString
- validate
- fromEcsDeploymentConfigName
- isConstruct
- isResource
• new EcsDeploymentConfig(scope
, id
, props
)
Name | Type |
---|---|
scope |
Construct |
id |
string |
props |
EcsDeploymentConfigurationProps |
Resource.constructor
• Readonly
deploymentConfigArn: string
IEcsDeploymentConfig.deploymentConfigArn
• Readonly
deploymentConfigName: string
IEcsDeploymentConfig.deploymentConfigName
• Readonly
env: ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
stability
stable
Resource.env
• Readonly
node: ConstructNode
The construct tree node associated with this construct.
stability
stable
Resource.node
• Protected
Readonly
physicalName: string
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
This value will resolve to one of the following:
- a concrete value (e.g.
"my-awesome-bucket"
) undefined
, when a name should be generated by CloudFormation- a concrete name generated automatically during synthesis, in cross-environment scenarios.
stability
stable
Resource.physicalName
• Readonly
stack: Stack
The stack in which this resource is defined.
stability
stable
Resource.stack
▪ Static
Readonly
ALL_AT_ONCE: IEcsDeploymentConfig
▪ Static
Readonly
CANARY_10PERCENT_15MINUTES: IEcsDeploymentConfig
▪ Static
Readonly
CANARY_10PERCENT_5MINUTES: IEcsDeploymentConfig
▪ Static
Readonly
LINEAR_10PERCENT_EVERY_1MINUTE: IEcsDeploymentConfig
▪ Static
Readonly
LINEAR_10PERCENT_EVERY_3MINUTES: IEcsDeploymentConfig
▸ _enableCrossEnvironment(): void
Called when this resource is referenced across environments (account/region) to order to request that a physical name will be generated for this resource during synthesis, so the resource can be referenced through it's absolute name/arn.
internal
void
Resource._enableCrossEnvironment
▸ applyRemovalPolicy(policy
): void
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
stability
stable
Name | Type |
---|---|
policy |
RemovalPolicy |
void
Resource.applyRemovalPolicy
▸ Protected
generatePhysicalName(): string
stability
stable
string
Resource.generatePhysicalName
▸ Protected
getResourceArnAttribute(arnAttr
, arnComponents
): string
Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. bucket.bucketArn
).
Normally, this token will resolve to arnAttr
, but if the resource is
referenced across environments, arnComponents
will be used to synthesize
a concrete ARN with the resource's physical name. Make sure to reference
this.physicalName
in arnComponents
.
stability
stable
Name | Type | Description |
---|---|---|
arnAttr |
string |
The CFN attribute which resolves to the ARN of the resource. |
arnComponents |
ArnComponents |
The format of the ARN of this resource. |
string
Resource.getResourceArnAttribute
▸ Protected
getResourceNameAttribute(nameAttr
): string
Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. bucket.bucketName
).
Normally, this token will resolve to nameAttr
, but if the resource is
referenced across environments, it will be resolved to this.physicalName
,
which will be a concrete name.
stability
stable
Name | Type | Description |
---|---|---|
nameAttr |
string |
The CFN attribute which resolves to the resource's name. |
string
Resource.getResourceNameAttribute
▸ Protected
onPrepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
stability
stable
void
Resource.onPrepare
▸ Protected
onSynthesize(session
): void
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
stability
stable
Name | Type | Description |
---|---|---|
session |
ISynthesisSession |
The synthesis session. |
void
Resource.onSynthesize
▸ Protected
onValidate(): string
[]
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
stability
stable
string
[]
An array of validation error messages, or an empty array if the construct is valid.
Resource.onValidate
▸ Protected
prepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
stability
stable
void
Resource.prepare
▸ Protected
synthesize(session
): void
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
stability
stable
Name | Type | Description |
---|---|---|
session |
ISynthesisSession |
The synthesis session. |
void
Resource.synthesize
▸ toString(): string
Returns a string representation of this construct.
stability
stable
string
Resource.toString
▸ Protected
validate(): string
[]
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
stability
stable
string
[]
An array of validation error messages, or an empty array if the construct is valid.
Resource.validate
▸ Static
fromEcsDeploymentConfigName(_scope
, _id
, ecsDeploymentConfigName
): IEcsDeploymentConfig
Import a custom Deployment Configuration for an ECS Deployment Group defined outside the CDK.
Name | Type | Description |
---|---|---|
_scope |
Construct |
the parent Construct for this new Construct |
_id |
string |
the logical ID of this new Construct |
ecsDeploymentConfigName |
string |
the name of the referenced custom Deployment Configuration |
a Construct representing a reference to an existing custom Deployment Configuration
▸ Static
isConstruct(x
): x is Construct
Return whether the given object is a Construct.
stability
stable
Name | Type |
---|---|
x |
any |
x is Construct
Resource.isConstruct
▸ Static
isResource(construct
): construct is CfnResource
Check whether the given construct is a Resource.
stability
stable
Name | Type |
---|---|
construct |
IConstruct |
construct is CfnResource
Resource.isResource
@cloudcomponents/cdk-blue-green-container-deployment / EcsDeploymentGroup
-
Resource
↳
EcsDeploymentGroup
IEcsDeploymentGroup
ITaggable
- application
- deploymentConfig
- deploymentGroupArn
- deploymentGroupName
- env
- node
- physicalName
- stack
- tags
- _enableCrossEnvironment
- applyRemovalPolicy
- generatePhysicalName
- getResourceArnAttribute
- getResourceNameAttribute
- onPrepare
- onSynthesize
- onValidate
- prepare
- synthesize
- toString
- validate
- isConstruct
- isResource
• new EcsDeploymentGroup(scope
, id
, props
)
Name | Type |
---|---|
scope |
Construct |
id |
string |
props |
EcsDeploymentGroupProps |
Resource.constructor
• Readonly
application: IEcsApplication
The reference to the CodeDeploy ECS Application that this Deployment Group belongs to.
IEcsDeploymentGroup.application
• Readonly
deploymentConfig: IEcsDeploymentConfig
The Deployment Configuration this Group uses.
IEcsDeploymentGroup.deploymentConfig
• Readonly
deploymentGroupArn: string
The ARN of this Deployment Group.
IEcsDeploymentGroup.deploymentGroupArn
• Readonly
deploymentGroupName: string
The physical name of the CodeDeploy Deployment Group.
IEcsDeploymentGroup.deploymentGroupName
• Readonly
env: ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
stability
stable
Resource.env
• Readonly
node: ConstructNode
The construct tree node associated with this construct.
stability
stable
Resource.node
• Protected
Readonly
physicalName: string
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
This value will resolve to one of the following:
- a concrete value (e.g.
"my-awesome-bucket"
) undefined
, when a name should be generated by CloudFormation- a concrete name generated automatically during synthesis, in cross-environment scenarios.
stability
stable
Resource.physicalName
• Readonly
stack: Stack
The stack in which this resource is defined.
stability
stable
Resource.stack
• Readonly
tags: TagManager
ITaggable.tags
▸ _enableCrossEnvironment(): void
Called when this resource is referenced across environments (account/region) to order to request that a physical name will be generated for this resource during synthesis, so the resource can be referenced through it's absolute name/arn.
internal
void
Resource._enableCrossEnvironment
▸ applyRemovalPolicy(policy
): void
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
stability
stable
Name | Type |
---|---|
policy |
RemovalPolicy |
void
IEcsDeploymentGroup.applyRemovalPolicy
Resource.applyRemovalPolicy
▸ Protected
generatePhysicalName(): string
stability
stable
string
Resource.generatePhysicalName
▸ Protected
getResourceArnAttribute(arnAttr
, arnComponents
): string
Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. bucket.bucketArn
).
Normally, this token will resolve to arnAttr
, but if the resource is
referenced across environments, arnComponents
will be used to synthesize
a concrete ARN with the resource's physical name. Make sure to reference
this.physicalName
in arnComponents
.
stability
stable
Name | Type | Description |
---|---|---|
arnAttr |
string |
The CFN attribute which resolves to the ARN of the resource. |
arnComponents |
ArnComponents |
The format of the ARN of this resource. |
string
Resource.getResourceArnAttribute
▸ Protected
getResourceNameAttribute(nameAttr
): string
Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. bucket.bucketName
).
Normally, this token will resolve to nameAttr
, but if the resource is
referenced across environments, it will be resolved to this.physicalName
,
which will be a concrete name.
stability
stable
Name | Type | Description |
---|---|---|
nameAttr |
string |
The CFN attribute which resolves to the resource's name. |
string
Resource.getResourceNameAttribute
▸ Protected
onPrepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
stability
stable
void
Resource.onPrepare
▸ Protected
onSynthesize(session
): void
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
stability
stable
Name | Type | Description |
---|---|---|
session |
ISynthesisSession |
The synthesis session. |
void
Resource.onSynthesize
▸ Protected
onValidate(): string
[]
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
stability
stable
string
[]
An array of validation error messages, or an empty array if the construct is valid.
Resource.onValidate
▸ Protected
prepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
stability
stable
void
Resource.prepare
▸ Protected
synthesize(session
): void
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
stability
stable
Name | Type | Description |
---|---|---|
session |
ISynthesisSession |
The synthesis session. |
void
Resource.synthesize
▸ toString(): string
Returns a string representation of this construct.
stability
stable
string
Resource.toString
▸ Protected
validate(): string
[]
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
stability
stable
string
[]
An array of validation error messages, or an empty array if the construct is valid.
Resource.validate
▸ Static
isConstruct(x
): x is Construct
Return whether the given object is a Construct.
stability
stable
Name | Type |
---|---|
x |
any |
x is Construct
Resource.isConstruct
▸ Static
isResource(construct
): construct is CfnResource
Check whether the given construct is a Resource.
stability
stable
Name | Type |
---|---|
construct |
IConstruct |
construct is CfnResource
Resource.isResource
@cloudcomponents/cdk-blue-green-container-deployment / EcsService
-
Construct
↳
EcsService
IConnectable
IEcsService
ITaggable
• new EcsService(scope
, id
, props
)
Name | Type |
---|---|
scope |
Construct |
id |
string |
props |
EcsServiceProps |
Construct.constructor
• Readonly
clusterName: string
• Readonly
connections: Connections
IConnectable.connections
• Readonly
node: ConstructNode
The construct tree node associated with this construct.
stability
stable
Construct.node
• Readonly
serviceName: string
• Readonly
tags: TagManager
ITaggable.tags
▸ Protected
onPrepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
stability
stable
void
Construct.onPrepare
▸ Protected
onSynthesize(session
): void
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
stability
stable
Name | Type | Description |
---|---|---|
session |
ISynthesisSession |
The synthesis session. |
void
Construct.onSynthesize
▸ Protected
onValidate(): string
[]
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
stability
stable
string
[]
An array of validation error messages, or an empty array if the construct is valid.
Construct.onValidate
▸ Protected
prepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
stability
stable
void
Construct.prepare
▸ Protected
synthesize(session
): void
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
stability
stable
Name | Type | Description |
---|---|---|
session |
ISynthesisSession |
The synthesis session. |
void
Construct.synthesize
▸ toString(): string
Returns a string representation of this construct.
stability
stable
string
Construct.toString
▸ Protected
validate(): string
[]
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
stability
stable
string
[]
An array of validation error messages, or an empty array if the construct is valid.
Construct.validate
▸ Static
isConstruct(x
): x is Construct
Return whether the given object is a Construct.
stability
stable
Name | Type |
---|---|
x |
any |
x is Construct
Construct.isConstruct
@cloudcomponents/cdk-blue-green-container-deployment / PushImageProject
-
PipelineProject
↳
PushImageProject
- _enableCrossEnvironment
- addFileSystemLocation
- addSecondaryArtifact
- addSecondarySource
- addToRolePolicy
- applyRemovalPolicy
- bindAsNotificationRuleSource
- bindToCodePipeline
- enableBatchBuilds
- generatePhysicalName
- getResourceArnAttribute
- getResourceNameAttribute
- metric
- metricBuilds
- metricDuration
- metricFailedBuilds
- metricSucceededBuilds
- notifyOn
- notifyOnBuildFailed
- notifyOnBuildSucceeded
- onBuildFailed
- onBuildStarted
- onBuildSucceeded
- onEvent
- onPhaseChange
- onPrepare
- onStateChange
- onSynthesize
- onValidate
- prepare
- synthesize
- toString
- validate
- fromProjectArn
- fromProjectName
- isConstruct
- isResource
- serializeEnvVariables
• new PushImageProject(scope
, id
, props
)
Name | Type |
---|---|
scope |
Construct |
id |
string |
props |
PushImageProjectProps |
PipelineProject.constructor
• Protected
_connections: undefined
| Connections
Actual connections object for this Project. May be unset, in which case this Project is not configured to use a VPC.
internal
PipelineProject._connections
• Readonly
env: ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
stability
stable
PipelineProject.env
• Readonly
grantPrincipal: IPrincipal
The principal to grant permissions to.
stability
stable
PipelineProject.grantPrincipal
• Readonly
node: ConstructNode
The construct tree node associated with this construct.
stability
stable
PipelineProject.node
• Protected
Readonly
physicalName: string
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
This value will resolve to one of the following:
- a concrete value (e.g.
"my-awesome-bucket"
) undefined
, when a name should be generated by CloudFormation- a concrete name generated automatically during synthesis, in cross-environment scenarios.
stability
stable
PipelineProject.physicalName
• Readonly
projectArn: string
The ARN of the project.
stability
stable
PipelineProject.projectArn
• Readonly
projectName: string
The name of the project.
stability
stable
PipelineProject.projectName
• Optional
Readonly
role: IRole
The IAM role for this project.
stability
stable
PipelineProject.role
• Readonly
stack: Stack
The stack in which this resource is defined.
stability
stable
PipelineProject.stack
• get
connections(): Connections
Access the Connections object.
Will fail if this Project does not have a VPC set.
stability
stable
Connections
PipelineProject.connections
• Private
set
encryptionKey(value
): void
Name | Type |
---|---|
value |
any |
void
PipelineProject.encryptionKey
▸ _enableCrossEnvironment(): void
Called when this resource is referenced across environments (account/region) to order to request that a physical name will be generated for this resource during synthesis, so the resource can be referenced through it's absolute name/arn.
internal
void
PipelineProject._enableCrossEnvironment
▸ addFileSystemLocation(fileSystemLocation
): void
Adds a fileSystemLocation to the Project.
stability
stable
Name | Type | Description |
---|---|---|
fileSystemLocation |
IFileSystemLocation |
the fileSystemLocation to add. |
void
PipelineProject.addFileSystemLocation
▸ addSecondaryArtifact(secondaryArtifact
): void
Adds a secondary artifact to the Project.
see
https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html
stability
stable
Name | Type | Description |
---|---|---|
secondaryArtifact |
IArtifacts |
the artifact to add as a secondary artifact. |
void
PipelineProject.addSecondaryArtifact
▸ addSecondarySource(secondarySource
): void
Adds a secondary source to the Project.
see
https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html
stability
stable
Name | Type | Description |
---|---|---|
secondarySource |
ISource |
the source to add as a secondary source. |
void
PipelineProject.addSecondarySource
▸ addToRolePolicy(statement
): void
Add a permission only if there's a policy attached.
stability
stable
Name | Type | Description |
---|---|---|
statement |
PolicyStatement |
The permissions statement to add. |
void
PipelineProject.addToRolePolicy
▸ applyRemovalPolicy(policy
): void
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
stability
stable
Name | Type |
---|---|
policy |
RemovalPolicy |
void
PipelineProject.applyRemovalPolicy
▸ bindAsNotificationRuleSource(_scope
): NotificationRuleSourceConfig
Returns a source configuration for notification rule.
stability
stable
Name | Type |
---|---|
_scope |
Construct |
NotificationRuleSourceConfig
PipelineProject.bindAsNotificationRuleSource
▸ bindToCodePipeline(_scope
, options
): void
A callback invoked when the given project is added to a CodePipeline.
stability
stable
Name | Type | Description |
---|---|---|
_scope |
Construct |
the construct the binding is taking place in. |
options |
BindToCodePipelineOptions |
additional options for the binding. |
void
PipelineProject.bindToCodePipeline
▸ enableBatchBuilds(): undefined
| BatchBuildConfig
Enable batch builds.
Returns an object contining the batch service role if batch builds could be enabled.
stability
stable
undefined
| BatchBuildConfig
PipelineProject.enableBatchBuilds
▸ Protected
generatePhysicalName(): string
stability
stable
string
PipelineProject.generatePhysicalName
▸ Protected
getResourceArnAttribute(arnAttr
, arnComponents
): string
Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. bucket.bucketArn
).
Normally, this token will resolve to arnAttr
, but if the resource is
referenced across environments, arnComponents
will be used to synthesize
a concrete ARN with the resource's physical name. Make sure to reference
this.physicalName
in arnComponents
.
stability
stable
Name | Type | Description |
---|---|---|
arnAttr |
string |
The CFN attribute which resolves to the ARN of the resource. |
arnComponents |
ArnComponents |
The format of the ARN of this resource. |
string
PipelineProject.getResourceArnAttribute
▸ Protected
getResourceNameAttribute(nameAttr
): string
Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. bucket.bucketName
).
Normally, this token will resolve to nameAttr
, but if the resource is
referenced across environments, it will be resolved to this.physicalName
,
which will be a concrete name.
stability
stable
Name | Type | Description |
---|---|---|
nameAttr |
string |
The CFN attribute which resolves to the resource's name. |
string
PipelineProject.getResourceNameAttribute
▸ metric(metricName
, props?
): Metric
stability
stable
Name | Type | Description |
---|---|---|
metricName |
string |
The name of the metric. |
props? |
MetricOptions |
Customization properties. |
Metric
a CloudWatch metric associated with this build project.
PipelineProject.metric
▸ metricBuilds(props?
): Metric
Measures the number of builds triggered.
Units: Count
Valid CloudWatch statistics: Sum
default
sum over 5 minutes
stability
stable
Name | Type |
---|---|
props? |
MetricOptions |
Metric
PipelineProject.metricBuilds
▸ metricDuration(props?
): Metric
Measures the duration of all builds over time.
Units: Seconds
Valid CloudWatch statistics: Average (recommended), Maximum, Minimum
default
average over 5 minutes
stability
stable
Name | Type |
---|---|
props? |
MetricOptions |
Metric
PipelineProject.metricDuration
▸ metricFailedBuilds(props?
): Metric
Measures the number of builds that failed because of client error or because of a timeout.
Units: Count
Valid CloudWatch statistics: Sum
default
sum over 5 minutes
stability
stable
Name | Type |
---|---|
props? |
MetricOptions |
Metric
PipelineProject.metricFailedBuilds
▸ metricSucceededBuilds(props?
): Metric
Measures the number of successful builds.
Units: Count
Valid CloudWatch statistics: Sum
default
sum over 5 minutes
stability
stable
Name | Type |
---|---|
props? |
MetricOptions |
Metric
PipelineProject.metricSucceededBuilds
▸ notifyOn(id
, target
, options
): INotificationRule
Defines a CodeStar Notification rule triggered when the project events emitted by you specified, it very similar to onEvent
API.
You can also use the methods notifyOnBuildSucceeded
and
notifyOnBuildFailed
to define rules for these specific event emitted.
stability
stable
Name | Type |
---|---|
id |
string |
target |
INotificationRuleTarget |
options |
ProjectNotifyOnOptions |
INotificationRule
PipelineProject.notifyOn
▸ notifyOnBuildFailed(id
, target
, options?
): INotificationRule
Defines a CodeStar notification rule which triggers when a build fails.
stability
stable
Name | Type |
---|---|
id |
string |
target |
INotificationRuleTarget |
options? |
NotificationRuleOptions |
INotificationRule
PipelineProject.notifyOnBuildFailed
▸ notifyOnBuildSucceeded(id
, target
, options?
): INotificationRule
Defines a CodeStar notification rule which triggers when a build completes successfully.
stability
stable
Name | Type |
---|---|
id |
string |
target |
INotificationRuleTarget |
options? |
NotificationRuleOptions |
INotificationRule
PipelineProject.notifyOnBuildSucceeded
▸ onBuildFailed(id
, options?
): Rule
Defines an event rule which triggers when a build fails.
To access fields from the event in the event target input,
use the static fields on the StateChangeEvent
class.
stability
stable
Name | Type |
---|---|
id |
string |
options? |
OnEventOptions |
Rule
PipelineProject.onBuildFailed
▸ onBuildStarted(id
, options?
): Rule
Defines an event rule which triggers when a build starts.
To access fields from the event in the event target input,
use the static fields on the StateChangeEvent
class.
stability
stable
Name | Type |
---|---|
id |
string |
options? |
OnEventOptions |
Rule
PipelineProject.onBuildStarted
▸ onBuildSucceeded(id
, options?
): Rule
Defines an event rule which triggers when a build completes successfully.
To access fields from the event in the event target input,
use the static fields on the StateChangeEvent
class.
stability
stable
Name | Type |
---|---|
id |
string |
options? |
OnEventOptions |
Rule
PipelineProject.onBuildSucceeded
▸ onEvent(id
, options?
): Rule
Defines a CloudWatch event rule triggered when something happens with this project.
see
https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html
stability
stable
Name | Type |
---|---|
id |
string |
options? |
OnEventOptions |
Rule
PipelineProject.onEvent
▸ onPhaseChange(id
, options?
): Rule
Defines a CloudWatch event rule that triggers upon phase change of this build project.
see
https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html
stability
stable
Name | Type |
---|---|
id |
string |
options? |
OnEventOptions |
Rule
PipelineProject.onPhaseChange
▸ Protected
onPrepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
stability
stable
void
PipelineProject.onPrepare
▸ onStateChange(id
, options?
): Rule
Defines a CloudWatch event rule triggered when the build project state changes.
You can filter specific build status events using an event
pattern filter on the build-status
detail field:
const rule = project.onStateChange('OnBuildStarted', { target });
rule.addEventPattern({
detail: {
'build-status': [
"IN_PROGRESS",
"SUCCEEDED",
"FAILED",
"STOPPED"
]
}
});
You can also use the methods onBuildFailed
and onBuildSucceeded
to define rules for
these specific state changes.
To access fields from the event in the event target input,
use the static fields on the StateChangeEvent
class.
see
https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html
stability
stable
Name | Type |
---|---|
id |
string |
options? |
OnEventOptions |
Rule
PipelineProject.onStateChange
▸ Protected
onSynthesize(session
): void
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
stability
stable
Name | Type | Description |
---|---|---|
session |
ISynthesisSession |
The synthesis session. |
void
PipelineProject.onSynthesize
▸ Protected
onValidate(): string
[]
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
stability
stable
string
[]
An array of validation error messages, or an empty array if the construct is valid.
PipelineProject.onValidate
▸ Protected
prepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
stability
stable
void
PipelineProject.prepare
▸ Protected
synthesize(session
): void
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
stability
stable
Name | Type | Description |
---|---|---|
session |
ISynthesisSession |
The synthesis session. |
void
PipelineProject.synthesize
▸ toString(): string
Returns a string representation of this construct.
stability
stable
string
PipelineProject.toString
▸ Protected
validate(): string
[]
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
stability
stable
override
true
string
[]
PipelineProject.validate
▸ Static
fromProjectArn(scope
, id
, projectArn
): IProject
stability
stable
Name | Type |
---|---|
scope |
Construct |
id |
string |
projectArn |
string |
IProject
PipelineProject.fromProjectArn
▸ Static
fromProjectName(scope
, id
, projectName
): IProject
Import a Project defined either outside the CDK, or in a different CDK Stack (and exported using the {@link export} method).
stability
stable
note
if you're importing a CodeBuild Project for use
in a CodePipeline, make sure the existing Project
has permissions to access the S3 Bucket of that Pipeline -
otherwise, builds in that Pipeline will always fail.
Name | Type | Description |
---|---|---|
scope |
Construct |
the parent Construct for this Construct. |
id |
string |
the logical name of this Construct. |
projectName |
string |
the name of the project to import. |
IProject
a reference to the existing Project
PipelineProject.fromProjectName
▸ Static
isConstruct(x
): x is Construct
Return whether the given object is a Construct.
stability
stable
Name | Type |
---|---|
x |
any |
x is Construct
PipelineProject.isConstruct
▸ Static
isResource(construct
): construct is CfnResource
Check whether the given construct is a Resource.
stability
stable
Name | Type |
---|---|
construct |
IConstruct |
construct is CfnResource
PipelineProject.isResource
▸ Static
serializeEnvVariables(environmentVariables
, validateNoPlainTextSecrets?
, principal?
): EnvironmentVariableProperty
[]
Convert the environment variables map of string to {@link BuildEnvironmentVariable}, which is the customer-facing type, to a list of {@link CfnProject.EnvironmentVariableProperty}, which is the representation of environment variables in CloudFormation.
stability
stable
Name | Type | Description |
---|---|---|
environmentVariables |
Object |
the map of string to environment variables. |
validateNoPlainTextSecrets? |
boolean |
whether to throw an exception if any of the plain text environment variables contain secrets, defaults to 'false'. |
principal? |
IGrantable |
- |
EnvironmentVariableProperty
[]
an array of {@link CfnProject.EnvironmentVariableProperty} instances
PipelineProject.serializeEnvVariables
@cloudcomponents/cdk-blue-green-container-deployment / PropagateTags
• SERVICE = "SERVICE"
• TASK_DEFINITION = "TASK_DEFINITION"
@cloudcomponents/cdk-blue-green-container-deployment / RollbackEvent
• DEPLOYMENT_FAILURE = "DEPLOYMENT_FAILURE"
• DEPLOYMENT_STOP_ON_ALARM = "DEPLOYMENT_STOP_ON_ALARM"
• DEPLOYMENT_STOP_ON_REQUEST = "DEPLOYMENT_STOP_ON_REQUEST"
@cloudcomponents/cdk-blue-green-container-deployment / SchedulingStrategy
• DAEMON = "DAEMON"
• REPLICA = "REPLICA"
@cloudcomponents/cdk-blue-green-container-deployment / DummyTaskDefinitionProps
• Optional
Readonly
containerName: string
The name of the container.
default
sample-website
• Optional
Readonly
containerPort: number
default
80
• Optional
Readonly
family: string
The name of a family that this task definition is registered to. A family groups multiple versions of a task definition.
default
- Automatically generated name.
• Readonly
image: string
The image used to start a container.
@cloudcomponents/cdk-blue-green-container-deployment / EcsDeploymentConfigurationProps
• Optional
Readonly
deploymentConfigName: string
AWS::CodeDeploy::DeploymentConfig.DeploymentConfigName
.
external
• Optional
Readonly
minimumHealthyHosts: MinimumHealthyHostsProperty
| IResolvable
AWS::CodeDeploy::DeploymentConfig.MinimumHealthyHosts
.
external
• Optional
Readonly
trafficRoutingConfig: IResolvable
| TrafficRoutingConfigProperty
AWS::CodeDeploy::DeploymentConfig.TrafficRoutingConfig
.
external
@cloudcomponents/cdk-blue-green-container-deployment / EcsDeploymentGroupProps
- applicationName
- autoRollbackOnEvents
- deploymentConfig
- deploymentGroupName
- ecsServices
- prodTrafficListener
- targetGroups
- terminationWaitTime
- testTrafficListener
• Optional
Readonly
applicationName: string
• Optional
Readonly
autoRollbackOnEvents: RollbackEvent
[]
The event type or types that trigger a rollback.
• Optional
Readonly
deploymentConfig: IEcsDeploymentConfig
• Readonly
deploymentGroupName: string
• Readonly
ecsServices: IEcsService
[]
• Readonly
prodTrafficListener: TrafficListener
• Readonly
targetGroups: ApplicationTargetGroup
[]
• Optional
Readonly
terminationWaitTime: Duration
the number of minutes before deleting the original (blue) task set. During an Amazon ECS deployment, CodeDeploy shifts traffic from the original (blue) task set to a replacement (green) task set.
The maximum setting is 2880 minutes (2 days).
default
60 minutes
• Readonly
testTrafficListener: TrafficListener
@cloudcomponents/cdk-blue-green-container-deployment / EcsServiceProps
- circuitBreaker
- cluster
- containerPort
- desiredCount
- healthCheckGracePeriod
- launchType
- maxHealthyPercent
- minHealthyPercent
- platformVersion
- prodTargetGroup
- propagateTags
- securityGroups
- serviceName
- taskDefinition
- testTargetGroup
• Optional
Readonly
circuitBreaker: DeploymentCircuitBreaker
Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled.
default
- disabled
• Readonly
cluster: ICluster
• Optional
Readonly
containerPort: number
• Optional
Readonly
desiredCount: number
• Optional
Readonly
healthCheckGracePeriod: Duration
The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
default
- defaults to 60 seconds if at least one load balancer is in-use and it is not already set
• Optional
Readonly
launchType: LaunchType
• Optional
Readonly
maxHealthyPercent: number
The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
default
- 100 if daemon, otherwise 200
• Optional
Readonly
minHealthyPercent: number
The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
default
- 0 if daemon, otherwise 50
• Optional
Readonly
platformVersion: string
• Readonly
prodTargetGroup: ITargetGroup
• Optional
Readonly
propagateTags: PropagateTags
Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. If no value is specified, the tags aren't propagated.
default
- no propagate
• Optional
Readonly
securityGroups: SecurityGroup
[]
• Readonly
serviceName: string
• Readonly
taskDefinition: DummyTaskDefinition
• Readonly
testTargetGroup: ITargetGroup
@cloudcomponents/cdk-blue-green-container-deployment / IDummyTaskDefinition
• Readonly
containerName: string
• Readonly
containerPort: number
• Readonly
executionRole: IRole
• Readonly
family: string
• Readonly
taskDefinitionArn: string
@cloudcomponents/cdk-blue-green-container-deployment / IEcsDeploymentConfig
• Readonly
deploymentConfigArn: string
• Readonly
deploymentConfigName: string
@cloudcomponents/cdk-blue-green-container-deployment / IEcsDeploymentGroup
Interface for an ECS deployment group.
-
IResource
↳
IEcsDeploymentGroup
• Readonly
application: IEcsApplication
The reference to the CodeDeploy ECS Application that this Deployment Group belongs to.
• Readonly
deploymentConfig: IEcsDeploymentConfig
The Deployment Configuration this Group uses.
• Readonly
deploymentGroupArn: string
The ARN of this Deployment Group.
• Readonly
deploymentGroupName: string
The physical name of the CodeDeploy Deployment Group.
• Readonly
env: ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
stability
stable
IResource.env
• Readonly
node: ConstructNode
The construct tree node for this construct.
stability
stable
IResource.node
• Readonly
stack: Stack
The stack in which this resource is defined.
stability
stable
IResource.stack
▸ applyRemovalPolicy(policy
): void
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
stability
stable
Name | Type |
---|---|
policy |
RemovalPolicy |
void
IResource.applyRemovalPolicy
@cloudcomponents/cdk-blue-green-container-deployment / IEcsService
• Readonly
clusterName: string
• Readonly
serviceName: string
@cloudcomponents/cdk-blue-green-container-deployment / PushImageProjectProps
• Optional
Readonly
buildSpec: BuildSpec
• Optional
Readonly
cache: Cache
• Optional
Readonly
computeType: ComputeType
• Optional
Readonly
environmentVariables: Record
<string
, BuildEnvironmentVariable
>
• Readonly
imageRepository: IRepository
• Optional
Readonly
projectName: string
• Readonly
taskDefinition: IDummyTaskDefinition
@cloudcomponents/cdk-blue-green-container-deployment / TrafficListener
• Readonly
listenerArn: string
ARN of the listener
attribute