@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AwsCorsConfiguration extends Object implements Serializable, Cloneable, StructuredPojo
Contains the cross-origin resource sharing (CORS) configuration for the API. CORS is only supported for HTTP APIs.
Constructor and Description |
---|
AwsCorsConfiguration() |
Modifier and Type | Method and Description |
---|---|
AwsCorsConfiguration |
clone() |
boolean |
equals(Object obj) |
Boolean |
getAllowCredentials()
Indicates whether the CORS request includes credentials.
|
List<String> |
getAllowHeaders()
The allowed headers for CORS requests.
|
List<String> |
getAllowMethods()
The allowed methods for CORS requests.
|
List<String> |
getAllowOrigins()
The allowed origins for CORS requests.
|
List<String> |
getExposeHeaders()
The exposed headers for CORS requests.
|
Integer |
getMaxAge()
The number of seconds for which the browser caches preflight request results.
|
int |
hashCode() |
Boolean |
isAllowCredentials()
Indicates whether the CORS request includes credentials.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAllowCredentials(Boolean allowCredentials)
Indicates whether the CORS request includes credentials.
|
void |
setAllowHeaders(Collection<String> allowHeaders)
The allowed headers for CORS requests.
|
void |
setAllowMethods(Collection<String> allowMethods)
The allowed methods for CORS requests.
|
void |
setAllowOrigins(Collection<String> allowOrigins)
The allowed origins for CORS requests.
|
void |
setExposeHeaders(Collection<String> exposeHeaders)
The exposed headers for CORS requests.
|
void |
setMaxAge(Integer maxAge)
The number of seconds for which the browser caches preflight request results.
|
String |
toString()
Returns a string representation of this object.
|
AwsCorsConfiguration |
withAllowCredentials(Boolean allowCredentials)
Indicates whether the CORS request includes credentials.
|
AwsCorsConfiguration |
withAllowHeaders(Collection<String> allowHeaders)
The allowed headers for CORS requests.
|
AwsCorsConfiguration |
withAllowHeaders(String... allowHeaders)
The allowed headers for CORS requests.
|
AwsCorsConfiguration |
withAllowMethods(Collection<String> allowMethods)
The allowed methods for CORS requests.
|
AwsCorsConfiguration |
withAllowMethods(String... allowMethods)
The allowed methods for CORS requests.
|
AwsCorsConfiguration |
withAllowOrigins(Collection<String> allowOrigins)
The allowed origins for CORS requests.
|
AwsCorsConfiguration |
withAllowOrigins(String... allowOrigins)
The allowed origins for CORS requests.
|
AwsCorsConfiguration |
withExposeHeaders(Collection<String> exposeHeaders)
The exposed headers for CORS requests.
|
AwsCorsConfiguration |
withExposeHeaders(String... exposeHeaders)
The exposed headers for CORS requests.
|
AwsCorsConfiguration |
withMaxAge(Integer maxAge)
The number of seconds for which the browser caches preflight request results.
|
public List<String> getAllowOrigins()
The allowed origins for CORS requests.
public void setAllowOrigins(Collection<String> allowOrigins)
The allowed origins for CORS requests.
allowOrigins
- The allowed origins for CORS requests.public AwsCorsConfiguration withAllowOrigins(String... allowOrigins)
The allowed origins for CORS requests.
NOTE: This method appends the values to the existing list (if any). Use
setAllowOrigins(java.util.Collection)
or withAllowOrigins(java.util.Collection)
if you want to
override the existing values.
allowOrigins
- The allowed origins for CORS requests.public AwsCorsConfiguration withAllowOrigins(Collection<String> allowOrigins)
The allowed origins for CORS requests.
allowOrigins
- The allowed origins for CORS requests.public void setAllowCredentials(Boolean allowCredentials)
Indicates whether the CORS request includes credentials.
allowCredentials
- Indicates whether the CORS request includes credentials.public Boolean getAllowCredentials()
Indicates whether the CORS request includes credentials.
public AwsCorsConfiguration withAllowCredentials(Boolean allowCredentials)
Indicates whether the CORS request includes credentials.
allowCredentials
- Indicates whether the CORS request includes credentials.public Boolean isAllowCredentials()
Indicates whether the CORS request includes credentials.
public List<String> getExposeHeaders()
The exposed headers for CORS requests.
public void setExposeHeaders(Collection<String> exposeHeaders)
The exposed headers for CORS requests.
exposeHeaders
- The exposed headers for CORS requests.public AwsCorsConfiguration withExposeHeaders(String... exposeHeaders)
The exposed headers for CORS requests.
NOTE: This method appends the values to the existing list (if any). Use
setExposeHeaders(java.util.Collection)
or withExposeHeaders(java.util.Collection)
if you want
to override the existing values.
exposeHeaders
- The exposed headers for CORS requests.public AwsCorsConfiguration withExposeHeaders(Collection<String> exposeHeaders)
The exposed headers for CORS requests.
exposeHeaders
- The exposed headers for CORS requests.public void setMaxAge(Integer maxAge)
The number of seconds for which the browser caches preflight request results.
maxAge
- The number of seconds for which the browser caches preflight request results.public Integer getMaxAge()
The number of seconds for which the browser caches preflight request results.
public AwsCorsConfiguration withMaxAge(Integer maxAge)
The number of seconds for which the browser caches preflight request results.
maxAge
- The number of seconds for which the browser caches preflight request results.public List<String> getAllowMethods()
The allowed methods for CORS requests.
public void setAllowMethods(Collection<String> allowMethods)
The allowed methods for CORS requests.
allowMethods
- The allowed methods for CORS requests.public AwsCorsConfiguration withAllowMethods(String... allowMethods)
The allowed methods for CORS requests.
NOTE: This method appends the values to the existing list (if any). Use
setAllowMethods(java.util.Collection)
or withAllowMethods(java.util.Collection)
if you want to
override the existing values.
allowMethods
- The allowed methods for CORS requests.public AwsCorsConfiguration withAllowMethods(Collection<String> allowMethods)
The allowed methods for CORS requests.
allowMethods
- The allowed methods for CORS requests.public List<String> getAllowHeaders()
The allowed headers for CORS requests.
public void setAllowHeaders(Collection<String> allowHeaders)
The allowed headers for CORS requests.
allowHeaders
- The allowed headers for CORS requests.public AwsCorsConfiguration withAllowHeaders(String... allowHeaders)
The allowed headers for CORS requests.
NOTE: This method appends the values to the existing list (if any). Use
setAllowHeaders(java.util.Collection)
or withAllowHeaders(java.util.Collection)
if you want to
override the existing values.
allowHeaders
- The allowed headers for CORS requests.public AwsCorsConfiguration withAllowHeaders(Collection<String> allowHeaders)
The allowed headers for CORS requests.
allowHeaders
- The allowed headers for CORS requests.public String toString()
toString
in class Object
Object.toString()
public AwsCorsConfiguration clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.