# TimeBasedLinearTrafficRoutingProps

Construction properties for `TimeBasedLinearTrafficRouting`.

Extends: [BaseTrafficShiftingConfigProps](/cdk/api/v2/docs/aws-cdk-lib.aws_codedeploy.BaseTrafficShiftingConfigProps.html)
Used as props by: [TimeBasedLinearTrafficRouting](/cdk/api/v2/docs/aws-cdk-lib.aws_codedeploy.TimeBasedLinearTrafficRouting.html)

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

## Example

TypeScript:

```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';
import { aws_codedeploy as codedeploy } from 'aws-cdk-lib';
const timeBasedLinearTrafficRoutingProps: codedeploy.TimeBasedLinearTrafficRoutingProps = {
  interval: cdk.Duration.minutes(30),
  percentage: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_codedeploy as codedeploy

time_based_linear_traffic_routing_props = codedeploy.TimeBasedLinearTrafficRoutingProps(
    interval=cdk.Duration.minutes(30),
    percentage=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.codedeploy.*;

TimeBasedLinearTrafficRoutingProps timeBasedLinearTrafficRoutingProps = TimeBasedLinearTrafficRoutingProps.builder()
        .interval(Duration.minutes(30))
        .percentage(123)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.CodeDeploy;

var timeBasedLinearTrafficRoutingProps = new TimeBasedLinearTrafficRoutingProps {
    Interval = Duration.Minutes(30),
    Percentage = 123
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

timeBasedLinearTrafficRoutingProps := &TimeBasedLinearTrafficRoutingProps{
	Interval: cdk.Duration_Minutes(jsii.Number(30)),
	Percentage: jsii.Number(123),
}
```

## Properties

- `interval`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) (required) — The amount of time between traffic shifts.

- `percentage`: number (required) — The percentage to increase traffic on each traffic shift.
