

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::CloudFront::OriginRequestPolicy
<a name="aws-resource-cloudfront-originrequestpolicy"></a>

An origin request policy.

When it's attached to a cache behavior, the origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
+ The request body and the URL path (without the domain name) from the viewer request.
+ The headers that CloudFront automatically includes in every origin request, including `Host`, `User-Agent`, and `X-Amz-Cf-Id`.
+ All HTTP headers, cookies, and URL query strings that are specified in the cache policy or the origin request policy. These can include items from the viewer request and, in the case of headers, additional ones that are added by CloudFront.

CloudFront sends a request when it can't find an object in its cache that matches the request. If you want to send values to the origin and also include them in the cache key, use `CachePolicy`.

## Syntax
<a name="aws-resource-cloudfront-originrequestpolicy-syntax"></a>

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

### JSON
<a name="aws-resource-cloudfront-originrequestpolicy-syntax.json"></a>

```
{
  "Type" : "AWS::CloudFront::OriginRequestPolicy",
  "Properties" : {
      "[OriginRequestPolicyConfig](#cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig)" : OriginRequestPolicyConfig
    }
}
```

### YAML
<a name="aws-resource-cloudfront-originrequestpolicy-syntax.yaml"></a>

```
Type: AWS::CloudFront::OriginRequestPolicy
Properties:
  [OriginRequestPolicyConfig](#cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig): 
    OriginRequestPolicyConfig
```

## Properties
<a name="aws-resource-cloudfront-originrequestpolicy-properties"></a>

