Table of Contents

Class CfnCodeDeployBlueGreenHook

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll

A CloudFormation Hook for CodeDeploy blue-green ECS deployments.

public class CfnCodeDeployBlueGreenHook : CfnHook, IConstruct, IConstruct, IDependable
Inheritance
CfnCodeDeployBlueGreenHook
Implements
IConstruct
Inherited Members

Examples

CfnInclude cfnTemplate;

             // mutating the hook
             Role myRole;

             var hook = cfnTemplate.GetHook("MyOutput");
             var codeDeployHook = (CfnCodeDeployBlueGreenHook)hook;
             codeDeployHook.ServiceRole = myRole.RoleArn;

Remarks

Constructors

CfnCodeDeployBlueGreenHook(Construct, string, ICfnCodeDeployBlueGreenHookProps)

Creates a new CodeDeploy blue-green ECS Hook.

public CfnCodeDeployBlueGreenHook(Construct scope, string id, ICfnCodeDeployBlueGreenHookProps props)

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 ICfnCodeDeployBlueGreenHookProps

the properties of the Hook.

Properties

AdditionalOptions

Additional options for the blue/green deployment.

public virtual ICfnCodeDeployBlueGreenAdditionalOptions? AdditionalOptions { get; set; }

Property Value

ICfnCodeDeployBlueGreenAdditionalOptions

Remarks

Default: - no additional options

Applications

Properties of the Amazon ECS applications being deployed.

public virtual ICfnCodeDeployBlueGreenApplication[] Applications { get; set; }

Property Value

ICfnCodeDeployBlueGreenApplication[]

LifecycleEventHooks

Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.

public virtual ICfnCodeDeployBlueGreenLifecycleEventHooks? LifecycleEventHooks { get; set; }

Property Value

ICfnCodeDeployBlueGreenLifecycleEventHooks

Remarks

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'.

Default: - no lifecycle event hooks

ServiceRole

The IAM Role for CloudFormation to use to perform blue-green deployments.

public virtual string ServiceRole { get; set; }

Property Value

string

TrafficRoutingConfig

Traffic routing configuration settings.

public virtual ICfnTrafficRoutingConfig? TrafficRoutingConfig { get; set; }

Property Value

ICfnTrafficRoutingConfig

Remarks

Default: - time-based canary traffic shifting, with a 15% step percentage and a five minute bake time

Methods

RenderProperties(IDictionary<string, object>?)

protected override IDictionary<string, object>? RenderProperties(IDictionary<string, object>? props = null)

Parameters

props IDictionary<string, object>

Returns

IDictionary<string, object>