@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.795Z") @Stability(value=Stable) public interface CorsRule extends software.amazon.jsii.JsiiSerializable
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 List<String> |
getAllowedHeaders()
Headers that are specified in the Access-Control-Request-Headers header.
|
List<HttpMethods> |
getAllowedMethods()
An HTTP method that you allow the origin to execute.
|
List<String> |
getAllowedOrigins()
One or more origins you want customers to be able to access the bucket from.
|
default List<String> |
getExposedHeaders()
One or more headers in the response that you want customers to be able to access from their applications.
|
default String |
getId()
A unique identifier for this rule.
|
default Number |
getMaxAge()
The time in seconds that your browser is to cache the preflight response for the specified resource.
|
@Stability(value=Stable) @NotNull List<HttpMethods> getAllowedMethods()
@Stability(value=Stable) @NotNull List<String> getAllowedOrigins()
@Stability(value=Stable) @Nullable default List<String> getAllowedHeaders()
Default: - No headers allowed.
@Stability(value=Stable) @Nullable default List<String> getExposedHeaders()
Default: - No headers exposed.
@Stability(value=Stable) @Nullable default String getId()
Default: - No id specified.
@Stability(value=Stable) @Nullable default Number getMaxAge()
Default: - No caching.
@Stability(value=Stable) static CorsRule.Builder builder()
CorsRule.Builder of CorsRuleCopyright © 2022. All rights reserved.