# TimeBasedCanaryProperty

A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in two increments.

The original and target Lambda function versions or ECS task sets are specified in the deployment's AppSpec file.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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 timeBasedCanaryProperty: codedeploy.CfnDeploymentConfig.TimeBasedCanaryProperty = {
  canaryInterval: 123,
  canaryPercentage: 123,
};
```

Python:

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

time_based_canary_property = codedeploy.CfnDeploymentConfig.TimeBasedCanaryProperty(
    canary_interval=123,
    canary_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.services.codedeploy.*;

TimeBasedCanaryProperty timeBasedCanaryProperty = TimeBasedCanaryProperty.builder()
        .canaryInterval(123)
        .canaryPercentage(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.AWS.CodeDeploy;

var timeBasedCanaryProperty = new TimeBasedCanaryProperty {
    CanaryInterval = 123,
    CanaryPercentage = 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 "github.com/aws/aws-cdk-go/awscdk"

timeBasedCanaryProperty := &TimeBasedCanaryProperty{
	CanaryInterval: jsii.Number(123),
	CanaryPercentage: jsii.Number(123),
}
```

## Properties

- `canaryInterval`: number (required) — The number of minutes between the first and second traffic shifts of a `TimeBasedCanary` deployment.

- `canaryPercentage`: number (required) — The percentage of traffic to shift in the first increment of a `TimeBasedCanary` deployment.
