aws-cdk-lib.CfnCodeDeployBlueGreenHook

class CfnCodeDeployBlueGreenHook (construct)

LanguageType name
.NETAmazon.CDK.CfnCodeDeployBlueGreenHook
Gogithub.com/aws/aws-cdk-go/awscdk/v2#CfnCodeDeployBlueGreenHook
Javasoftware.amazon.awscdk.CfnCodeDeployBlueGreenHook
Pythonaws_cdk.CfnCodeDeployBlueGreenHook
TypeScript (source)aws-cdk-lib » CfnCodeDeployBlueGreenHook

Implements IConstruct, IDependable

A CloudFormation Hook for CodeDeploy blue-green ECS deployments.

See also: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/blue-green.html#blue-green-template-reference

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 CfnCodeDeployBlueGreenHookProps — the properties of the Hook.

Creates a new CodeDeploy blue-green ECS Hook.

Construct Props

NameTypeDescription
applicationsCfnCodeDeployBlueGreenApplication[]Properties of the Amazon ECS applications being deployed.
serviceRolestringThe IAM Role for CloudFormation to use to perform blue-green deployments.
additionalOptions?CfnCodeDeployBlueGreenAdditionalOptionsAdditional options for the blue/green deployment.
lifecycleEventHooks?CfnCodeDeployBlueGreenLifecycleEventHooksUse lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.
trafficRoutingConfig?CfnTrafficRoutingConfigTraffic routing configuration settings.

applications

Type: CfnCodeDeployBlueGreenApplication[]

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: CfnCodeDeployBlueGreenAdditionalOptions (optional, default: no additional options)

Additional options for the blue/green deployment.


lifecycleEventHooks?

Type: CfnCodeDeployBlueGreenLifecycleEventHooks (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 CfnCodeDeployBlueGreenLifecycleEventHooks.afterAllowTraffic function calls back CodeDeploy and delivers a result of 'Succeeded' or 'Failed'.


trafficRoutingConfig?

Type: CfnTrafficRoutingConfig (optional, default: time-based canary traffic shifting, with a 15% step percentage and a five minute bake time)

Traffic routing configuration settings.

Properties

NameTypeDescription
applicationsCfnCodeDeployBlueGreenApplication[]Properties of the Amazon ECS applications being deployed.
creationStackstring[]
logicalIdstringThe logical ID for this CloudFormation stack element.
nodeNodeThe tree node.
serviceRolestringThe IAM Role for CloudFormation to use to perform blue-green deployments.
stackStackThe stack in which this element is defined.
typestringThe type of the hook (for example, "AWS::CodeDeploy::BlueGreen").
additionalOptions?CfnCodeDeployBlueGreenAdditionalOptionsAdditional options for the blue/green deployment.
lifecycleEventHooks?CfnCodeDeployBlueGreenLifecycleEventHooksUse lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.
trafficRoutingConfig?CfnTrafficRoutingConfigTraffic routing configuration settings.

applications

Type: CfnCodeDeployBlueGreenApplication[]

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: Node

The tree node.


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: CfnCodeDeployBlueGreenAdditionalOptions (optional, default: no additional options)

Additional options for the blue/green deployment.


lifecycleEventHooks?

Type: CfnCodeDeployBlueGreenLifecycleEventHooks (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 CfnCodeDeployBlueGreenLifecycleEventHooks.afterAllowTraffic function calls back CodeDeploy and delivers a result of 'Succeeded' or 'Failed'.


trafficRoutingConfig?

Type: CfnTrafficRoutingConfig (optional, default: time-based canary traffic shifting, with a 15% step percentage and a five minute bake time)

Traffic routing configuration settings.

Methods

NameDescription
overrideLogicalId(newLogicalId)Overrides the auto-generated logical ID with a specific ID.
toString()Returns a string representation of this construct.
protected renderProperties(_props?)

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 }