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