public class AllowedMethods extends Object implements Serializable
A complex type that controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin. There are two options: - CloudFront forwards only GET and HEAD requests. - CloudFront forwards DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT requests. If you choose the second option, you may need to restrict access to your Amazon S3 bucket or to your custom origin so users can't perform operations that you don't want them to. For example, you may not want users to have permission to delete objects from your origin.
Constructor and Description |
---|
AllowedMethods() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
List<String> |
getItems()
A complex type that contains the HTTP methods that you want CloudFront
to process and forward to your origin.
|
Integer |
getQuantity()
The number of HTTP methods that you want CloudFront to forward to your
origin.
|
int |
hashCode() |
void |
setItems(Collection<String> items)
A complex type that contains the HTTP methods that you want CloudFront
to process and forward to your origin.
|
void |
setQuantity(Integer quantity)
The number of HTTP methods that you want CloudFront to forward to your
origin.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AllowedMethods |
withItems(Collection<String> items)
A complex type that contains the HTTP methods that you want CloudFront
to process and forward to your origin.
|
AllowedMethods |
withItems(Method... items)
A complex type that contains the HTTP methods that you want CloudFront
to process and forward to your origin.
|
AllowedMethods |
withItems(String... items)
A complex type that contains the HTTP methods that you want CloudFront
to process and forward to your origin.
|
AllowedMethods |
withQuantity(Integer quantity)
The number of HTTP methods that you want CloudFront to forward to your
origin.
|
public Integer getQuantity()
public void setQuantity(Integer quantity)
quantity
- The number of HTTP methods that you want CloudFront to forward to your
origin. Valid values are 2 (for GET and HEAD requests) and 7 (for
DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT requests).public AllowedMethods withQuantity(Integer quantity)
Returns a reference to this object so that method calls can be chained together.
quantity
- The number of HTTP methods that you want CloudFront to forward to your
origin. Valid values are 2 (for GET and HEAD requests) and 7 (for
DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT requests).public List<String> getItems()
public void setItems(Collection<String> items)
items
- A complex type that contains the HTTP methods that you want CloudFront
to process and forward to your origin.public AllowedMethods withItems(String... items)
Returns a reference to this object so that method calls can be chained together.
items
- A complex type that contains the HTTP methods that you want CloudFront
to process and forward to your origin.public AllowedMethods withItems(Collection<String> items)
Returns a reference to this object so that method calls can be chained together.
items
- A complex type that contains the HTTP methods that you want CloudFront
to process and forward to your origin.public AllowedMethods withItems(Method... items)
Returns a reference to this object so that method calls can be chained together.
items
- A complex type that contains the HTTP methods that you want CloudFront
to process and forward to your origin.public String toString()
toString
in class Object
Object.toString()
Copyright © 2014. All rights reserved.