Interface BucketCorsRule.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<BucketCorsRule.Builder,
,BucketCorsRule> SdkBuilder<BucketCorsRule.Builder,
,BucketCorsRule> SdkPojo
- Enclosing class:
BucketCorsRule
-
Method Summary
Modifier and TypeMethodDescriptionallowedHeaders
(String... allowedHeaders) Headers that are specified in theAccess-Control-Request-Headers
header.allowedHeaders
(Collection<String> allowedHeaders) Headers that are specified in theAccess-Control-Request-Headers
header.allowedMethods
(String... allowedMethods) The HTTP methods that are allowed when accessing the bucket from the specified origin.allowedMethods
(Collection<String> allowedMethods) The HTTP methods that are allowed when accessing the bucket from the specified origin.allowedOrigins
(String... allowedOrigins) One or more origins you want customers to be able to access the bucket from.allowedOrigins
(Collection<String> allowedOrigins) One or more origins you want customers to be able to access the bucket from.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).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).A unique identifier for the CORS rule.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 Details
-
id
A unique identifier for the CORS rule. The ID value can be up to 255 characters long. The IDs help you find a rule in the configuration.
- Parameters:
id
- A unique identifier for the CORS rule. The ID value can be up to 255 characters long. The IDs help you find a rule in the configuration.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowedMethods
The HTTP methods that are allowed when accessing the bucket from the specified origin. Each CORS rule must identify at least one origin and one method.
You can use the following HTTP methods:
-
GET
- Retrieves data from the server, such as downloading files or viewing content. -
PUT
- Uploads or replaces data on the server, such as uploading new files. -
POST
- Sends data to the server for processing, such as submitting forms or creating new resources. -
DELETE
- Removes data from the server, such as deleting files or resources. -
HEAD
- Retrieves only the headers from the server without the actual content, useful for checking if a resource exists.
- Parameters:
allowedMethods
- The HTTP methods that are allowed when accessing the bucket from the specified origin. Each CORS rule must identify at least one origin and one method.You can use the following HTTP methods:
-
GET
- Retrieves data from the server, such as downloading files or viewing content. -
PUT
- Uploads or replaces data on the server, such as uploading new files. -
POST
- Sends data to the server for processing, such as submitting forms or creating new resources. -
DELETE
- Removes data from the server, such as deleting files or resources. -
HEAD
- Retrieves only the headers from the server without the actual content, useful for checking if a resource exists.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
allowedMethods
The HTTP methods that are allowed when accessing the bucket from the specified origin. Each CORS rule must identify at least one origin and one method.
You can use the following HTTP methods:
-
GET
- Retrieves data from the server, such as downloading files or viewing content. -
PUT
- Uploads or replaces data on the server, such as uploading new files. -
POST
- Sends data to the server for processing, such as submitting forms or creating new resources. -
DELETE
- Removes data from the server, such as deleting files or resources. -
HEAD
- Retrieves only the headers from the server without the actual content, useful for checking if a resource exists.
- Parameters:
allowedMethods
- The HTTP methods that are allowed when accessing the bucket from the specified origin. Each CORS rule must identify at least one origin and one method.You can use the following HTTP methods:
-
GET
- Retrieves data from the server, such as downloading files or viewing content. -
PUT
- Uploads or replaces data on the server, such as uploading new files. -
POST
- Sends data to the server for processing, such as submitting forms or creating new resources. -
DELETE
- Removes data from the server, such as deleting files or resources. -
HEAD
- Retrieves only the headers from the server without the actual content, useful for checking if a resource exists.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
allowedOrigins
One or more origins you want customers to be able to access the bucket from. Each CORS rule must identify at least one origin and one method.
- Parameters:
allowedOrigins
- One or more origins you want customers to be able to access the bucket from. Each CORS rule must identify at least one origin and one method.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowedOrigins
One or more origins you want customers to be able to access the bucket from. Each CORS rule must identify at least one origin and one method.
- Parameters:
allowedOrigins
- One or more origins you want customers to be able to access the bucket from. Each CORS rule must identify at least one origin and one method.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowedHeaders
Headers that are specified in the
Access-Control-Request-Headers
header. These headers are allowed in a preflightOPTIONS
request. In response to any preflightOPTIONS
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 preflightOPTIONS
request. In response to any preflightOPTIONS
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
Headers that are specified in the
Access-Control-Request-Headers
header. These headers are allowed in a preflightOPTIONS
request. In response to any preflightOPTIONS
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 preflightOPTIONS
request. In response to any preflightOPTIONS
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.
-
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
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
The time in seconds that your browser is to cache the preflight response for the specified resource. A CORS rule can have only one
maxAgeSeconds
element.- Parameters:
maxAgeSeconds
- The time in seconds that your browser is to cache the preflight response for the specified resource. A CORS rule can have only onemaxAgeSeconds
element.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-