AWS::CloudFront::ResponseHeadersPolicy - AWS CloudFormation

AWS::CloudFront::ResponseHeadersPolicy

A response headers policy.

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

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, CloudFront adds the headers in the policy to HTTP responses that it sends for requests that match the cache behavior.

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

Syntax

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

JSON

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

YAML

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

Properties

ResponseHeadersPolicyConfig

A response headers policy configuration.

A response headers policy contains information about a set of HTTP response headers and their values. CloudFront adds the headers in the policy to HTTP responses that it sends for requests that match a cache behavior that’s associated with the policy.

Required: Yes

Type: ResponseHeadersPolicyConfig

Update requires: No interruption

Return values

Ref

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.

Fn::GetAtt

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.

Id

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

LastModifiedTime

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