# CfnFieldLevelEncryptionConfigProps

Properties for defining a `CfnFieldLevelEncryptionConfig`.

Used as props by: [CfnFieldLevelEncryptionConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.CfnFieldLevelEncryptionConfig.html)

- Source: Generated at build time
- Type last changed: v2.275.0 · 26 Oct 2026

## 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 cfnFieldLevelEncryptionConfigProps: cloudfront.CfnFieldLevelEncryptionConfigProps = {
  callerReference: 'callerReference',
  contentTypeProfileConfig: {
    contentTypeProfiles: [{
      contentType: 'contentType',
      format: 'format',
      profileId: 'profileId',
    }],
    forwardWhenContentTypeIsUnknown: false,
  },
  queryArgProfileConfig: {
    forwardWhenQueryArgProfileIsUnknown: false,
    queryArgProfiles: [{
      profileId: 'profileId',
      queryArg: 'queryArg',
    }],
  },

  // the properties below are optional
  comment: 'comment',
};
```

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

cfn_field_level_encryption_config_props = cloudfront.CfnFieldLevelEncryptionConfigProps(
    caller_reference="callerReference",
    content_type_profile_config=cloudfront.CfnFieldLevelEncryptionConfig.ContentTypeProfileConfigProperty(
        content_type_profiles=[cloudfront.CfnFieldLevelEncryptionConfig.ContentTypeProfileProperty(
            content_type="contentType",
            format="format",
            profile_id="profileId"
        )],
        forward_when_content_type_is_unknown=False
    ),
    query_arg_profile_config=cloudfront.CfnFieldLevelEncryptionConfig.QueryArgProfileConfigProperty(
        forward_when_query_arg_profile_is_unknown=False,
        query_arg_profiles=[cloudfront.CfnFieldLevelEncryptionConfig.QueryArgProfileProperty(
            profile_id="profileId",
            query_arg="queryArg"
        )]
    ),

    # the properties below are optional
    comment="comment"
)
```

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

CfnFieldLevelEncryptionConfigProps cfnFieldLevelEncryptionConfigProps = CfnFieldLevelEncryptionConfigProps.builder()
        .callerReference("callerReference")
        .contentTypeProfileConfig(ContentTypeProfileConfigProperty.builder()
                .contentTypeProfiles(List.of(ContentTypeProfileProperty.builder()
                        .contentType("contentType")
                        .format("format")
                        .profileId("profileId")
                        .build()))
                .forwardWhenContentTypeIsUnknown(false)
                .build())
        .queryArgProfileConfig(QueryArgProfileConfigProperty.builder()
                .forwardWhenQueryArgProfileIsUnknown(false)
                .queryArgProfiles(List.of(QueryArgProfileProperty.builder()
                        .profileId("profileId")
                        .queryArg("queryArg")
                        .build()))
                .build())

        // the properties below are optional
        .comment("comment")
        .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 cfnFieldLevelEncryptionConfigProps = new CfnFieldLevelEncryptionConfigProps {
    CallerReference = "callerReference",
    ContentTypeProfileConfig = new ContentTypeProfileConfigProperty {
        ContentTypeProfiles = new [] { new ContentTypeProfileProperty {
            ContentType = "contentType",
            Format = "format",
            ProfileId = "profileId"
        } },
        ForwardWhenContentTypeIsUnknown = false
    },
    QueryArgProfileConfig = new QueryArgProfileConfigProperty {
        ForwardWhenQueryArgProfileIsUnknown = false,
        QueryArgProfiles = new [] { new QueryArgProfileProperty {
            ProfileId = "profileId",
            QueryArg = "queryArg"
        } }
    },

    // the properties below are optional
    Comment = "comment"
};
```

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"

cfnFieldLevelEncryptionConfigProps := &CfnFieldLevelEncryptionConfigProps{
	CallerReference: jsii.String("callerReference"),
	ContentTypeProfileConfig: &ContentTypeProfileConfigProperty{
		ContentTypeProfiles: []interface{}{
			&ContentTypeProfileProperty{
				ContentType: jsii.String("contentType"),
				Format: jsii.String("format"),
				ProfileId: jsii.String("profileId"),
			},
		},
		ForwardWhenContentTypeIsUnknown: jsii.Boolean(false),
	},
	QueryArgProfileConfig: &QueryArgProfileConfigProperty{
		ForwardWhenQueryArgProfileIsUnknown: jsii.Boolean(false),
		QueryArgProfiles: []interface{}{
			&QueryArgProfileProperty{
				ProfileId: jsii.String("profileId"),
				QueryArg: jsii.String("queryArg"),
			},
		},
	},

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

## Properties

- `callerReference`: string (required) — A unique value that identifies the create request.

  Any string unique within the account works; CloudFront refuses to change it once set, so supplying a different value replaces the configuration. It is also the only value CloudFront returns that identifies a configuration as this stack's, so cleaning up after a failed create depends on the template keeping it.

- `comment`: string — An optional comment describing the field-level encryption configuration.

  CloudFront stores an omitted comment and an explicitly empty one identically as an empty string, and Read normalizes that empty string back to absent -- so omitting Comment round-trips, while asking for an empty string does not and would report perpetual drift. `minLength: 1` refuses the empty string at template validation; omission is the way to express no comment. The service documents a maximum of 128 characters, and `maxLength` moves that refusal from the API to template validation.

- `contentTypeProfileConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFieldLevelEncryptionConfig.ContentTypeProfileConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.CfnFieldLevelEncryptionConfig.ContentTypeProfileConfigProperty.html) (required) — How CloudFront handles content types, including the profile paired with each one.

- `queryArgProfileConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFieldLevelEncryptionConfig.QueryArgProfileConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.CfnFieldLevelEncryptionConfig.QueryArgProfileConfigProperty.html) (required) — How CloudFront handles query arguments, including the profile paired with each one.
