# CfnTrafficRoutingConfig

Traffic routing configuration settings.

The type of the `CfnCodeDeployBlueGreenHookProps.trafficRoutingConfig` property.

- Source: [`core/lib/cfn-codedeploy-blue-green-hook.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/core/lib/cfn-codedeploy-blue-green-hook.ts#L77)

## Example

```ts
// 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 cfnTrafficRoutingConfig: cdk.CfnTrafficRoutingConfig = {
  type: cdk.CfnTrafficRoutingType.ALL_AT_ONCE,

  // the properties below are optional
  timeBasedCanary: {
    bakeTimeMins: 123,
    stepPercentage: 123,
  },
  timeBasedLinear: {
    bakeTimeMins: 123,
    stepPercentage: 123,
  },
};
```

## Properties

- `timeBasedCanary`: [CfnTrafficRoutingTimeBasedCanary](/cdk/api/v2/docs/aws-cdk-lib.CfnTrafficRoutingTimeBasedCanary.html) = none — The configuration for traffic routing when `type` is `CfnTrafficRoutingType.TIME_BASED_CANARY`.

- `timeBasedLinear`: [CfnTrafficRoutingTimeBasedLinear](/cdk/api/v2/docs/aws-cdk-lib.CfnTrafficRoutingTimeBasedLinear.html) = none — The configuration for traffic routing when `type` is `CfnTrafficRoutingType.TIME_BASED_LINEAR`.

- `type`: [CfnTrafficRoutingType](/cdk/api/v2/docs/aws-cdk-lib.CfnTrafficRoutingType.html) (required) — The type of traffic shifting used by the blue-green deployment configuration.
