public static interface CfnBucket.CorsRuleProperty
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.s3.*; CorsRuleProperty corsRuleProperty = CorsRuleProperty.builder() .allowedMethods(List.of("allowedMethods")) .allowedOrigins(List.of("allowedOrigins")) // the properties below are optional .allowedHeaders(List.of("allowedHeaders")) .exposedHeaders(List.of("exposedHeaders")) .id("id") .maxAge(123) .build();
Modifier and Type | Interface and Description |
---|---|
static class |
CfnBucket.CorsRuleProperty.Builder
A builder for
CfnBucket.CorsRuleProperty |
static class |
CfnBucket.CorsRuleProperty.Jsii$Proxy
An implementation for
CfnBucket.CorsRuleProperty |
Modifier and Type | Method and Description |
---|---|
static CfnBucket.CorsRuleProperty.Builder |
builder() |
default java.util.List<java.lang.String> |
getAllowedHeaders()
Headers that are specified in the `Access-Control-Request-Headers` header.
|
java.util.List<java.lang.String> |
getAllowedMethods()
An HTTP method that you allow the origin to run.
|
java.util.List<java.lang.String> |
getAllowedOrigins()
One or more origins you want customers to be able to access the bucket from.
|
default java.util.List<java.lang.String> |
getExposedHeaders()
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).
|
default java.lang.String |
getId()
A unique identifier for this rule.
|
default java.lang.Number |
getMaxAge()
The time in seconds that your browser is to cache the preflight response for the specified resource.
|
java.util.List<java.lang.String> getAllowedMethods()
Allowed values : GET
| PUT
| HEAD
| POST
| DELETE
java.util.List<java.lang.String> getAllowedOrigins()
default java.util.List<java.lang.String> getAllowedHeaders()
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.
default java.util.List<java.lang.String> getExposedHeaders()
default java.lang.String getId()
The value must be no more than 255 characters.
default java.lang.Number getMaxAge()
static CfnBucket.CorsRuleProperty.Builder builder()
CfnBucket.CorsRuleProperty.Builder
of CfnBucket.CorsRuleProperty