Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates an origin request policy.
After you create an origin request policy, you can attach it to one or more cache behaviors. 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
, andX-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 a valid 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
.
For more information about origin request policies, see Controlling origin requests in the Amazon CloudFront Developer Guide.
Synopsis
- data CreateOriginRequestPolicy = CreateOriginRequestPolicy' {}
- newCreateOriginRequestPolicy :: OriginRequestPolicyConfig -> CreateOriginRequestPolicy
- createOriginRequestPolicy_originRequestPolicyConfig :: Lens' CreateOriginRequestPolicy OriginRequestPolicyConfig
- data CreateOriginRequestPolicyResponse = CreateOriginRequestPolicyResponse' {}
- newCreateOriginRequestPolicyResponse :: Int -> CreateOriginRequestPolicyResponse
- createOriginRequestPolicyResponse_eTag :: Lens' CreateOriginRequestPolicyResponse (Maybe Text)
- createOriginRequestPolicyResponse_location :: Lens' CreateOriginRequestPolicyResponse (Maybe Text)
- createOriginRequestPolicyResponse_originRequestPolicy :: Lens' CreateOriginRequestPolicyResponse (Maybe OriginRequestPolicy)
- createOriginRequestPolicyResponse_httpStatus :: Lens' CreateOriginRequestPolicyResponse Int
Creating a Request
data CreateOriginRequestPolicy Source #
See: newCreateOriginRequestPolicy
smart constructor.
CreateOriginRequestPolicy' | |
|
Instances
newCreateOriginRequestPolicy Source #
Create a value of CreateOriginRequestPolicy
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:originRequestPolicyConfig:CreateOriginRequestPolicy'
, createOriginRequestPolicy_originRequestPolicyConfig
- An origin request policy configuration.
Request Lenses
createOriginRequestPolicy_originRequestPolicyConfig :: Lens' CreateOriginRequestPolicy OriginRequestPolicyConfig Source #
An origin request policy configuration.
Destructuring the Response
data CreateOriginRequestPolicyResponse Source #
See: newCreateOriginRequestPolicyResponse
smart constructor.
CreateOriginRequestPolicyResponse' | |
|
Instances
newCreateOriginRequestPolicyResponse Source #
Create a value of CreateOriginRequestPolicyResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:eTag:CreateOriginRequestPolicyResponse'
, createOriginRequestPolicyResponse_eTag
- The current version of the origin request policy.
$sel:location:CreateOriginRequestPolicyResponse'
, createOriginRequestPolicyResponse_location
- The fully qualified URI of the origin request policy just created.
$sel:originRequestPolicy:CreateOriginRequestPolicyResponse'
, createOriginRequestPolicyResponse_originRequestPolicy
- An origin request policy.
$sel:httpStatus:CreateOriginRequestPolicyResponse'
, createOriginRequestPolicyResponse_httpStatus
- The response's http status code.
Response Lenses
createOriginRequestPolicyResponse_eTag :: Lens' CreateOriginRequestPolicyResponse (Maybe Text) Source #
The current version of the origin request policy.
createOriginRequestPolicyResponse_location :: Lens' CreateOriginRequestPolicyResponse (Maybe Text) Source #
The fully qualified URI of the origin request policy just created.
createOriginRequestPolicyResponse_originRequestPolicy :: Lens' CreateOriginRequestPolicyResponse (Maybe OriginRequestPolicy) Source #
An origin request policy.
createOriginRequestPolicyResponse_httpStatus :: Lens' CreateOriginRequestPolicyResponse Int Source #
The response's http status code.