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