@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-22T19:35:41.674Z")
public interface CorsRule
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.*; CorsRule corsRule = CorsRule.builder() .allowedMethods(List.of(HttpMethods.GET)) .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 |
CorsRule.Builder
A builder for
CorsRule |
static class |
CorsRule.Jsii$Proxy
An implementation for
CorsRule |
Modifier and Type | Method and Description |
---|---|
static CorsRule.Builder |
builder() |
default java.util.List<java.lang.String> |
getAllowedHeaders()
Headers that are specified in the Access-Control-Request-Headers header.
|
java.util.List<HttpMethods> |
getAllowedMethods()
An HTTP method that you allow the origin to execute.
|
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.
|
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<HttpMethods> getAllowedMethods()
java.util.List<java.lang.String> getAllowedOrigins()
default java.util.List<java.lang.String> getAllowedHeaders()
Default: - No headers allowed.
default java.util.List<java.lang.String> getExposedHeaders()
Default: - No headers exposed.
default java.lang.String getId()
Default: - No id specified.
default java.lang.Number getMaxAge()
Default: - No caching.
static CorsRule.Builder builder()
CorsRule.Builder
of CorsRule