aws-cdk-lib.CfnCodeDeployBlueGreenHookProps

interface CfnCodeDeployBlueGreenHookProps

LanguageType name
.NETAmazon.CDK.CfnCodeDeployBlueGreenHookProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2#CfnCodeDeployBlueGreenHookProps
Javasoftware.amazon.awscdk.CfnCodeDeployBlueGreenHookProps
Pythonaws_cdk.CfnCodeDeployBlueGreenHookProps
TypeScript (source)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

NameTypeDescription
applicationsCfnCodeDeployBlueGreenApplication[]Properties of the Amazon ECS applications being deployed.
serviceRolestringThe IAM Role for CloudFormation to use to perform blue-green deployments.
additionalOptions?CfnCodeDeployBlueGreenAdditionalOptionsAdditional options for the blue/green deployment.
lifecycleEventHooks?CfnCodeDeployBlueGreenLifecycleEventHooksUse lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.
trafficRoutingConfig?CfnTrafficRoutingConfigTraffic routing configuration settings.

applications

Type: CfnCodeDeployBlueGreenApplication[]

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: CfnCodeDeployBlueGreenAdditionalOptions (optional, default: no additional options)

Additional options for the blue/green deployment.


lifecycleEventHooks?

Type: CfnCodeDeployBlueGreenLifecycleEventHooks (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: CfnTrafficRoutingConfig (optional, default: time-based canary traffic shifting, with a 15% step percentage and a five minute bake time)

Traffic routing configuration settings.