Interface CfnResponseHeadersPolicy.ServerTimingHeadersConfigProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnResponseHeadersPolicy.ServerTimingHeadersConfigProperty.Jsii$Proxy
- Enclosing class:
CfnResponseHeadersPolicy
@Stability(Stable)
public static interface CfnResponseHeadersPolicy.ServerTimingHeadersConfigProperty
extends software.amazon.jsii.JsiiSerializable
A configuration for enabling the
Server-Timing header in HTTP responses sent from CloudFront.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudfront.*;
ServerTimingHeadersConfigProperty serverTimingHeadersConfigProperty = ServerTimingHeadersConfigProperty.builder()
.enabled(false)
// the properties below are optional
.samplingRate(123)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classAn implementation forCfnResponseHeadersPolicy.ServerTimingHeadersConfigProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()A Boolean that determines whether CloudFront adds theServer-Timingheader to HTTP responses that it sends in response to requests that match a cache behavior that's associated with this response headers policy.default NumberA number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add theServer-Timingheader to.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEnabled
A Boolean that determines whether CloudFront adds theServer-Timingheader to HTTP responses that it sends in response to requests that match a cache behavior that's associated with this response headers policy.Returns union: either
BooleanorIResolvable- See Also:
-
getSamplingRate
A number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add theServer-Timingheader to.When you set the sampling rate to 100, CloudFront adds the
Server-Timingheader 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.- See Also:
-
builder
@Stability(Stable) static CfnResponseHeadersPolicy.ServerTimingHeadersConfigProperty.Builder builder()
-