@Generated(value="software.amazon.awssdk:codegen") public final class AwsCorsConfiguration extends Object implements SdkPojo, Serializable, ToCopyableBuilder<AwsCorsConfiguration.Builder,AwsCorsConfiguration>
Contains the cross-origin resource sharing (CORS) configuration for the API. CORS is only supported for HTTP APIs.
Modifier and Type | Class and Description |
---|---|
static interface |
AwsCorsConfiguration.Builder |
Modifier and Type | Method and Description |
---|---|
Boolean |
allowCredentials()
Indicates whether the CORS request includes credentials.
|
List<String> |
allowHeaders()
The allowed headers for CORS requests.
|
List<String> |
allowMethods()
The allowed methods for CORS requests.
|
List<String> |
allowOrigins()
The allowed origins for CORS requests.
|
static AwsCorsConfiguration.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj)
Indicates whether some other object is "equal to" this one by SDK fields.
|
List<String> |
exposeHeaders()
The exposed headers for CORS requests.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasAllowHeaders()
Returns true if the AllowHeaders property was specified by the sender (it may be empty), or false if the sender
did not specify the value (it will be empty).
|
boolean |
hasAllowMethods()
Returns true if the AllowMethods property was specified by the sender (it may be empty), or false if the sender
did not specify the value (it will be empty).
|
boolean |
hasAllowOrigins()
Returns true if the AllowOrigins property was specified by the sender (it may be empty), or false if the sender
did not specify the value (it will be empty).
|
boolean |
hasExposeHeaders()
Returns true if the ExposeHeaders property was specified by the sender (it may be empty), or false if the sender
did not specify the value (it will be empty).
|
int |
hashCode() |
Integer |
maxAge()
The number of seconds for which the browser caches preflight request results.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends AwsCorsConfiguration.Builder> |
serializableBuilderClass() |
AwsCorsConfiguration.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString()
Returns a string representation of this object.
|
copy
public final boolean hasAllowOrigins()
public final List<String> allowOrigins()
The allowed origins for CORS requests.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasAllowOrigins()
to see if a value was sent in this field.
public final Boolean allowCredentials()
Indicates whether the CORS request includes credentials.
public final boolean hasExposeHeaders()
public final List<String> exposeHeaders()
The exposed headers for CORS requests.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasExposeHeaders()
to see if a value was sent in this field.
public final Integer maxAge()
The number of seconds for which the browser caches preflight request results.
public final boolean hasAllowMethods()
public final List<String> allowMethods()
The allowed methods for CORS requests.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasAllowMethods()
to see if a value was sent in this field.
public final boolean hasAllowHeaders()
public final List<String> allowHeaders()
The allowed headers for CORS requests.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasAllowHeaders()
to see if a value was sent in this field.
public AwsCorsConfiguration.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<AwsCorsConfiguration.Builder,AwsCorsConfiguration>
public static AwsCorsConfiguration.Builder builder()
public static Class<? extends AwsCorsConfiguration.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
SdkPojo
SdkPojo
class,
and is generated based on a service model.
If an SdkPojo
class does not have any inherited fields, equalsBySdkFields
and equals
are essentially the same.
equalsBySdkFields
in interface SdkPojo
obj
- the object to be compared withpublic final String toString()
Copyright © 2021 Amazon Web Services, Inc. All Rights Reserved.