libZSservicesZSamazonka-cloudfrontZSamazonka-cloudfront
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CloudFront.CreateCachePolicy

Description

Creates a cache policy.

After you create a cache policy, you can attach it to one or more cache behaviors. When it’s attached to a cache behavior, the cache policy determines the following:

  • The values that CloudFront includes in the cache key. These values can include HTTP headers, cookies, and URL query strings. CloudFront uses the cache key to find an object in its cache that it can return to the viewer.
  • The default, minimum, and maximum time to live (TTL) values that you want objects to stay in the CloudFront cache.

The headers, cookies, and query strings that are included in the cache key are automatically included in requests that CloudFront sends to the origin. CloudFront sends a request when it can’t find an object in its cache that matches the request’s cache key. If you want to send values to the origin but not include them in the cache key, use OriginRequestPolicy.

For more information about cache policies, see Controlling the cache key in the Amazon CloudFront Developer Guide.

Synopsis

Creating a Request

data CreateCachePolicy Source #

See: newCreateCachePolicy smart constructor.

Constructors

CreateCachePolicy' 

Fields

Instances

Instances details
Eq CreateCachePolicy Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

Read CreateCachePolicy Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

Show CreateCachePolicy Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

Generic CreateCachePolicy Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

Associated Types

type Rep CreateCachePolicy :: Type -> Type #

NFData CreateCachePolicy Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

Methods

rnf :: CreateCachePolicy -> () #

Hashable CreateCachePolicy Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

AWSRequest CreateCachePolicy Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

Associated Types

type AWSResponse CreateCachePolicy #

ToHeaders CreateCachePolicy Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

ToPath CreateCachePolicy Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

ToQuery CreateCachePolicy Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

ToElement CreateCachePolicy Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

type Rep CreateCachePolicy Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

type Rep CreateCachePolicy = D1 ('MetaData "CreateCachePolicy" "Amazonka.CloudFront.CreateCachePolicy" "libZSservicesZSamazonka-cloudfrontZSamazonka-cloudfront" 'False) (C1 ('MetaCons "CreateCachePolicy'" 'PrefixI 'True) (S1 ('MetaSel ('Just "cachePolicyConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CachePolicyConfig)))
type AWSResponse CreateCachePolicy Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

newCreateCachePolicy Source #

Create a value of CreateCachePolicy 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:cachePolicyConfig:CreateCachePolicy', createCachePolicy_cachePolicyConfig - A cache policy configuration.

Request Lenses

Destructuring the Response

data CreateCachePolicyResponse Source #

See: newCreateCachePolicyResponse smart constructor.

Constructors

CreateCachePolicyResponse' 

Fields

Instances

Instances details
Eq CreateCachePolicyResponse Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

Read CreateCachePolicyResponse Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

Show CreateCachePolicyResponse Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

Generic CreateCachePolicyResponse Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

Associated Types

type Rep CreateCachePolicyResponse :: Type -> Type #

NFData CreateCachePolicyResponse Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

type Rep CreateCachePolicyResponse Source # 
Instance details

Defined in Amazonka.CloudFront.CreateCachePolicy

type Rep CreateCachePolicyResponse = D1 ('MetaData "CreateCachePolicyResponse" "Amazonka.CloudFront.CreateCachePolicy" "libZSservicesZSamazonka-cloudfrontZSamazonka-cloudfront" 'False) (C1 ('MetaCons "CreateCachePolicyResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "cachePolicy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CachePolicy)) :*: S1 ('MetaSel ('Just "eTag") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "location") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newCreateCachePolicyResponse Source #

Create a value of CreateCachePolicyResponse 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:cachePolicy:CreateCachePolicyResponse', createCachePolicyResponse_cachePolicy - A cache policy.

$sel:eTag:CreateCachePolicyResponse', createCachePolicyResponse_eTag - The current version of the cache policy.

$sel:location:CreateCachePolicyResponse', createCachePolicyResponse_location - The fully qualified URI of the cache policy just created.

$sel:httpStatus:CreateCachePolicyResponse', createCachePolicyResponse_httpStatus - The response's http status code.

Response Lenses

createCachePolicyResponse_eTag :: Lens' CreateCachePolicyResponse (Maybe Text) Source #

The current version of the cache policy.

createCachePolicyResponse_location :: Lens' CreateCachePolicyResponse (Maybe Text) Source #

The fully qualified URI of the cache policy just created.