public static interface CacheSettings.Builder extends SdkPojo, CopyableBuilder<CacheSettings.Builder,CacheSettings>
Modifier and Type | Method and Description |
---|---|
CacheSettings.Builder |
allowedHTTPMethods(String allowedHTTPMethods)
The HTTP methods that are processed and forwarded to the distribution's origin.
|
CacheSettings.Builder |
cachedHTTPMethods(String cachedHTTPMethods)
The HTTP method responses that are cached by your distribution.
|
CacheSettings.Builder |
defaultTTL(Long 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.
|
default CacheSettings.Builder |
forwardedCookies(Consumer<CookieObject.Builder> forwardedCookies)
An object that describes the cookies that are forwarded to the origin.
|
CacheSettings.Builder |
forwardedCookies(CookieObject forwardedCookies)
An object that describes the cookies that are forwarded to the origin.
|
default CacheSettings.Builder |
forwardedHeaders(Consumer<HeaderObject.Builder> forwardedHeaders)
An object that describes the headers that are forwarded to the origin.
|
CacheSettings.Builder |
forwardedHeaders(HeaderObject forwardedHeaders)
An object that describes the headers that are forwarded to the origin.
|
default CacheSettings.Builder |
forwardedQueryStrings(Consumer<QueryStringObject.Builder> forwardedQueryStrings)
An object that describes the query strings that are forwarded to the origin.
|
CacheSettings.Builder |
forwardedQueryStrings(QueryStringObject forwardedQueryStrings)
An object that describes the query strings that are forwarded to the origin.
|
CacheSettings.Builder |
maximumTTL(Long 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.
|
CacheSettings.Builder |
minimumTTL(Long 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.
|
equalsBySdkFields, sdkFields
copy
applyMutation, build
CacheSettings.Builder defaultTTL(Long 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
, and Expires
to objects.
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
, and Expires
to
objects.
CacheSettings.Builder minimumTTL(Long 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 of 0
must be specified for minimumTTL
if the distribution is configured to
forward all headers to the origin.
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 of 0
must be specified for minimumTTL
if the distribution is
configured to forward all headers to the origin.
CacheSettings.Builder maximumTTL(Long 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 as Cache-Control max-age
, Cache-Control s-maxage
, and Expires
to objects.
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 as
Cache-Control max-age
, Cache-Control s-maxage
, and Expires
to
objects.
CacheSettings.Builder allowedHTTPMethods(String 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 the GET
and HEAD
methods.
GET,HEAD,OPTIONS
- The distribution forwards the GET
, HEAD
, and
OPTIONS
methods.
GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
- The distribution forwards the GET
,
HEAD
, OPTIONS
, PUT
, PATCH
, POST
, and
DELETE
methods.
If you specify the third option, 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.
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 the GET
and HEAD
methods.
GET,HEAD,OPTIONS
- The distribution forwards the GET
, HEAD
, and
OPTIONS
methods.
GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
- The distribution forwards the GET
,
HEAD
, OPTIONS
, PUT
, PATCH
, POST
, and
DELETE
methods.
If you specify the third option, 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.
CacheSettings.Builder cachedHTTPMethods(String cachedHTTPMethods)
The HTTP method responses that are cached by your distribution.
You can specify the following options:
GET,HEAD
- The distribution caches responses to the GET
and HEAD
methods.
GET,HEAD,OPTIONS
- The distribution caches responses to the GET
, HEAD
,
and OPTIONS
methods.
cachedHTTPMethods
- The HTTP method responses that are cached by your distribution.
You can specify the following options:
GET,HEAD
- The distribution caches responses to the GET
and
HEAD
methods.
GET,HEAD,OPTIONS
- The distribution caches responses to the GET
,
HEAD
, and OPTIONS
methods.
CacheSettings.Builder forwardedCookies(CookieObject forwardedCookies)
An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
forwardedCookies
- An object that describes the cookies that are forwarded to the origin. Your content is cached based on
the cookies that are forwarded.default CacheSettings.Builder forwardedCookies(Consumer<CookieObject.Builder> forwardedCookies)
An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
This is a convenience that creates an instance of theCookieObject.Builder
avoiding the need to
create one manually via CookieObject.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately and its
result is passed to forwardedCookies(CookieObject)
.forwardedCookies
- a consumer that will call methods on CookieObject.Builder
forwardedCookies(CookieObject)
CacheSettings.Builder forwardedHeaders(HeaderObject forwardedHeaders)
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
forwardedHeaders
- An object that describes the headers that are forwarded to the origin. Your content is cached based on
the headers that are forwarded.default CacheSettings.Builder forwardedHeaders(Consumer<HeaderObject.Builder> forwardedHeaders)
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
This is a convenience that creates an instance of theHeaderObject.Builder
avoiding the need to
create one manually via HeaderObject.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately and its
result is passed to forwardedHeaders(HeaderObject)
.forwardedHeaders
- a consumer that will call methods on HeaderObject.Builder
forwardedHeaders(HeaderObject)
CacheSettings.Builder forwardedQueryStrings(QueryStringObject 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.
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.default CacheSettings.Builder forwardedQueryStrings(Consumer<QueryStringObject.Builder> 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.
This is a convenience that creates an instance of theQueryStringObject.Builder
avoiding the need to
create one manually via QueryStringObject.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately and its
result is passed to forwardedQueryStrings(QueryStringObject)
.forwardedQueryStrings
- a consumer that will call methods on QueryStringObject.Builder
forwardedQueryStrings(QueryStringObject)
Copyright © 2021 Amazon Web Services, Inc. All Rights Reserved.