@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Headers extends Object implements Serializable, Cloneable
A complex type that specifies the request headers, if any, that you want CloudFront to base caching on for this cache behavior.
For the headers that you specify, CloudFront caches separate versions of a specified object 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
CloudFront to cache your content based on values in the product
header. CloudFront forwards the
product
header to the origin and caches the response from the origin once for each header value. For
more information about caching based on header values, see How CloudFront Forwards
and Caches Headers in the Amazon CloudFront Developer Guide.
Constructor and Description |
---|
Headers() |
Modifier and Type | Method and Description |
---|---|
Headers |
clone() |
boolean |
equals(Object obj) |
List<String> |
getItems()
A list that contains one
Name element for each header that you want CloudFront to use for caching in
this cache behavior. |
Integer |
getQuantity()
The number of different headers that you want CloudFront to base caching on for this cache behavior.
|
int |
hashCode() |
void |
setItems(Collection<String> items)
A list that contains one
Name element for each header that you want CloudFront to use for caching in
this cache behavior. |
void |
setQuantity(Integer quantity)
The number of different headers that you want CloudFront to base caching on for this cache behavior.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
Headers |
withItems(Collection<String> items)
A list that contains one
Name element for each header that you want CloudFront to use for caching in
this cache behavior. |
Headers |
withItems(String... items)
A list that contains one
Name element for each header that you want CloudFront to use for caching in
this cache behavior. |
Headers |
withQuantity(Integer quantity)
The number of different headers that you want CloudFront to base caching on for this cache behavior.
|
public void setQuantity(Integer quantity)
The number of different headers that you want CloudFront to base caching on for this cache behavior. You can configure each cache behavior in a web distribution to do one of the following:
Forward all headers to your origin: Specify 1
for Quantity
and *
for Name
.
CloudFront doesn't cache the objects that are associated with this cache behavior. Instead, CloudFront sends every request to the origin.
Forward a whitelist of headers you specify: Specify the number of headers that you want CloudFront to base
caching on. Then specify the header names in Name
elements. CloudFront caches your objects based on
the values in the specified headers.
Forward only the default headers: Specify 0
for Quantity
and omit
Items
. In this configuration, CloudFront doesn't cache based on the values in the request headers.
Regardless of which option you choose, CloudFront forwards headers to your origin based on whether the origin is an S3 bucket or a custom origin. See the following documentation:
S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates
Custom origin: See HTTP Request Headers and CloudFront Behavior
quantity
- The number of different headers that you want CloudFront to base caching on for this cache behavior. You
can configure each cache behavior in a web distribution to do one of the following:
Forward all headers to your origin: Specify 1
for Quantity
and
*
for Name
.
CloudFront doesn't cache the objects that are associated with this cache behavior. Instead, CloudFront sends every request to the origin.
Forward a whitelist of headers you specify: Specify the number of headers that you want CloudFront
to base caching on. Then specify the header names in Name
elements. CloudFront caches your
objects based on the values in the specified headers.
Forward only the default headers: Specify 0
for Quantity
and omit
Items
. In this configuration, CloudFront doesn't cache based on the values in the request
headers.
Regardless of which option you choose, CloudFront forwards headers to your origin based on whether the origin is an S3 bucket or a custom origin. See the following documentation:
S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates
Custom origin: See HTTP Request Headers and CloudFront Behavior
public Integer getQuantity()
The number of different headers that you want CloudFront to base caching on for this cache behavior. You can configure each cache behavior in a web distribution to do one of the following:
Forward all headers to your origin: Specify 1
for Quantity
and *
for Name
.
CloudFront doesn't cache the objects that are associated with this cache behavior. Instead, CloudFront sends every request to the origin.
Forward a whitelist of headers you specify: Specify the number of headers that you want CloudFront to base
caching on. Then specify the header names in Name
elements. CloudFront caches your objects based on
the values in the specified headers.
Forward only the default headers: Specify 0
for Quantity
and omit
Items
. In this configuration, CloudFront doesn't cache based on the values in the request headers.
Regardless of which option you choose, CloudFront forwards headers to your origin based on whether the origin is an S3 bucket or a custom origin. See the following documentation:
S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates
Custom origin: See HTTP Request Headers and CloudFront Behavior
Forward all headers to your origin: Specify 1
for Quantity
and
*
for Name
.
CloudFront doesn't cache the objects that are associated with this cache behavior. Instead, CloudFront sends every request to the origin.
Forward a whitelist of headers you specify: Specify the number of headers that you want CloudFront
to base caching on. Then specify the header names in Name
elements. CloudFront caches your
objects based on the values in the specified headers.
Forward only the default headers: Specify 0
for Quantity
and omit
Items
. In this configuration, CloudFront doesn't cache based on the values in the request
headers.
Regardless of which option you choose, CloudFront forwards headers to your origin based on whether the origin is an S3 bucket or a custom origin. See the following documentation:
S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates
Custom origin: See HTTP Request Headers and CloudFront Behavior
public Headers withQuantity(Integer quantity)
The number of different headers that you want CloudFront to base caching on for this cache behavior. You can configure each cache behavior in a web distribution to do one of the following:
Forward all headers to your origin: Specify 1
for Quantity
and *
for Name
.
CloudFront doesn't cache the objects that are associated with this cache behavior. Instead, CloudFront sends every request to the origin.
Forward a whitelist of headers you specify: Specify the number of headers that you want CloudFront to base
caching on. Then specify the header names in Name
elements. CloudFront caches your objects based on
the values in the specified headers.
Forward only the default headers: Specify 0
for Quantity
and omit
Items
. In this configuration, CloudFront doesn't cache based on the values in the request headers.
Regardless of which option you choose, CloudFront forwards headers to your origin based on whether the origin is an S3 bucket or a custom origin. See the following documentation:
S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates
Custom origin: See HTTP Request Headers and CloudFront Behavior
quantity
- The number of different headers that you want CloudFront to base caching on for this cache behavior. You
can configure each cache behavior in a web distribution to do one of the following:
Forward all headers to your origin: Specify 1
for Quantity
and
*
for Name
.
CloudFront doesn't cache the objects that are associated with this cache behavior. Instead, CloudFront sends every request to the origin.
Forward a whitelist of headers you specify: Specify the number of headers that you want CloudFront
to base caching on. Then specify the header names in Name
elements. CloudFront caches your
objects based on the values in the specified headers.
Forward only the default headers: Specify 0
for Quantity
and omit
Items
. In this configuration, CloudFront doesn't cache based on the values in the request
headers.
Regardless of which option you choose, CloudFront forwards headers to your origin based on whether the origin is an S3 bucket or a custom origin. See the following documentation:
S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates
Custom origin: See HTTP Request Headers and CloudFront Behavior
public List<String> getItems()
A list that contains one Name
element for each header that you want CloudFront to use for caching in
this cache behavior. If Quantity
is 0
, omit Items
.
Name
element for each header that you want CloudFront to use for
caching in this cache behavior. If Quantity
is 0
, omit Items
.public void setItems(Collection<String> items)
A list that contains one Name
element for each header that you want CloudFront to use for caching in
this cache behavior. If Quantity
is 0
, omit Items
.
items
- A list that contains one Name
element for each header that you want CloudFront to use for
caching in this cache behavior. If Quantity
is 0
, omit Items
.public Headers withItems(String... items)
A list that contains one Name
element for each header that you want CloudFront to use for caching in
this cache behavior. If Quantity
is 0
, omit Items
.
NOTE: This method appends the values to the existing list (if any). Use
setItems(java.util.Collection)
or withItems(java.util.Collection)
if you want to override the
existing values.
items
- A list that contains one Name
element for each header that you want CloudFront to use for
caching in this cache behavior. If Quantity
is 0
, omit Items
.public Headers withItems(Collection<String> items)
A list that contains one Name
element for each header that you want CloudFront to use for caching in
this cache behavior. If Quantity
is 0
, omit Items
.
items
- A list that contains one Name
element for each header that you want CloudFront to use for
caching in this cache behavior. If Quantity
is 0
, omit Items
.public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.