public static final class CfnBucket.CorsRuleProperty.Builder
extends java.lang.Object
CfnBucket.CorsRuleProperty
Constructor and Description |
---|
Builder() |
public CfnBucket.CorsRuleProperty.Builder allowedMethods(java.util.List<java.lang.String> allowedMethods)
CfnBucket.CorsRuleProperty.getAllowedMethods()
allowedMethods
- An HTTP method that you allow the origin to run. This parameter is required.
Allowed values : GET
| PUT
| HEAD
| POST
| DELETE
this
public CfnBucket.CorsRuleProperty.Builder allowedOrigins(java.util.List<java.lang.String> allowedOrigins)
CfnBucket.CorsRuleProperty.getAllowedOrigins()
allowedOrigins
- One or more origins you want customers to be able to access the bucket from. This parameter is required.this
public CfnBucket.CorsRuleProperty.Builder allowedHeaders(java.util.List<java.lang.String> allowedHeaders)
CfnBucket.CorsRuleProperty.getAllowedHeaders()
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.this
public CfnBucket.CorsRuleProperty.Builder exposedHeaders(java.util.List<java.lang.String> exposedHeaders)
CfnBucket.CorsRuleProperty.getExposedHeaders()
exposedHeaders
- 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).this
public CfnBucket.CorsRuleProperty.Builder id(java.lang.String id)
CfnBucket.CorsRuleProperty.getId()
id
- A unique identifier for this rule.
The value must be no more than 255 characters.this
public CfnBucket.CorsRuleProperty.Builder maxAge(java.lang.Number maxAge)
CfnBucket.CorsRuleProperty.getMaxAge()
maxAge
- The time in seconds that your browser is to cache the preflight response for the specified resource.this
public CfnBucket.CorsRuleProperty build()
CfnBucket.CorsRuleProperty
java.lang.NullPointerException
- if any required attribute was not provided