Skip to content
v2.277.0

ContentTypeProfileConfigProperty Struct ​

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

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

contentTypeProfilesIResolvable | IResolvable | CfnFieldLevelEncryptionConfig.ContentTypeProfileProperty[]content_type_profilestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ContentTypeProfileProperty]]]contentTypeProfilesIResolvableContentTypeProfilesIResolvableContentTypeProfilesinterface{} 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.

forwardWhenContentTypeIsUnknownboolean | IResolvableforward_when_content_type_is_unknowntyping.Union[bool, IResolvable]forwardWhenContentTypeIsUnknownBooleanForwardWhenContentTypeIsUnknownboolForwardWhenContentTypeIsUnknowninterface{} required #
Whether CloudFront forwards a request when the content type names a profile that does not exist.