Class ResponseHeadersPolicyServerTimingHeadersConfig
- java.lang.Object
-
- software.amazon.awssdk.services.cloudfront.model.ResponseHeadersPolicyServerTimingHeadersConfig
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<ResponseHeadersPolicyServerTimingHeadersConfig.Builder,ResponseHeadersPolicyServerTimingHeadersConfig>
@Generated("software.amazon.awssdk:codegen") public final class ResponseHeadersPolicyServerTimingHeadersConfig extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ResponseHeadersPolicyServerTimingHeadersConfig.Builder,ResponseHeadersPolicyServerTimingHeadersConfig>
A configuration for enabling the
Server-Timingheader 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-Timingheader 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 theServer-Timingheader 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceResponseHeadersPolicyServerTimingHeadersConfig.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResponseHeadersPolicyServerTimingHeadersConfig.Builderbuilder()Booleanenabled()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.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()DoublesamplingRate()A number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add theServer-Timingheader to.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends ResponseHeadersPolicyServerTimingHeadersConfig.Builder>serializableBuilderClass()ResponseHeadersPolicyServerTimingHeadersConfig.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
enabled
public final Boolean enabled()
A Boolean that determines whether CloudFront adds the
Server-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:
- A Boolean that determines whether CloudFront adds the
Server-Timingheader to HTTP responses that it sends in response to requests that match a cache behavior that's associated with this response headers policy.
-
samplingRate
public final Double samplingRate()
A number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add the
Server-Timingheader to. When you set the sampling rate to 100, CloudFront adds theServer-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.- Returns:
- A number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add the
Server-Timingheader to. When you set the sampling rate to 100, CloudFront adds theServer-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.
-
toBuilder
public ResponseHeadersPolicyServerTimingHeadersConfig.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<ResponseHeadersPolicyServerTimingHeadersConfig.Builder,ResponseHeadersPolicyServerTimingHeadersConfig>
-
builder
public static ResponseHeadersPolicyServerTimingHeadersConfig.Builder builder()
-
serializableBuilderClass
public static Class<? extends ResponseHeadersPolicyServerTimingHeadersConfig.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-