class FunctionRuntime
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudFront.FunctionRuntime |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#FunctionRuntime |
![]() | software.amazon.awscdk.services.cloudfront.FunctionRuntime |
![]() | aws_cdk.aws_cloudfront.FunctionRuntime |
![]() | aws-cdk-lib » aws_cloudfront » FunctionRuntime |
The function's runtime environment version.
Example
const store = new cloudfront.KeyValueStore(this, 'KeyValueStore');
new cloudfront.Function(this, 'Function', {
code: cloudfront.FunctionCode.fromInline('function handler(event) { return event.request }'),
// Note that JS_2_0 must be used for Key Value Store support
runtime: cloudfront.FunctionRuntime.JS_2_0,
keyValueStore: store,
});
Properties
Name | Type | Description |
---|---|---|
value | string | |
static JS_1_0 | Function | cloudfront-js-1.0. |
static JS_2_0 | Function | cloudfront-js-2.0. |
value
Type:
string
static JS_1_0
Type:
Function
cloudfront-js-1.0.
static JS_2_0
Type:
Function
cloudfront-js-2.0.
Methods
Name | Description |
---|---|
static custom(runtimeString) | A custom runtime string. |
static custom(runtimeString)
public static custom(runtimeString: string): FunctionRuntime
Parameters
- runtimeString
string
Returns
A custom runtime string.
Gives full control over the runtime string fragment.