Show / Hide Table of Contents

Class CfnCodeDeployBlueGreenHookProps

Construction properties of CfnCodeDeployBlueGreenHook.

Inheritance
object
CfnCodeDeployBlueGreenHookProps
Implements
ICfnCodeDeployBlueGreenHookProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnCodeDeployBlueGreenHookProps : ICfnCodeDeployBlueGreenHookProps
Syntax (vb)
Public Class CfnCodeDeployBlueGreenHookProps Implements ICfnCodeDeployBlueGreenHookProps
Remarks

ExampleMetadata: fixture=_generated

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
                    }
                }
            };

Synopsis

Constructors

CfnCodeDeployBlueGreenHookProps()

Construction properties of CfnCodeDeployBlueGreenHook.

Properties

AdditionalOptions

Additional options for the blue/green deployment.

Applications

Properties of the Amazon ECS applications being deployed.

LifecycleEventHooks

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

ServiceRole

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

TrafficRoutingConfig

Traffic routing configuration settings.

Constructors

CfnCodeDeployBlueGreenHookProps()

Construction properties of CfnCodeDeployBlueGreenHook.

public CfnCodeDeployBlueGreenHookProps()
Remarks

ExampleMetadata: fixture=_generated

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
                    }
                }
            };

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[]

Remarks

ExampleMetadata: fixture=_generated

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

Remarks

ExampleMetadata: fixture=_generated

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

Implements

ICfnCodeDeployBlueGreenHookProps
Back to top Generated by DocFX