amazonka-lightsail-2.0: Amazon Lightsail SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

  • 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.

  • 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.
  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

Instances

Instances details
FromJSON CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

ToJSON 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 #

Read CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

Show CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

NFData CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

Methods

rnf :: CacheSettings -> () #

Eq CacheSettings Source # 
Instance details

Defined in Amazonka.Lightsail.Types.CacheSettings

Hashable 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" "amazonka-lightsail-2.0-77hvsZhtZFxFduYae8QaN0" 'False) (C1 ('MetaCons "CacheSettings'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "allowedHTTPMethods") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "cachedHTTPMethods") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "defaultTTL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "forwardedCookies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CookieObject)))) :*: ((S1 ('MetaSel ('Just "forwardedHeaders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe HeaderObject)) :*: S1 ('MetaSel ('Just "forwardedQueryStrings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe QueryStringObject))) :*: (S1 ('MetaSel ('Just "maximumTTL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "minimumTTL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer))))))

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: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: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: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: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: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.

$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: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.

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_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_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_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_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.

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_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.