# VersionAttributes

- Source: [`aws-lambda/lib/lambda-version.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-lambda/lib/lambda-version.ts#L114)

## 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';

declare const function_: lambda.Function;
const versionAttributes: lambda.VersionAttributes = {
  lambda: function_,
  version: 'version',
};
```

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_

# function_: lambda.Function

version_attributes = lambda.VersionAttributes(
    lambda_=function_,
    version="version"
)
```

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.*;

Function function_;

VersionAttributes versionAttributes = VersionAttributes.builder()
        .lambda(function_)
        .version("version")
        .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;

Function function_;

var versionAttributes = new VersionAttributes {
    Lambda = function_,
    Version = "version"
};
```

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"

var function_ Function

versionAttributes := &VersionAttributes{
	Lambda: function_,
	Version: jsii.String("version"),
}
```

## Properties

- `lambda`: [IFunction](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.IFunction.html) (required) — The lambda function.

- `version`: string (required) — The version.
