@Generated(value="software.amazon.awssdk:codegen") public final class CORSRule extends Object implements SdkPojo, Serializable, ToCopyableBuilder<CORSRule.Builder,CORSRule>
Specifies a cross-origin access rule for an Amazon S3 bucket.
Modifier and Type | Class and Description |
---|---|
static interface |
CORSRule.Builder |
Modifier and Type | Method and Description |
---|---|
List<String> |
allowedHeaders()
Headers that are specified in the
Access-Control-Request-Headers header. |
List<String> |
allowedMethods()
An HTTP method that you allow the origin to execute.
|
List<String> |
allowedOrigins()
One or more origins you want customers to be able to access the bucket from.
|
static CORSRule.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
List<String> |
exposeHeaders()
One or more headers in the response that you want customers to be able to access from their applications (for
example, from a JavaScript
XMLHttpRequest object). |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasAllowedHeaders()
Returns true if the AllowedHeaders 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 |
hasAllowedMethods()
Returns true if the AllowedMethods 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 |
hasAllowedOrigins()
Returns true if the AllowedOrigins 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() |
String |
id()
Unique identifier for the rule.
|
Integer |
maxAgeSeconds()
The time in seconds that your browser is to cache the preflight response for the specified resource.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends CORSRule.Builder> |
serializableBuilderClass() |
CORSRule.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
copy
public final String id()
Unique identifier for the rule. The value cannot be longer than 255 characters.
public final boolean hasAllowedHeaders()
public final List<String> allowedHeaders()
Headers that are specified in the Access-Control-Request-Headers
header. These headers are allowed
in a preflight OPTIONS request. In response to any preflight OPTIONS request, Amazon S3 returns any requested
headers that are allowed.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasAllowedHeaders()
to see if a value was sent in this field.
Access-Control-Request-Headers
header. These headers are
allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, Amazon S3 returns
any requested headers that are allowed.public final boolean hasAllowedMethods()
public final List<String> allowedMethods()
An HTTP method that you allow the origin to execute. Valid values are GET
, PUT
,
HEAD
, POST
, and DELETE
.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasAllowedMethods()
to see if a value was sent in this field.
GET
, PUT
,
HEAD
, POST
, and DELETE
.public final boolean hasAllowedOrigins()
public final List<String> allowedOrigins()
One or more origins you want customers to be able to access the bucket from.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasAllowedOrigins()
to see if a value was sent in this field.
public final boolean hasExposeHeaders()
public final List<String> exposeHeaders()
One or more headers in the response that you want customers to be able to access from their applications (for
example, from a JavaScript XMLHttpRequest
object).
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.
XMLHttpRequest
object).public final Integer maxAgeSeconds()
The time in seconds that your browser is to cache the preflight response for the specified resource.
public CORSRule.Builder toBuilder()
toBuilder
in interface ToCopyableBuilder<CORSRule.Builder,CORSRule>
public static CORSRule.Builder builder()
public static Class<? extends CORSRule.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields
in interface SdkPojo
public final String toString()
Copyright © 2021. All rights reserved.