Class ResponseHeadersPolicyServerTimingHeadersConfig
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<ResponseHeadersPolicyServerTimingHeadersConfig.Builder,
ResponseHeadersPolicyServerTimingHeadersConfig>
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 Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
final Boolean
enabled()
A Boolean that determines whether CloudFront adds theServer-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.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final int
hashCode()
final Double
A number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add theServer-Timing
header to.static Class
<? extends ResponseHeadersPolicyServerTimingHeadersConfig.Builder> Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
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.- Returns:
- 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.
-
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 theServer-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.- Returns:
- 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 theServer-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.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<ResponseHeadersPolicyServerTimingHeadersConfig.Builder,
ResponseHeadersPolicyServerTimingHeadersConfig> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
public static Class<? extends ResponseHeadersPolicyServerTimingHeadersConfig.Builder> serializableBuilderClass() -
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
- Returns:
- The mapping between the field name and its corresponding field.
-