amazonka-cloudfront-2.0: Amazon CloudFront 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.CloudFront.Types.ResponseHeadersPolicyServerTimingHeadersConfig

Description

 
Synopsis

Documentation

data ResponseHeadersPolicyServerTimingHeadersConfig Source #

A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFront. CloudFront adds this header to HTTP responses that it sends in response to requests that match a cache behavior that's associated with this response headers policy.

You can use the Server-Timing header to view metrics that can help you gain insights about the behavior and performance of CloudFront. For example, you can see which cache layer served a cache hit, or the first byte latency from the origin when there was a cache miss. You can use the metrics in the Server-Timing header to troubleshoot issues or test the efficiency of your CloudFront configuration. For more information, see Server-Timing header in the Amazon CloudFront Developer Guide.

See: newResponseHeadersPolicyServerTimingHeadersConfig smart constructor.

Constructors

ResponseHeadersPolicyServerTimingHeadersConfig' 

Fields

  • samplingRate :: Maybe Double

    A number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add the Server-Timing header to. When you set the sampling rate to 100, CloudFront adds the Server-Timing header to the HTTP response for every request that matches the cache behavior that this response headers policy is attached to. When you set it to 50, CloudFront adds the header to 50% of the responses for requests that match the cache behavior. You can set the sampling rate to any number 0–100 with up to four decimal places.

  • enabled :: Bool

    A Boolean that determines whether CloudFront adds the Server-Timing header to HTTP responses that it sends in response to requests that match a cache behavior that's associated with this response headers policy.

Instances

Instances details
FromXML ResponseHeadersPolicyServerTimingHeadersConfig Source # 
Instance details

Defined in Amazonka.CloudFront.Types.ResponseHeadersPolicyServerTimingHeadersConfig

ToXML ResponseHeadersPolicyServerTimingHeadersConfig Source # 
Instance details

Defined in Amazonka.CloudFront.Types.ResponseHeadersPolicyServerTimingHeadersConfig

Generic ResponseHeadersPolicyServerTimingHeadersConfig Source # 
Instance details

Defined in Amazonka.CloudFront.Types.ResponseHeadersPolicyServerTimingHeadersConfig

Read ResponseHeadersPolicyServerTimingHeadersConfig Source # 
Instance details

Defined in Amazonka.CloudFront.Types.ResponseHeadersPolicyServerTimingHeadersConfig

Show ResponseHeadersPolicyServerTimingHeadersConfig Source # 
Instance details

Defined in Amazonka.CloudFront.Types.ResponseHeadersPolicyServerTimingHeadersConfig

NFData ResponseHeadersPolicyServerTimingHeadersConfig Source # 
Instance details

Defined in Amazonka.CloudFront.Types.ResponseHeadersPolicyServerTimingHeadersConfig

Eq ResponseHeadersPolicyServerTimingHeadersConfig Source # 
Instance details

Defined in Amazonka.CloudFront.Types.ResponseHeadersPolicyServerTimingHeadersConfig

Hashable ResponseHeadersPolicyServerTimingHeadersConfig Source # 
Instance details

Defined in Amazonka.CloudFront.Types.ResponseHeadersPolicyServerTimingHeadersConfig

type Rep ResponseHeadersPolicyServerTimingHeadersConfig Source # 
Instance details

Defined in Amazonka.CloudFront.Types.ResponseHeadersPolicyServerTimingHeadersConfig

type Rep ResponseHeadersPolicyServerTimingHeadersConfig = D1 ('MetaData "ResponseHeadersPolicyServerTimingHeadersConfig" "Amazonka.CloudFront.Types.ResponseHeadersPolicyServerTimingHeadersConfig" "amazonka-cloudfront-2.0-8Jb7luniAuUfLdUxCxW4K" 'False) (C1 ('MetaCons "ResponseHeadersPolicyServerTimingHeadersConfig'" 'PrefixI 'True) (S1 ('MetaSel ('Just "samplingRate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Double)) :*: S1 ('MetaSel ('Just "enabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)))

newResponseHeadersPolicyServerTimingHeadersConfig Source #

Create a value of ResponseHeadersPolicyServerTimingHeadersConfig 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:samplingRate:ResponseHeadersPolicyServerTimingHeadersConfig', responseHeadersPolicyServerTimingHeadersConfig_samplingRate - A number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add the Server-Timing header to. When you set the sampling rate to 100, CloudFront adds the Server-Timing header to the HTTP response for every request that matches the cache behavior that this response headers policy is attached to. When you set it to 50, CloudFront adds the header to 50% of the responses for requests that match the cache behavior. You can set the sampling rate to any number 0–100 with up to four decimal places.

$sel:enabled:ResponseHeadersPolicyServerTimingHeadersConfig', responseHeadersPolicyServerTimingHeadersConfig_enabled - A Boolean that determines whether CloudFront adds the Server-Timing header to HTTP responses that it sends in response to requests that match a cache behavior that's associated with this response headers policy.

responseHeadersPolicyServerTimingHeadersConfig_samplingRate :: Lens' ResponseHeadersPolicyServerTimingHeadersConfig (Maybe Double) Source #

A number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add the Server-Timing header to. When you set the sampling rate to 100, CloudFront adds the Server-Timing header to the HTTP response for every request that matches the cache behavior that this response headers policy is attached to. When you set it to 50, CloudFront adds the header to 50% of the responses for requests that match the cache behavior. You can set the sampling rate to any number 0–100 with up to four decimal places.

responseHeadersPolicyServerTimingHeadersConfig_enabled :: Lens' ResponseHeadersPolicyServerTimingHeadersConfig Bool Source #

A Boolean that determines whether CloudFront adds the Server-Timing header to HTTP responses that it sends in response to requests that match a cache behavior that's associated with this response headers policy.