Class CfnCodeDeployBlueGreenHookProps
Construction properties of CfnCodeDeployBlueGreenHook.
Implements
Inherited Members
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 |
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
Remarks
ExampleMetadata: fixture=_generated
TrafficRoutingConfig
Traffic routing configuration settings.
public ICfnTrafficRoutingConfig? TrafficRoutingConfig { get; set; }
Property Value
Remarks
Default: - time-based canary traffic shifting, with a 15% step percentage and a five minute bake time