public class Headers extends Object implements Serializable
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 given object based on the header values in viewer requests; this is known as varying on headers. 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 vary on the Product header. CloudFront forwards the Product header to the origin and caches the response from the origin once for each header value.
Constructor and Description |
---|
Headers() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
List<String> |
getItems()
Optional: A complex type that contains a 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 and to vary on for this cache behavior.
|
int |
hashCode() |
void |
setItems(Collection<String> items)
Optional: A complex type that contains a 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 and to vary on for this cache behavior.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Headers |
withItems(Collection<String> items)
Optional: A complex type that contains a 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)
Optional: A complex type that contains a 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 and to vary on for this cache behavior.
|
public Integer getQuantity()
public void setQuantity(Integer quantity)
quantity
- The number of different headers that you want CloudFront to forward to
the origin and to vary on for this cache behavior. The maximum number
of headers that you can specify by name is 10. If you want CloudFront
to forward all headers to the origin and vary on all of them, specify
1 for Quantity and * for Name. If you don't want CloudFront to forward
any additional headers to the origin or to vary on any headers,
specify 0 for Quantity and omit Items.public Headers withQuantity(Integer quantity)
Returns a reference to this object so that method calls can be chained together.
quantity
- The number of different headers that you want CloudFront to forward to
the origin and to vary on for this cache behavior. The maximum number
of headers that you can specify by name is 10. If you want CloudFront
to forward all headers to the origin and vary on all of them, specify
1 for Quantity and * for Name. If you don't want CloudFront to forward
any additional headers to the origin or to vary on any headers,
specify 0 for Quantity and omit Items.public List<String> getItems()
public void setItems(Collection<String> items)
items
- Optional: A complex type that contains a 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)
Returns a reference to this object so that method calls can be chained together.
items
- Optional: A complex type that contains a 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)
Returns a reference to this object so that method calls can be chained together.
items
- Optional: A complex type that contains a 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 © 2015. All rights reserved.