Class CfnDistributionPropsMixin.CacheSettingsProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.lightsail.CfnDistributionPropsMixin.CacheSettingsProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnDistributionPropsMixin.CacheSettingsProperty>
- Enclosing interface:
CfnDistributionPropsMixin.CacheSettingsProperty
@Stability(Stable)
public static final class CfnDistributionPropsMixin.CacheSettingsProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnDistributionPropsMixin.CacheSettingsProperty>
A builder for
CfnDistributionPropsMixin.CacheSettingsProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowedHttpMethods(String allowedHttpMethods) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getAllowedHttpMethods()build()Builds the configured instance.cachedHttpMethods(String cachedHttpMethods) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getCachedHttpMethods()defaultTtl(Number defaultTtl) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getDefaultTtl()forwardedCookies(CfnDistributionPropsMixin.CookieObjectProperty forwardedCookies) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getForwardedCookies()forwardedCookies(IResolvable forwardedCookies) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getForwardedCookies()forwardedHeaders(CfnDistributionPropsMixin.HeaderObjectProperty forwardedHeaders) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getForwardedHeaders()forwardedHeaders(IResolvable forwardedHeaders) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getForwardedHeaders()forwardedQueryStrings(CfnDistributionPropsMixin.QueryStringObjectProperty forwardedQueryStrings) forwardedQueryStrings(IResolvable forwardedQueryStrings) maximumTtl(Number maximumTtl) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getMaximumTtl()minimumTtl(Number minimumTtl) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getMinimumTtl()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allowedHttpMethods
@Stability(Stable) public CfnDistributionPropsMixin.CacheSettingsProperty.Builder allowedHttpMethods(String allowedHttpMethods) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getAllowedHttpMethods()- Parameters:
allowedHttpMethods- The HTTP methods that are processed and forwarded to the distribution's origin. You can specify the following options:GET,HEAD- The distribution forwards theGETandHEADmethods.GET,HEAD,OPTIONS- The distribution forwards theGET,HEAD, andOPTIONSmethods.GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE- The distribution forwards theGET,HEAD,OPTIONS,PUT,PATCH,POST, andDELETEmethods.
If you specify
GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE, you might need to restrict access to your distribution's origin so users can't perform operations that you don't want them to. For example, you might not want users to have permission to delete objects from your origin.- Returns:
this
-
cachedHttpMethods
@Stability(Stable) public CfnDistributionPropsMixin.CacheSettingsProperty.Builder cachedHttpMethods(String cachedHttpMethods) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getCachedHttpMethods()- Parameters:
cachedHttpMethods- The HTTP method responses that are cached by your distribution. You can specify the following options:GET,HEAD- The distribution caches responses to theGETandHEADmethods.GET,HEAD,OPTIONS- The distribution caches responses to theGET,HEAD, andOPTIONSmethods.
- Returns:
this
-
defaultTtl
@Stability(Stable) public CfnDistributionPropsMixin.CacheSettingsProperty.Builder defaultTtl(Number defaultTtl) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getDefaultTtl()- Parameters:
defaultTtl- The default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.The value specified applies only when the origin does not add HTTP headers such as
Cache-Control max-age,Cache-Control s-maxage, andExpiresto objects.- Returns:
this
-
forwardedCookies
@Stability(Stable) public CfnDistributionPropsMixin.CacheSettingsProperty.Builder forwardedCookies(IResolvable forwardedCookies) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getForwardedCookies()- Parameters:
forwardedCookies- An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.- Returns:
this
-
forwardedCookies
@Stability(Stable) public CfnDistributionPropsMixin.CacheSettingsProperty.Builder forwardedCookies(CfnDistributionPropsMixin.CookieObjectProperty forwardedCookies) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getForwardedCookies()- Parameters:
forwardedCookies- An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.- Returns:
this
-
forwardedHeaders
@Stability(Stable) public CfnDistributionPropsMixin.CacheSettingsProperty.Builder forwardedHeaders(IResolvable forwardedHeaders) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getForwardedHeaders()- Parameters:
forwardedHeaders- An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.- Returns:
this
-
forwardedHeaders
@Stability(Stable) public CfnDistributionPropsMixin.CacheSettingsProperty.Builder forwardedHeaders(CfnDistributionPropsMixin.HeaderObjectProperty forwardedHeaders) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getForwardedHeaders()- Parameters:
forwardedHeaders- An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.- Returns:
this
-
forwardedQueryStrings
@Stability(Stable) public CfnDistributionPropsMixin.CacheSettingsProperty.Builder forwardedQueryStrings(IResolvable forwardedQueryStrings) - Parameters:
forwardedQueryStrings- An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded.- Returns:
this
-
forwardedQueryStrings
@Stability(Stable) public CfnDistributionPropsMixin.CacheSettingsProperty.Builder forwardedQueryStrings(CfnDistributionPropsMixin.QueryStringObjectProperty forwardedQueryStrings) - Parameters:
forwardedQueryStrings- An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded.- Returns:
this
-
maximumTtl
@Stability(Stable) public CfnDistributionPropsMixin.CacheSettingsProperty.Builder maximumTtl(Number maximumTtl) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getMaximumTtl()- Parameters:
maximumTtl- The maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated. The value specified applies only when the origin adds HTTP headers such asCache-Control max-age,Cache-Control s-maxage, andExpiresto objects.- Returns:
this
-
minimumTtl
@Stability(Stable) public CfnDistributionPropsMixin.CacheSettingsProperty.Builder minimumTtl(Number minimumTtl) Sets the value ofCfnDistributionPropsMixin.CacheSettingsProperty.getMinimumTtl()- Parameters:
minimumTtl- The minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated. A value of0must be specified forminimumTTLif the distribution is configured to forward all headers to the origin.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnDistributionPropsMixin.CacheSettingsProperty>- Returns:
- a new instance of
CfnDistributionPropsMixin.CacheSettingsProperty - Throws:
NullPointerException- if any required attribute was not provided
-