@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.
ForwardValues
public 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.
ForwardValues
public 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.
ForwardValues
public 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.
ForwardValues
public List<String> getHeadersAllowList()
The specific headers to forward to your distribution's origin.
HeaderEnum
public 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.HeaderEnum
public 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.HeaderEnum
public 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.HeaderEnum
public 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.HeaderEnum
public String toString()
toString
in class Object
Object.toString()
public HeaderObject clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.