Skip to content
v2.276.0

VersionAttributes Struct ​

Example ​

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
# 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
// 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();
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"
};
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 ​

lambdaIFunctionlambdaIFunctionlambdaIFunctionLambdaIFunctionLambdaIFunctionrequired#
The lambda function.
versionstringversionstrversionStringVersionstringVersion*stringrequired#
The version.