# VersionWeightProperty

The [traffic-shifting](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) configuration of a Lambda function alias.

- 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_lambda as lambda } from 'aws-cdk-lib';
const versionWeightProperty: lambda.CfnAlias.VersionWeightProperty = {
  functionVersion: 'functionVersion',
  functionWeight: 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_lambda as lambda_

version_weight_property = lambda.CfnAlias.VersionWeightProperty(
    function_version="functionVersion",
    function_weight=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.lambda.*;

VersionWeightProperty versionWeightProperty = VersionWeightProperty.builder()
        .functionVersion("functionVersion")
        .functionWeight(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.Lambda;

var versionWeightProperty = new VersionWeightProperty {
    FunctionVersion = "functionVersion",
    FunctionWeight = 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"

versionWeightProperty := &VersionWeightProperty{
	FunctionVersion: jsii.String("functionVersion"),
	FunctionWeight: jsii.Number(123),
}
```

## Properties

- `functionVersion`: string (required) — The qualifier of the second version.

- `functionWeight`: number (required) — The percentage of traffic that the alias routes to the second version.
