# TrafficRoutingConfig

Represents the structure to pass into the underlying CfnDeploymentConfig class.

- Source: [`aws-codedeploy/lib/traffic-routing-config.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-codedeploy/lib/traffic-routing-config.ts#L7)
- Type last changed: v2.45.0 · 6 Oct 2022

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codedeploy as codedeploy } from 'aws-cdk-lib';
const trafficRoutingConfig: codedeploy.TrafficRoutingConfig = {
  type: 'type',

  // the properties below are optional
  timeBasedCanary: {
    canaryInterval: 123,
    canaryPercentage: 123,
  },
  timeBasedLinear: {
    linearInterval: 123,
    linearPercentage: 123,
  },
};
```

## Properties

- `timeBasedCanary`: [CanaryTrafficRoutingConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_codedeploy.CanaryTrafficRoutingConfig.html) = none — A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in two increments.

- `timeBasedLinear`: [LinearTrafficRoutingConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_codedeploy.LinearTrafficRoutingConfig.html) = none — A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in equal increments, with an equal number of minutes between each increment.

- `type`: string (required) — The type of traffic shifting ( `TimeBasedCanary` or `TimeBasedLinear` ) used by a deployment configuration.
