libZSservicesZSamazonka-lightsailZSamazonka-lightsail
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.Lightsail.Types.CacheSettings

Description

 
Synopsis

Documentation

data CacheSettings Source #

Describes the cache settings of an Amazon Lightsail content delivery network (CDN) distribution.

These settings apply only to your distribution's cacheBehaviors (including the defaultCacheBehavior) that have a behavior of cache.

See: newCacheSettings smart constructor.

Constructors

CacheSettings' 

Fields

  • maximumTTL :: Maybe Integer

    The maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.

    The value specified applies only when the origin adds HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects.

  • cachedHTTPMethods :: Maybe Text

    The HTTP method responses that are cached by your distribution.

    You can specify the following options:

    • GET,HEAD - The distribution caches responses to the GET and HEAD methods.
    • GET,HEAD,OPTIONS - The distribution caches responses to the GET, HEAD, and OPTIONS methods.
  • forwardedCookies :: Maybe CookieObject

    An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.

  • allowedHTTPMethods :: Maybe Text

    The HTTP methods that are processed and forwarded to the distribution's origin.

    You can specify the following options:

    • GET,HEAD - The distribution forwards the GET and HEAD methods.
    • GET,HEAD,OPTIONS - The distribution forwards the GET, HEAD, and OPTIONS methods.
    • GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE - The distribution forwards the GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE methods.

    If you specify the third option, you might need to restrict access to your distribution's origin so users can't perform operations that you don't want them to. For example, you might not want users to have permission to delete objects from your origin.

  • defaultTTL :: Maybe Integer

    The default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.

    The value specified applies only when the origin does not add HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects.

  • minimumTTL :: Maybe Integer

    The minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.

    A value of 0 must be specified for minimumTTL if the distribution is configured to forward all headers to the origin.

  • forwardedHeaders :: Maybe HeaderObject

    An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.

  • forwardedQueryStrings :: Maybe QueryStringObject

    An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded.

Instances

Instances details
Eq CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

Read CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

Show CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

Generic CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

Associated Types

type Rep CacheSettings :: Type -> Type #

NFData CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

Methods

rnf :: CacheSettings -> () #

Hashable CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

ToJSON CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

FromJSON CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

type Rep CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

type Rep CacheSettings = D1 ('MetaData "CacheSettings" "Amazonka.Lightsail.Types.CacheSettings" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "CacheSettings'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "maximumTTL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "cachedHTTPMethods") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "forwardedCookies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CookieObject)) :*: S1 ('MetaSel ('Just "allowedHTTPMethods") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "defaultTTL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "minimumTTL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer))) :*: (S1 ('MetaSel ('Just "forwardedHeaders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe HeaderObject)) :*: S1 ('MetaSel ('Just "forwardedQueryStrings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe QueryStringObject))))))

newCacheSettings :: CacheSettings Source #

Create a value of CacheSettings 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:maximumTTL:CacheSettings', cacheSettings_maximumTTL - The maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.

The value specified applies only when the origin adds HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects.

$sel:cachedHTTPMethods:CacheSettings', cacheSettings_cachedHTTPMethods - The HTTP method responses that are cached by your distribution.

You can specify the following options:

  • GET,HEAD - The distribution caches responses to the GET and HEAD methods.
  • GET,HEAD,OPTIONS - The distribution caches responses to the GET, HEAD, and OPTIONS methods.

$sel:forwardedCookies:CacheSettings', cacheSettings_forwardedCookies - An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.

$sel:allowedHTTPMethods:CacheSettings', cacheSettings_allowedHTTPMethods - The HTTP methods that are processed and forwarded to the distribution's origin.

You can specify the following options:

  • GET,HEAD - The distribution forwards the GET and HEAD methods.
  • GET,HEAD,OPTIONS - The distribution forwards the GET, HEAD, and OPTIONS methods.
  • GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE - The distribution forwards the GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE methods.

If you specify the third option, you might need to restrict access to your distribution's origin so users can't perform operations that you don't want them to. For example, you might not want users to have permission to delete objects from your origin.

$sel:defaultTTL:CacheSettings', cacheSettings_defaultTTL - The default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.

The value specified applies only when the origin does not add HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects.

$sel:minimumTTL:CacheSettings', cacheSettings_minimumTTL - The minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.

A value of 0 must be specified for minimumTTL if the distribution is configured to forward all headers to the origin.

$sel:forwardedHeaders:CacheSettings', cacheSettings_forwardedHeaders - An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.

$sel:forwardedQueryStrings:CacheSettings', cacheSettings_forwardedQueryStrings - An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded.

cacheSettings_maximumTTL :: Lens' CacheSettings (Maybe Integer) Source #

The maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.

The value specified applies only when the origin adds HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects.

cacheSettings_cachedHTTPMethods :: Lens' CacheSettings (Maybe Text) Source #

The HTTP method responses that are cached by your distribution.

You can specify the following options:

  • GET,HEAD - The distribution caches responses to the GET and HEAD methods.
  • GET,HEAD,OPTIONS - The distribution caches responses to the GET, HEAD, and OPTIONS methods.

cacheSettings_forwardedCookies :: Lens' CacheSettings (Maybe CookieObject) Source #

An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.

cacheSettings_allowedHTTPMethods :: Lens' CacheSettings (Maybe Text) Source #

The HTTP methods that are processed and forwarded to the distribution's origin.

You can specify the following options:

  • GET,HEAD - The distribution forwards the GET and HEAD methods.
  • GET,HEAD,OPTIONS - The distribution forwards the GET, HEAD, and OPTIONS methods.
  • GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE - The distribution forwards the GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE methods.

If you specify the third option, you might need to restrict access to your distribution's origin so users can't perform operations that you don't want them to. For example, you might not want users to have permission to delete objects from your origin.

cacheSettings_defaultTTL :: Lens' CacheSettings (Maybe Integer) Source #

The default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.

The value specified applies only when the origin does not add HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects.

cacheSettings_minimumTTL :: Lens' CacheSettings (Maybe Integer) Source #

The minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.

A value of 0 must be specified for minimumTTL if the distribution is configured to forward all headers to the origin.

cacheSettings_forwardedHeaders :: Lens' CacheSettings (Maybe HeaderObject) Source #

An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.

cacheSettings_forwardedQueryStrings :: Lens' CacheSettings (Maybe QueryStringObject) Source #

An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded.