Class CfnResponseHeadersPolicyPropsMixin.ServerTimingHeadersConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.cloudfront.CfnResponseHeadersPolicyPropsMixin.ServerTimingHeadersConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnResponseHeadersPolicyPropsMixin.ServerTimingHeadersConfigProperty>
- Enclosing interface:
CfnResponseHeadersPolicyPropsMixin.ServerTimingHeadersConfigProperty
@Stability(Stable)
public static final class CfnResponseHeadersPolicyPropsMixin.ServerTimingHeadersConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnResponseHeadersPolicyPropsMixin.ServerTimingHeadersConfigProperty>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.enabled(IResolvable enabled) samplingRate(Number samplingRate)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
enabled
@Stability(Stable) public CfnResponseHeadersPolicyPropsMixin.ServerTimingHeadersConfigProperty.Builder enabled(Boolean enabled) - Parameters:
enabled- 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:
this
-
enabled
@Stability(Stable) public CfnResponseHeadersPolicyPropsMixin.ServerTimingHeadersConfigProperty.Builder enabled(IResolvable enabled) - Parameters:
enabled- 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:
this
-
samplingRate
@Stability(Stable) public CfnResponseHeadersPolicyPropsMixin.ServerTimingHeadersConfigProperty.Builder samplingRate(Number samplingRate) Sets the value ofCfnResponseHeadersPolicyPropsMixin.ServerTimingHeadersConfigProperty.getSamplingRate()- Parameters:
samplingRate- 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 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:
this
-
build
@Stability(Stable) public CfnResponseHeadersPolicyPropsMixin.ServerTimingHeadersConfigProperty build()Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnResponseHeadersPolicyPropsMixin.ServerTimingHeadersConfigProperty>- Returns:
- a new instance of
CfnResponseHeadersPolicyPropsMixin.ServerTimingHeadersConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-