Skip to content
v2.277.0

FunctionAttributes Struct ​

Attributes of an existing CloudFront Function to import it.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudfront as cloudfront } from 'aws-cdk-lib';
const functionAttributes: cloudfront.FunctionAttributes = {
  functionArn: 'functionArn',
  functionName: 'functionName',

  // the properties below are optional
  functionRuntime: 'functionRuntime',
};
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_cloudfront as cloudfront

function_attributes = cloudfront.FunctionAttributes(
    function_arn="functionArn",
    function_name="functionName",

    # the properties below are optional
    function_runtime="functionRuntime"
)
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.cloudfront.*;

FunctionAttributes functionAttributes = FunctionAttributes.builder()
        .functionArn("functionArn")
        .functionName("functionName")

        // the properties below are optional
        .functionRuntime("functionRuntime")
        .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.CloudFront;

var functionAttributes = new FunctionAttributes {
    FunctionArn = "functionArn",
    FunctionName = "functionName",

    // the properties below are optional
    FunctionRuntime = "functionRuntime"
};
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"

functionAttributes := &FunctionAttributes{
	FunctionArn: jsii.String("functionArn"),
	FunctionName: jsii.String("functionName"),

	// the properties below are optional
	FunctionRuntime: jsii.String("functionRuntime"),
}

Properties ​

functionArnstringfunction_arnstrfunctionArnStringFunctionArnstringFunctionArn*stringrequired#
The ARN of the function.
functionNamestringfunction_namestrfunctionNameStringFunctionNamestringFunctionName*stringrequired#
The name of the function.
functionRuntimeoptionalstringfunction_runtimeoptionalstrfunctionRuntimeoptionalStringFunctionRuntimeoptionalstringFunctionRuntimeoptional*string= FunctionRuntime.JS_1_0#
The Runtime of the function.