Skip to content
v2.277.0

WebFunctionTraffic Class ​

How a WebFunction endpoint splits its traffic between revisions.

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';
const webFunctionTraffic = lambda.WebFunctionTraffic.single('revisionId');
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_

web_function_traffic = lambda_.WebFunctionTraffic.single("revisionId")
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.*;

WebFunctionTraffic webFunctionTraffic = WebFunctionTraffic.single("revisionId");
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 webFunctionTraffic = WebFunctionTraffic.Single("revisionId");
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"

webFunctionTraffic := awscdk.Aws_lambda.WebFunctionTraffic_Single(jsii.String("revisionId"))

Methods ​

single(revisionId: string): WebFunctionTraffic // chainable@staticmethod def single(revision_id: str) -> WebFunctionTrafficpublic static WebFunctionTraffic single(String revisionId)public static WebFunctionTraffic Single(string revisionId)func Single(RevisionId *string) WebFunctionTraffic static #
Send all of the endpoint's traffic to one revision.
1 parameter

Parameters

  • revisionIdrevision_idrevisionIdrevisionIdRevisionId — the ID of the revision.