Interface ICfnCodeDeployBlueGreenHookProps
Construction properties of {@link CfnCodeDeployBlueGreenHook}.
public interface ICfnCodeDeployBlueGreenHookProps
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
Properties
AdditionalOptions
Additional options for the blue/green deployment.
ICfnCodeDeployBlueGreenAdditionalOptions? AdditionalOptions { get; }
Property Value
Remarks
Default: - no additional options
Applications
Properties of the Amazon ECS applications being deployed.
ICfnCodeDeployBlueGreenApplication[] Applications { get; }
Property Value
LifecycleEventHooks
Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.
ICfnCodeDeployBlueGreenLifecycleEventHooks? LifecycleEventHooks { get; }
Property Value
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.
string ServiceRole { get; }
Property Value
TrafficRoutingConfig
Traffic routing configuration settings.
ICfnTrafficRoutingConfig? TrafficRoutingConfig { get; }
Property Value
Remarks
Default: - time-based canary traffic shifting, with a 15% step percentage and a five minute bake time