`OriginRequestPolicyConfig`  <a name="cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig"></a>
The origin request policy configuration.  
*Required*: Yes  
*Type*: [OriginRequestPolicyConfig](aws-properties-cloudfront-originrequestpolicy-originrequestpolicyconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-cloudfront-originrequestpolicy-return-values"></a>

### Ref
<a name="aws-resource-cloudfront-originrequestpolicy-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the origin request policy ID. For example: `befd7079-9bbc-4ebf-8ade-498a3694176c`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-cloudfront-originrequestpolicy-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-cloudfront-originrequestpolicy-return-values-fn--getatt-fn--getatt"></a>

`Id`  <a name="Id-fn::getatt"></a>
The unique identifier for the origin request policy. For example: `befd7079-9bbc-4ebf-8ade-498a3694176c`.

`LastModifiedTime`  <a name="LastModifiedTime-fn::getatt"></a>
The date and time when the origin request policy was last modified.

# AWS::CloudFront::OriginRequestPolicy CookiesConfig
<a name="aws-properties-cloudfront-originrequestpolicy-cookiesconfig"></a>

An object that determines whether any cookies in viewer requests (and if so, which cookies) are included in requests that CloudFront sends to the origin.

## Syntax
<a name="aws-properties-cloudfront-originrequestpolicy-cookiesconfig-syntax"></a>

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

### JSON
<a name="aws-properties-cloudfront-originrequestpolicy-cookiesconfig-syntax.json"></a>

```
{
  "[CookieBehavior](#cfn-cloudfront-originrequestpolicy-cookiesconfig-cookiebehavior)" : String,
  "[Cookies](#cfn-cloudfront-originrequestpolicy-cookiesconfig-cookies)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-cloudfront-originrequestpolicy-cookiesconfig-syntax.yaml"></a>

```
  [CookieBehavior](#cfn-cloudfront-originrequestpolicy-cookiesconfig-cookiebehavior): String
  [Cookies](#cfn-cloudfront-originrequestpolicy-cookiesconfig-cookies): 
    - String
```

## Properties
<a name="aws-properties-cloudfront-originrequestpolicy-cookiesconfig-properties"></a>

`CookieBehavior`  <a name="cfn-cloudfront-originrequestpolicy-cookiesconfig-cookiebehavior"></a>
Determines whether cookies in viewer requests are included in requests that CloudFront sends to the origin. Valid values are:  
+ `none` – No cookies in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set to `none`, any cookies that are listed in a `CachePolicy`*are* included in origin requests.
+ `whitelist` – Only the cookies in viewer requests that are listed in the `CookieNames` type are included in requests that CloudFront sends to the origin.
+ `all` – All cookies in viewer requests are included in requests that CloudFront sends to the origin.
+ `allExcept` – All cookies in viewer requests are included in requests that CloudFront sends to the origin, * **except** * for those listed in the `CookieNames` type, which are not included.
*Required*: Yes  
*Type*: String  
*Pattern*: `^(none|whitelist|all|allExcept)$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Cookies`  <a name="cfn-cloudfront-originrequestpolicy-cookiesconfig-cookies"></a>
Contains a list of cookie names.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CloudFront::OriginRequestPolicy HeadersConfig
<a name="aws-properties-cloudfront-originrequestpolicy-headersconfig"></a>

An object that determines whether any HTTP headers (and if so, which headers) are included in requests that CloudFront sends to the origin.

## Syntax
<a name="aws-properties-cloudfront-originrequestpolicy-headersconfig-syntax"></a>

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

### JSON
<a name="aws-properties-cloudfront-originrequestpolicy-headersconfig-syntax.json"></a>

```
{
  "[HeaderBehavior](#cfn-cloudfront-originrequestpolicy-headersconfig-headerbehavior)" : String,
  "[Headers](#cfn-cloudfront-originrequestpolicy-headersconfig-headers)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-cloudfront-originrequestpolicy-headersconfig-syntax.yaml"></a>

```
  [HeaderBehavior](#cfn-cloudfront-originrequestpolicy-headersconfig-headerbehavior): String
  [Headers](#cfn-cloudfront-originrequestpolicy-headersconfig-headers): 
    - String
```

## Properties
<a name="aws-properties-cloudfront-originrequestpolicy-headersconfig-properties"></a>

`HeaderBehavior`  <a name="cfn-cloudfront-originrequestpolicy-headersconfig-headerbehavior"></a>
Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid values are:  
+ `none` – No HTTP headers in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set to `none`, any headers that are listed in a `CachePolicy`*are* included in origin requests.
+ `whitelist` – Only the HTTP headers that are listed in the `Headers` type are included in requests that CloudFront sends to the origin.
+ `allViewer` – All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin.
+ `allViewerAndWhitelistCloudFront` – All HTTP headers in viewer requests and the additional CloudFront headers that are listed in the `Headers` type are included in requests that CloudFront sends to the origin. The additional headers are added by CloudFront.
+ `allExcept` – All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin, * **except** * for those listed in the `Headers` type, which are not included.
*Required*: Yes  
*Type*: String  
*Pattern*: `^(none|whitelist|allViewer|allViewerAndWhitelistCloudFront|allExcept)$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Headers`  <a name="cfn-cloudfront-originrequestpolicy-headersconfig-headers"></a>
Contains a list of HTTP header names.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CloudFront::OriginRequestPolicy OriginRequestPolicyConfig
<a name="aws-properties-cloudfront-originrequestpolicy-originrequestpolicyconfig"></a>

An origin request policy configuration.

This configuration determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
+ The request body and the URL path (without the domain name) from the viewer request.
+ The headers that CloudFront automatically includes in every origin request, including `Host`, `User-Agent`, and `X-Amz-Cf-Id`.
+ All HTTP headers, cookies, and URL query strings that are specified in the cache policy or the origin request policy. These can include items from the viewer request and, in the case of headers, additional ones that are added by CloudFront.

CloudFront sends a request when it can't find an object in its cache that matches the request. If you want to send values to the origin and also include them in the cache key, use `CachePolicy`.

## Syntax
<a name="aws-properties-cloudfront-originrequestpolicy-originrequestpolicyconfig-syntax"></a>

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

### JSON
<a name="aws-properties-cloudfront-originrequestpolicy-originrequestpolicyconfig-syntax.json"></a>

```
{
  "[Comment](#cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-comment)" : String,
  "[CookiesConfig](#cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-cookiesconfig)" : CookiesConfig,
  "[HeadersConfig](#cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-headersconfig)" : HeadersConfig,
  "[Name](#cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-name)" : String,
  "[QueryStringsConfig](#cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-querystringsconfig)" : QueryStringsConfig
}
```

### YAML
<a name="aws-properties-cloudfront-originrequestpolicy-originrequestpolicyconfig-syntax.yaml"></a>

```
  [Comment](#cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-comment): String
  [CookiesConfig](#cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-cookiesconfig): 
    CookiesConfig
  [HeadersConfig](#cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-headersconfig): 
    HeadersConfig
  [Name](#cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-name): String
  [QueryStringsConfig](#cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-querystringsconfig): 
    QueryStringsConfig
```

## Properties
<a name="aws-properties-cloudfront-originrequestpolicy-originrequestpolicyconfig-properties"></a>

`Comment`  <a name="cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-comment"></a>
A comment to describe the origin request policy. The comment cannot be longer than 128 characters.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CookiesConfig`  <a name="cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-cookiesconfig"></a>
The cookies from viewer requests to include in origin requests.  
*Required*: Yes  
*Type*: [CookiesConfig](aws-properties-cloudfront-originrequestpolicy-cookiesconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`HeadersConfig`  <a name="cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-headersconfig"></a>
The HTTP headers to include in origin requests. These can include headers from viewer requests and additional headers added by CloudFront.  
*Required*: Yes  
*Type*: [HeadersConfig](aws-properties-cloudfront-originrequestpolicy-headersconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-name"></a>
A unique name to identify the origin request policy.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`QueryStringsConfig`  <a name="cfn-cloudfront-originrequestpolicy-originrequestpolicyconfig-querystringsconfig"></a>
The URL query strings from viewer requests to include in origin requests.  
*Required*: Yes  
*Type*: [QueryStringsConfig](aws-properties-cloudfront-originrequestpolicy-querystringsconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CloudFront::OriginRequestPolicy QueryStringsConfig
<a name="aws-properties-cloudfront-originrequestpolicy-querystringsconfig"></a>

An object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in requests that CloudFront sends to the origin.

## Syntax
<a name="aws-properties-cloudfront-originrequestpolicy-querystringsconfig-syntax"></a>

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

### JSON
<a name="aws-properties-cloudfront-originrequestpolicy-querystringsconfig-syntax.json"></a>

```
{
  "[QueryStringBehavior](#cfn-cloudfront-originrequestpolicy-querystringsconfig-querystringbehavior)" : String,
  "[QueryStrings](#cfn-cloudfront-originrequestpolicy-querystringsconfig-querystrings)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-cloudfront-originrequestpolicy-querystringsconfig-syntax.yaml"></a>

```
  [QueryStringBehavior](#cfn-cloudfront-originrequestpolicy-querystringsconfig-querystringbehavior): 
    String
  [QueryStrings](#cfn-cloudfront-originrequestpolicy-querystringsconfig-querystrings): 
    - String
```

## Properties
<a name="aws-properties-cloudfront-originrequestpolicy-querystringsconfig-properties"></a>

`QueryStringBehavior`  <a name="cfn-cloudfront-originrequestpolicy-querystringsconfig-querystringbehavior"></a>
Determines whether any URL query strings in viewer requests are included in requests that CloudFront sends to the origin. Valid values are:  
+ `none` – No query strings in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set to `none`, any query strings that are listed in a `CachePolicy`*are* included in origin requests.
+ `whitelist` – Only the query strings in viewer requests that are listed in the `QueryStringNames` type are included in requests that CloudFront sends to the origin.
+ `all` – All query strings in viewer requests are included in requests that CloudFront sends to the origin.
+ `allExcept` – All query strings in viewer requests are included in requests that CloudFront sends to the origin, * **except** * for those listed in the `QueryStringNames` type, which are not included.
*Required*: Yes  
*Type*: String  
*Pattern*: `^(none|whitelist|all|allExcept)$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`QueryStrings`  <a name="cfn-cloudfront-originrequestpolicy-querystringsconfig-querystrings"></a>
Contains a list of query string names.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)