# FunctionAttributes

Attributes of an existing CloudFront Function to import it.

- Source: [`aws-cloudfront/lib/function.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-cloudfront/lib/function.ts#L96)
- Type last changed: v2.118.0 · 3 Jan 2024

## Example

TypeScript:

```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:

```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:

```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();
```

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

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

    // the properties below are optional
    FunctionRuntime = "functionRuntime"
};
```

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"

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

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

## Properties

- `functionArn`: string (required) — The ARN of the function.

- `functionName`: string (required) — The name of the function.

- `functionRuntime`: string = FunctionRuntime.JS_1_0 — The Runtime of the function.
