Table of Contents

Class CfnCodeDeployBlueGreenHookProps

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll

Construction properties of {@link CfnCodeDeployBlueGreenHook}.

public class CfnCodeDeployBlueGreenHookProps : ICfnCodeDeployBlueGreenHookProps
Inheritance
CfnCodeDeployBlueGreenHookProps
Implements
Inherited Members

Examples

// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK;
            var cfnCodeDeployBlueGreenHookProps = new CfnCodeDeployBlueGreenHookProps {
                Applications = new [] { new CfnCodeDeployBlueGreenApplication {
                    EcsAttributes = new CfnCodeDeployBlueGreenEcsAttributes {
                        TaskDefinitions = new [] { "taskDefinitions" },
                        TaskSets = new [] { "taskSets" },
                        TrafficRouting = new CfnTrafficRouting {
                            ProdTrafficRoute = new CfnTrafficRoute {
                                LogicalId = "logicalId",
                                Type = "type"
                            },
                            TargetGroups = new [] { "targetGroups" },
                            TestTrafficRoute = new CfnTrafficRoute {
                                LogicalId = "logicalId",
                                Type = "type"
                            }
                        }
                    },
                    Target = new CfnCodeDeployBlueGreenApplicationTarget {
                        LogicalId = "logicalId",
                        Type = "type"
                    }
                } },
                ServiceRole = "serviceRole",

                // the properties below are optional
                AdditionalOptions = new CfnCodeDeployBlueGreenAdditionalOptions {
                    TerminationWaitTimeInMinutes = 123
                },
                LifecycleEventHooks = new CfnCodeDeployBlueGreenLifecycleEventHooks {
                    AfterAllowTestTraffic = "afterAllowTestTraffic",
                    AfterAllowTraffic = "afterAllowTraffic",
                    AfterInstall = "afterInstall",
                    BeforeAllowTraffic = "beforeAllowTraffic",
                    BeforeInstall = "beforeInstall"
                },
                TrafficRoutingConfig = new CfnTrafficRoutingConfig {
                    Type = CfnTrafficRoutingType.ALL_AT_ONCE,

                    // the properties below are optional
                    TimeBasedCanary = new CfnTrafficRoutingTimeBasedCanary {
                        BakeTimeMins = 123,
                        StepPercentage = 123
                    },
                    TimeBasedLinear = new CfnTrafficRoutingTimeBasedLinear {
                        BakeTimeMins = 123,
                        StepPercentage = 123
                    }
                }
            };

Remarks

ExampleMetadata: fixture=_generated

Constructors

CfnCodeDeployBlueGreenHookProps()

public CfnCodeDeployBlueGreenHookProps()

Properties

AdditionalOptions

Additional options for the blue/green deployment.

public ICfnCodeDeployBlueGreenAdditionalOptions? AdditionalOptions { get; set; }

Property Value

ICfnCodeDeployBlueGreenAdditionalOptions

Remarks

Default: - no additional options

Applications

Properties of the Amazon ECS applications being deployed.

public 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 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 string ServiceRole { get; set; }

Property Value

string

TrafficRoutingConfig

Traffic routing configuration settings.

public 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