# ContentTypeProfileConfigProperty

How CloudFront handles content types, including the profile paired with each one.

- 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 contentTypeProfileConfigProperty: cloudfront.CfnFieldLevelEncryptionConfig.ContentTypeProfileConfigProperty = {
  contentTypeProfiles: [{
    contentType: 'contentType',
    format: 'format',
    profileId: 'profileId',
  }],
  forwardWhenContentTypeIsUnknown: false,
};
```

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

content_type_profile_config_property = cloudfront.CfnFieldLevelEncryptionConfig.ContentTypeProfileConfigProperty(
    content_type_profiles=[cloudfront.CfnFieldLevelEncryptionConfig.ContentTypeProfileProperty(
        content_type="contentType",
        format="format",
        profile_id="profileId"
    )],
    forward_when_content_type_is_unknown=False
)
```

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

ContentTypeProfileConfigProperty contentTypeProfileConfigProperty = ContentTypeProfileConfigProperty.builder()
        .contentTypeProfiles(List.of(ContentTypeProfileProperty.builder()
                .contentType("contentType")
                .format("format")
                .profileId("profileId")
                .build()))
        .forwardWhenContentTypeIsUnknown(false)
        .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 contentTypeProfileConfigProperty = new ContentTypeProfileConfigProperty {
    ContentTypeProfiles = new [] { new ContentTypeProfileProperty {
        ContentType = "contentType",
        Format = "format",
        ProfileId = "profileId"
    } },
    ForwardWhenContentTypeIsUnknown = false
};
```

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"

contentTypeProfileConfigProperty := &ContentTypeProfileConfigProperty{
	ContentTypeProfiles: []interface{}{
		&ContentTypeProfileProperty{
			ContentType: jsii.String("contentType"),
			Format: jsii.String("format"),
			ProfileId: jsii.String("profileId"),
		},
	},
	ForwardWhenContentTypeIsUnknown: jsii.Boolean(false),
}
```

## Properties

- `contentTypeProfiles`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFieldLevelEncryptionConfig.ContentTypeProfileProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.CfnFieldLevelEncryptionConfig.ContentTypeProfileProperty.html)[] (required) — The content types paired with a profile.

  Required, and at least one item, because the service synthesizes one default item when the list is absent or empty, so neither state round-trips.

- `forwardWhenContentTypeIsUnknown`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) (required) — Whether CloudFront forwards a request when the content type names a profile that does not exist.
