@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class HeaderObject extends Object implements Serializable, Cloneable, StructuredPojo
Describes the request headers that a Lightsail distribution bases caching on.
For the headers that you specify, your distribution caches separate versions of the specified content based on the
header values in viewer requests. For example, suppose viewer requests for logo.jpg contain a custom
product header that has a value of either acme or apex, and you configure your
distribution to cache your content based on values in the product header. Your distribution forwards the
product header to the origin and caches the response from the origin once for each header value.
| Constructor and Description |
|---|
HeaderObject() |
| Modifier and Type | Method and Description |
|---|---|
HeaderObject |
clone() |
boolean |
equals(Object obj) |
List<String> |
getHeadersAllowList()
The specific headers to forward to your distribution's origin.
|
String |
getOption()
The headers that you want your distribution to forward to your origin and base caching on.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller. |
void |
setHeadersAllowList(Collection<String> headersAllowList)
The specific headers to forward to your distribution's origin.
|
void |
setOption(String option)
The headers that you want your distribution to forward to your origin and base caching on.
|
String |
toString()
Returns a string representation of this object.
|
HeaderObject |
withHeadersAllowList(Collection<String> headersAllowList)
The specific headers to forward to your distribution's origin.
|
HeaderObject |
withHeadersAllowList(HeaderEnum... headersAllowList)
The specific headers to forward to your distribution's origin.
|
HeaderObject |
withHeadersAllowList(String... headersAllowList)
The specific headers to forward to your distribution's origin.
|
HeaderObject |
withOption(ForwardValues option)
The headers that you want your distribution to forward to your origin and base caching on.
|
HeaderObject |
withOption(String option)
The headers that you want your distribution to forward to your origin and base caching on.
|
public void setOption(String option)
The headers that you want your distribution to forward to your origin and base caching on.
You can configure your distribution to do one of the following:
all - Forward all headers to your origin.
none - Forward only the default headers.
allow-list - Forward only the headers you specify using the headersAllowList
parameter.
option - The headers that you want your distribution to forward to your origin and base caching on.
You can configure your distribution to do one of the following:
all - Forward all headers to your origin.
none - Forward only the default headers.
allow-list - Forward only the headers you specify using the
headersAllowList parameter.
ForwardValuespublic String getOption()
The headers that you want your distribution to forward to your origin and base caching on.
You can configure your distribution to do one of the following:
all - Forward all headers to your origin.
none - Forward only the default headers.
allow-list - Forward only the headers you specify using the headersAllowList
parameter.
You can configure your distribution to do one of the following:
all - Forward all headers to your origin.
none - Forward only the default headers.
allow-list - Forward only the headers you specify using the
headersAllowList parameter.
ForwardValuespublic HeaderObject withOption(String option)
The headers that you want your distribution to forward to your origin and base caching on.
You can configure your distribution to do one of the following:
all - Forward all headers to your origin.
none - Forward only the default headers.
allow-list - Forward only the headers you specify using the headersAllowList
parameter.
option - The headers that you want your distribution to forward to your origin and base caching on.
You can configure your distribution to do one of the following:
all - Forward all headers to your origin.
none - Forward only the default headers.
allow-list - Forward only the headers you specify using the
headersAllowList parameter.
ForwardValuespublic HeaderObject withOption(ForwardValues option)
The headers that you want your distribution to forward to your origin and base caching on.
You can configure your distribution to do one of the following:
all - Forward all headers to your origin.
none - Forward only the default headers.
allow-list - Forward only the headers you specify using the headersAllowList
parameter.
option - The headers that you want your distribution to forward to your origin and base caching on.
You can configure your distribution to do one of the following:
all - Forward all headers to your origin.
none - Forward only the default headers.
allow-list - Forward only the headers you specify using the
headersAllowList parameter.
ForwardValuespublic List<String> getHeadersAllowList()
The specific headers to forward to your distribution's origin.
HeaderEnumpublic void setHeadersAllowList(Collection<String> headersAllowList)
The specific headers to forward to your distribution's origin.
headersAllowList - The specific headers to forward to your distribution's origin.HeaderEnumpublic HeaderObject withHeadersAllowList(String... headersAllowList)
The specific headers to forward to your distribution's origin.
NOTE: This method appends the values to the existing list (if any). Use
setHeadersAllowList(java.util.Collection) or withHeadersAllowList(java.util.Collection) if you
want to override the existing values.
headersAllowList - The specific headers to forward to your distribution's origin.HeaderEnumpublic HeaderObject withHeadersAllowList(Collection<String> headersAllowList)
The specific headers to forward to your distribution's origin.
headersAllowList - The specific headers to forward to your distribution's origin.HeaderEnumpublic HeaderObject withHeadersAllowList(HeaderEnum... headersAllowList)
The specific headers to forward to your distribution's origin.
headersAllowList - The specific headers to forward to your distribution's origin.HeaderEnumpublic String toString()
toString in class ObjectObject.toString()public HeaderObject clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojoProtocolMarshaller.marshall in interface StructuredPojoprotocolMarshaller - Implementation of ProtocolMarshaller used to marshall this object's data.