class CfnCodeDeployBlueGreenHook (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.CfnCodeDeployBlueGreenHook |
Java | software.amazon.awscdk.core.CfnCodeDeployBlueGreenHook |
Python | aws_cdk.core.CfnCodeDeployBlueGreenHook |
TypeScript (source) | @aws-cdk/core » CfnCodeDeployBlueGreenHook |
Implements
IConstruct
, IConstruct
, IDependable
A CloudFormation Hook for CodeDeploy blue-green ECS deployments.
Example
declare const cfnTemplate: cfn_inc.CfnInclude;
const hook: core.CfnHook = cfnTemplate.getHook('MyOutput');
// mutating the hook
declare const myRole: iam.Role;
const codeDeployHook = hook as core.CfnCodeDeployBlueGreenHook;
codeDeployHook.serviceRole = myRole.roleArn;
Initializer
new CfnCodeDeployBlueGreenHook(scope: Construct, id: string, props: CfnCodeDeployBlueGreenHookProps)
Parameters
- scope
Construct
— the scope to create the hook in (usually the containing Stack object). - id
string
— the identifier of the construct - will be used to generate the logical ID of the Hook. - props
Cfn
— the properties of the Hook.Code Deploy Blue Green Hook Props
Creates a new CodeDeploy blue-green ECS Hook.
Construct Props
Name | Type | Description |
---|---|---|
applications | Cfn [] | Properties of the Amazon ECS applications being deployed. |
service | string | The IAM Role for CloudFormation to use to perform blue-green deployments. |
additional | Cfn | Additional options for the blue/green deployment. |
lifecycle | Cfn | Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment. |
traffic | Cfn | Traffic routing configuration settings. |
applications
Type:
Cfn
[]
Properties of the Amazon ECS applications being deployed.
serviceRole
Type:
string
The IAM Role for CloudFormation to use to perform blue-green deployments.
additionalOptions?
Type:
Cfn
(optional, default: no additional options)
Additional options for the blue/green deployment.
lifecycleEventHooks?
Type:
Cfn
(optional, default: no lifecycle event hooks)
Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.
You can use the same function or a different one for deployment lifecycle events. Following completion of the validation tests, the Lambda {@link CfnCodeDeployBlueGreenLifecycleEventHooks.afterAllowTraffic} function calls back CodeDeploy and delivers a result of 'Succeeded' or 'Failed'.
trafficRoutingConfig?
Type:
Cfn
(optional, default: time-based canary traffic shifting, with a 15% step percentage and a five minute bake time)
Traffic routing configuration settings.
Properties
Name | Type | Description |
---|---|---|
applications | Cfn [] | Properties of the Amazon ECS applications being deployed. |
creation | string[] | |
logical | string | The logical ID for this CloudFormation stack element. |
node | Construct | The construct tree node associated with this construct. |
service | string | The IAM Role for CloudFormation to use to perform blue-green deployments. |
stack | Stack | The stack in which this element is defined. |
type | string | The type of the hook (for example, "AWS::CodeDeploy::BlueGreen"). |
additional | Cfn | Additional options for the blue/green deployment. |
lifecycle | Cfn | Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment. |
traffic | Cfn | Traffic routing configuration settings. |
applications
Type:
Cfn
[]
Properties of the Amazon ECS applications being deployed.
creationStack
Type:
string[]
logicalId
Type:
string
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use overrideLogicalId(newLogicalId)
.
node
Type:
Construct
The construct tree node associated with this construct.
serviceRole
Type:
string
The IAM Role for CloudFormation to use to perform blue-green deployments.
stack
Type:
Stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
type
Type:
string
The type of the hook (for example, "AWS::CodeDeploy::BlueGreen").
additionalOptions?
Type:
Cfn
(optional, default: no additional options)
Additional options for the blue/green deployment.
lifecycleEventHooks?
Type:
Cfn
(optional, default: no lifecycle event hooks)
Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.
You can use the same function or a different one for deployment lifecycle events. Following completion of the validation tests, the Lambda {@link CfnCodeDeployBlueGreenLifecycleEventHooks.afterAllowTraffic} function calls back CodeDeploy and delivers a result of 'Succeeded' or 'Failed'.
trafficRoutingConfig?
Type:
Cfn
(optional, default: time-based canary traffic shifting, with a 15% step percentage and a five minute bake time)
Traffic routing configuration settings.
Methods
Name | Description |
---|---|
override | Overrides the auto-generated logical ID with a specific ID. |
to | Returns a string representation of this construct. |
protected render |
overrideLogicalId(newLogicalId)
public overrideLogicalId(newLogicalId: string): void
Parameters
- newLogicalId
string
— The new logical ID to use for this stack element.
Overrides the auto-generated logical ID with a specific ID.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
protected renderProperties(_props?)
protected renderProperties(_props?: { [string]: any }): { [string]: any }
Parameters
- _props
{ [string]: any }
Returns
{ [string]: any }