AWS::CloudFront::ResponseHeadersPolicy - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


A response headers policy.

A response headers policy contains information about a set of HTTP response headers.

After you create a response headers policy, you can use its ID to attach it to one or more cache behaviors in a CloudFront distribution. When it's attached to a cache behavior, the response headers policy affects the HTTP headers that CloudFront includes in HTTP responses to requests that match the cache behavior. CloudFront adds or removes response headers according to the configuration of the response headers policy.

For more information, see Adding or removing HTTP headers in CloudFront responses in the Amazon CloudFront Developer Guide.


To declare this entity in your Amazon CloudFormation template, use the following syntax:


{ "Type" : "AWS::CloudFront::ResponseHeadersPolicy", "Properties" : { "ResponseHeadersPolicyConfig" : ResponseHeadersPolicyConfig } }


Type: AWS::CloudFront::ResponseHeadersPolicy Properties: ResponseHeadersPolicyConfig: ResponseHeadersPolicyConfig



A response headers policy configuration.

Required: Yes

Type: ResponseHeadersPolicyConfig

Update requires: No interruption

Return values


When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the response headers policy ID. For example: 57f99797-3b20-4e1b-a728-27972a74082a.

For more information about using the Ref function, see Ref.


The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.


The unique identifier for the response headers policy. For example: 57f99797-3b20-4e1b-a728-27972a74082a.


The date and time when the response headers policy was last modified.