interface CfnCodeDeployBlueGreenHookProps
Language | Type name |
---|---|
![]() | Amazon.CDK.CfnCodeDeployBlueGreenHookProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2#CfnCodeDeployBlueGreenHookProps |
![]() | software.amazon.awscdk.CfnCodeDeployBlueGreenHookProps |
![]() | aws_cdk.CfnCodeDeployBlueGreenHookProps |
![]() | aws-cdk-lib » CfnCodeDeployBlueGreenHookProps |
Construction properties of CfnCodeDeployBlueGreenHook
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const cfnCodeDeployBlueGreenHookProps: cdk.CfnCodeDeployBlueGreenHookProps = {
applications: [{
ecsAttributes: {
taskDefinitions: ['taskDefinitions'],
taskSets: ['taskSets'],
trafficRouting: {
prodTrafficRoute: {
logicalId: 'logicalId',
type: 'type',
},
targetGroups: ['targetGroups'],
testTrafficRoute: {
logicalId: 'logicalId',
type: 'type',
},
},
},
target: {
logicalId: 'logicalId',
type: 'type',
},
}],
serviceRole: 'serviceRole',
// the properties below are optional
additionalOptions: {
terminationWaitTimeInMinutes: 123,
},
lifecycleEventHooks: {
afterAllowTestTraffic: 'afterAllowTestTraffic',
afterAllowTraffic: 'afterAllowTraffic',
afterInstall: 'afterInstall',
beforeAllowTraffic: 'beforeAllowTraffic',
beforeInstall: 'beforeInstall',
},
trafficRoutingConfig: {
type: cdk.CfnTrafficRoutingType.ALL_AT_ONCE,
// the properties below are optional
timeBasedCanary: {
bakeTimeMins: 123,
stepPercentage: 123,
},
timeBasedLinear: {
bakeTimeMins: 123,
stepPercentage: 123,
},
},
};
Properties
Name | Type | Description |
---|---|---|
applications | Cfn [] | Properties of the Amazon ECS applications being deployed. |
service | string | The IAM Role for CloudFormation to use to perform blue-green deployments. |
additional | Cfn | Additional options for the blue/green deployment. |
lifecycle | Cfn | Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment. |
traffic | Cfn | Traffic routing configuration settings. |
applications
Type:
Cfn
[]
Properties of the Amazon ECS applications being deployed.
serviceRole
Type:
string
The IAM Role for CloudFormation to use to perform blue-green deployments.
additionalOptions?
Type:
Cfn
(optional, default: no additional options)
Additional options for the blue/green deployment.
lifecycleEventHooks?
Type:
Cfn
(optional, default: no lifecycle event hooks)
Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.
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'.
trafficRoutingConfig?
Type:
Cfn
(optional, default: time-based canary traffic shifting, with a 15% step percentage and a five minute bake time)
Traffic routing configuration settings.