# CfnConnectionFunctionProps

Properties for defining a `CfnConnectionFunction`.

Extends: CfnConnectionFunctionProps
Used as props by: CfnConnectionFunction

- Source: Generated code
- Type last changed: v2.227.0 · 21 Nov 2025

## 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 cfnConnectionFunctionProps: cloudfront.CfnConnectionFunctionProps = {
  connectionFunctionCode: 'connectionFunctionCode',
  connectionFunctionConfig: {
    comment: 'comment',
    runtime: 'runtime',

    // the properties below are optional
    keyValueStoreAssociations: [{
      keyValueStoreArn: 'keyValueStoreArn',
    }],
  },
  name: 'name',

  // the properties below are optional
  autoPublish: false,
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `autoPublish`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) = false — A flag that determines whether to automatically publish the function to the `LIVE` stage when it’s created.

  To automatically publish to the `LIVE` stage, set this property to `true` .

- `connectionFunctionCode`: string (required) — The code for the connection function.

- `connectionFunctionConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConnectionFunction.ConnectionFunctionConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.CfnConnectionFunction.ConnectionFunctionConfigProperty.html) (required) — Contains configuration information about a CloudFront function.

- `name`: string (required) — The connection function name.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A complex type that contains zero or more `Tag` elements.
