@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Headers extends Object implements Serializable, Cloneable
A complex type that specifies the headers that you want CloudFront to forward to the origin for this cache behavior.
For the headers that you specify, CloudFront also 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 complex type that contains one
Name element for each header that you want CloudFront to forward to
the origin and to vary on for this cache behavior. |
Integer |
getQuantity()
The number of different headers that you want CloudFront to forward to the origin for this cache behavior.
|
int |
hashCode() |
void |
setItems(Collection<String> items)
A complex type that contains one
Name element for each header that you want CloudFront to forward to
the origin and to vary on for this cache behavior. |
void |
setQuantity(Integer quantity)
The number of different headers that you want CloudFront to forward to the origin for this cache behavior.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
Headers |
withItems(Collection<String> items)
A complex type that contains one
Name element for each header that you want CloudFront to forward to
the origin and to vary on for this cache behavior. |
Headers |
withItems(String... items)
A complex type that contains one
Name element for each header that you want CloudFront to forward to
the origin and to vary on for this cache behavior. |
Headers |
withQuantity(Integer quantity)
The number of different headers that you want CloudFront to forward to the origin for this cache behavior.
|
public void setQuantity(Integer quantity)
The number of different headers that you want CloudFront to forward to the origin 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
.
If you configure CloudFront to forward all headers to your origin, CloudFront doesn't cache the objects associated with this cache behavior. Instead, it sends every request to the origin.
Forward a whitelist of headers you specify: Specify the number of headers that you want to forward, and
specify the header names in Name
elements. CloudFront caches your objects based on the values in all
of the specified headers. CloudFront also forwards the headers that it forwards by default, but it caches your
objects based only on the headers that you specify.
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.
quantity
- The number of different headers that you want CloudFront to forward to the origin 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
.
If you configure CloudFront to forward all headers to your origin, CloudFront doesn't cache the objects associated with this cache behavior. Instead, it sends every request to the origin.
Forward a whitelist of headers you specify: Specify the number of headers that you want to forward,
and specify the header names in Name
elements. CloudFront caches your objects based on the
values in all of the specified headers. CloudFront also forwards the headers that it forwards by default,
but it caches your objects based only on the headers that you specify.
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.
public Integer getQuantity()
The number of different headers that you want CloudFront to forward to the origin 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
.
If you configure CloudFront to forward all headers to your origin, CloudFront doesn't cache the objects associated with this cache behavior. Instead, it sends every request to the origin.
Forward a whitelist of headers you specify: Specify the number of headers that you want to forward, and
specify the header names in Name
elements. CloudFront caches your objects based on the values in all
of the specified headers. CloudFront also forwards the headers that it forwards by default, but it caches your
objects based only on the headers that you specify.
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.
Forward all headers to your origin: Specify 1
for Quantity
and
*
for Name
.
If you configure CloudFront to forward all headers to your origin, CloudFront doesn't cache the objects associated with this cache behavior. Instead, it sends every request to the origin.
Forward a whitelist of headers you specify: Specify the number of headers that you want to
forward, and specify the header names in Name
elements. CloudFront caches your objects based
on the values in all of the specified headers. CloudFront also forwards the headers that it forwards by
default, but it caches your objects based only on the headers that you specify.
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.
public Headers withQuantity(Integer quantity)
The number of different headers that you want CloudFront to forward to the origin 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
.
If you configure CloudFront to forward all headers to your origin, CloudFront doesn't cache the objects associated with this cache behavior. Instead, it sends every request to the origin.
Forward a whitelist of headers you specify: Specify the number of headers that you want to forward, and
specify the header names in Name
elements. CloudFront caches your objects based on the values in all
of the specified headers. CloudFront also forwards the headers that it forwards by default, but it caches your
objects based only on the headers that you specify.
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.
quantity
- The number of different headers that you want CloudFront to forward to the origin 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
.
If you configure CloudFront to forward all headers to your origin, CloudFront doesn't cache the objects associated with this cache behavior. Instead, it sends every request to the origin.
Forward a whitelist of headers you specify: Specify the number of headers that you want to forward,
and specify the header names in Name
elements. CloudFront caches your objects based on the
values in all of the specified headers. CloudFront also forwards the headers that it forwards by default,
but it caches your objects based only on the headers that you specify.
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.
public List<String> getItems()
A complex type that contains one Name
element for each header that you want CloudFront to forward to
the origin and to vary on for this cache behavior. If Quantity
is 0
, omit
Items
.
Name
element for each header that you want CloudFront to
forward to the origin and to vary on for this cache behavior. If Quantity
is 0
,
omit Items
.public void setItems(Collection<String> items)
A complex type that contains one Name
element for each header that you want CloudFront to forward to
the origin and to vary on for this cache behavior. If Quantity
is 0
, omit
Items
.
items
- A complex type that contains one Name
element for each header that you want CloudFront to
forward to the origin and to vary on for this cache behavior. If Quantity
is 0
,
omit Items
.public Headers withItems(String... items)
A complex type that contains one Name
element for each header that you want CloudFront to forward to
the origin and to vary on for 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 complex type that contains one Name
element for each header that you want CloudFront to
forward to the origin and to vary on for this cache behavior. If Quantity
is 0
,
omit Items
.public Headers withItems(Collection<String> items)
A complex type that contains one Name
element for each header that you want CloudFront to forward to
the origin and to vary on for this cache behavior. If Quantity
is 0
, omit
Items
.
items
- A complex type that contains one Name
element for each header that you want CloudFront to
forward to the origin and to vary on for 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.