Class CfnBucketPropsMixin.CorsRuleProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.s3.CfnBucketPropsMixin.CorsRuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnBucketPropsMixin.CorsRuleProperty>
- Enclosing interface:
CfnBucketPropsMixin.CorsRuleProperty
@Stability(Stable)
public static final class CfnBucketPropsMixin.CorsRuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnBucketPropsMixin.CorsRuleProperty>
A builder for
CfnBucketPropsMixin.CorsRuleProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowedHeaders(List<String> allowedHeaders) Sets the value ofCfnBucketPropsMixin.CorsRuleProperty.getAllowedHeaders()allowedMethods(List<String> allowedMethods) Sets the value ofCfnBucketPropsMixin.CorsRuleProperty.getAllowedMethods()allowedOrigins(List<String> allowedOrigins) Sets the value ofCfnBucketPropsMixin.CorsRuleProperty.getAllowedOrigins()build()Builds the configured instance.exposedHeaders(List<String> exposedHeaders) Sets the value ofCfnBucketPropsMixin.CorsRuleProperty.getExposedHeaders()Sets the value ofCfnBucketPropsMixin.CorsRuleProperty.getId()Sets the value ofCfnBucketPropsMixin.CorsRuleProperty.getMaxAge()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allowedHeaders
@Stability(Stable) public CfnBucketPropsMixin.CorsRuleProperty.Builder allowedHeaders(List<String> allowedHeaders) Sets the value ofCfnBucketPropsMixin.CorsRuleProperty.getAllowedHeaders()- Parameters:
allowedHeaders- Headers that are specified in theAccess-Control-Request-Headersheader. 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:
this
-
allowedMethods
@Stability(Stable) public CfnBucketPropsMixin.CorsRuleProperty.Builder allowedMethods(List<String> allowedMethods) Sets the value ofCfnBucketPropsMixin.CorsRuleProperty.getAllowedMethods()- Parameters:
allowedMethods- An HTTP method that you allow the origin to run. Allowed values :GET|PUT|HEAD|POST|DELETE- Returns:
this
-
allowedOrigins
@Stability(Stable) public CfnBucketPropsMixin.CorsRuleProperty.Builder allowedOrigins(List<String> allowedOrigins) Sets the value ofCfnBucketPropsMixin.CorsRuleProperty.getAllowedOrigins()- Parameters:
allowedOrigins- One or more origins you want customers to be able to access the bucket from.- Returns:
this
-
exposedHeaders
@Stability(Stable) public CfnBucketPropsMixin.CorsRuleProperty.Builder exposedHeaders(List<String> exposedHeaders) Sets the value ofCfnBucketPropsMixin.CorsRuleProperty.getExposedHeaders()- Parameters:
exposedHeaders- One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScriptXMLHttpRequestobject).- Returns:
this
-
id
Sets the value ofCfnBucketPropsMixin.CorsRuleProperty.getId()- Parameters:
id- A unique identifier for this rule. The value must be no more than 255 characters.- Returns:
this
-
maxAge
Sets the value ofCfnBucketPropsMixin.CorsRuleProperty.getMaxAge()- Parameters:
maxAge- The time in seconds that your browser is to cache the preflight response for the specified resource.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnBucketPropsMixin.CorsRuleProperty>- Returns:
- a new instance of
CfnBucketPropsMixin.CorsRuleProperty - Throws:
NullPointerException- if any required attribute was not provided
-