Interface CORSRule.Builder
-
- All Superinterfaces:
Buildable
,CopyableBuilder<CORSRule.Builder,CORSRule>
,SdkBuilder<CORSRule.Builder,CORSRule>
,SdkPojo
- Enclosing class:
- CORSRule
public static interface CORSRule.Builder extends SdkPojo, CopyableBuilder<CORSRule.Builder,CORSRule>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CORSRule.Builder
allowedHeaders(String... allowedHeaders)
Headers that are specified in theAccess-Control-Request-Headers
header.CORSRule.Builder
allowedHeaders(Collection<String> allowedHeaders)
Headers that are specified in theAccess-Control-Request-Headers
header.CORSRule.Builder
allowedMethods(String... allowedMethods)
An HTTP method that you allow the origin to execute.CORSRule.Builder
allowedMethods(Collection<String> allowedMethods)
An HTTP method that you allow the origin to execute.CORSRule.Builder
allowedOrigins(String... allowedOrigins)
One or more origins you want customers to be able to access the bucket from.CORSRule.Builder
allowedOrigins(Collection<String> allowedOrigins)
One or more origins you want customers to be able to access the bucket from.CORSRule.Builder
exposeHeaders(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 JavaScriptXMLHttpRequest
object).CORSRule.Builder
exposeHeaders(Collection<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 JavaScriptXMLHttpRequest
object).CORSRule.Builder
id(String id)
Unique identifier for the rule.CORSRule.Builder
maxAgeSeconds(Integer maxAgeSeconds)
The time in seconds that your browser is to cache the preflight response for the specified resource.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
id
CORSRule.Builder id(String id)
Unique identifier for the rule. The value cannot be longer than 255 characters.
- Parameters:
id
- Unique identifier for the rule. The value cannot be longer than 255 characters.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowedHeaders
CORSRule.Builder allowedHeaders(Collection<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.- Parameters:
allowedHeaders
- Headers that are specified in theAccess-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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowedHeaders
CORSRule.Builder allowedHeaders(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.- Parameters:
allowedHeaders
- Headers that are specified in theAccess-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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowedMethods
CORSRule.Builder allowedMethods(Collection<String> allowedMethods)
An HTTP method that you allow the origin to execute. Valid values are
GET
,PUT
,HEAD
,POST
, andDELETE
.- Parameters:
allowedMethods
- An HTTP method that you allow the origin to execute. Valid values areGET
,PUT
,HEAD
,POST
, andDELETE
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowedMethods
CORSRule.Builder allowedMethods(String... allowedMethods)
An HTTP method that you allow the origin to execute. Valid values are
GET
,PUT
,HEAD
,POST
, andDELETE
.- Parameters:
allowedMethods
- An HTTP method that you allow the origin to execute. Valid values areGET
,PUT
,HEAD
,POST
, andDELETE
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowedOrigins
CORSRule.Builder allowedOrigins(Collection<String> allowedOrigins)
One or more origins you want customers to be able to access the bucket from.
- Parameters:
allowedOrigins
- One or more origins you want customers to be able to access the bucket from.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowedOrigins
CORSRule.Builder allowedOrigins(String... allowedOrigins)
One or more origins you want customers to be able to access the bucket from.
- Parameters:
allowedOrigins
- One or more origins you want customers to be able to access the bucket from.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
exposeHeaders
CORSRule.Builder exposeHeaders(Collection<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).- Parameters:
exposeHeaders
- One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScriptXMLHttpRequest
object).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
exposeHeaders
CORSRule.Builder exposeHeaders(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).- Parameters:
exposeHeaders
- One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScriptXMLHttpRequest
object).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
maxAgeSeconds
CORSRule.Builder maxAgeSeconds(Integer maxAgeSeconds)
The time in seconds that your browser is to cache the preflight response for the specified resource.
- Parameters:
maxAgeSeconds
- The time in seconds that your browser is to cache the preflight response for the specified resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-