@Stability(value=Stable)
public static interface CfnApi.CorsProperty
extends software.amazon.jsii.JsiiSerializable
Supported only for HTTP APIs. See Configuring CORS for more information.
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.apigatewayv2.*;
CorsProperty corsProperty = CorsProperty.builder()
.allowCredentials(false)
.allowHeaders(List.of("allowHeaders"))
.allowMethods(List.of("allowMethods"))
.allowOrigins(List.of("allowOrigins"))
.exposeHeaders(List.of("exposeHeaders"))
.maxAge(123)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnApi.CorsProperty.Builder
A builder for
CfnApi.CorsProperty |
static class |
CfnApi.CorsProperty.Jsii$Proxy
An implementation for
CfnApi.CorsProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnApi.CorsProperty.Builder |
builder() |
default Object |
getAllowCredentials()
Specifies whether credentials are included in the CORS request.
|
default List<String> |
getAllowHeaders()
Represents a collection of allowed headers.
|
default List<String> |
getAllowMethods()
Represents a collection of allowed HTTP methods.
|
default List<String> |
getAllowOrigins()
Represents a collection of allowed origins.
|
default List<String> |
getExposeHeaders()
Represents a collection of exposed headers.
|
default Number |
getMaxAge()
The number of seconds that the browser should cache preflight request results.
|
@Stability(value=Stable) @Nullable default Object getAllowCredentials()
Supported only for HTTP APIs.
@Stability(value=Stable) @Nullable default List<String> getAllowHeaders()
Supported only for HTTP APIs.
@Stability(value=Stable) @Nullable default List<String> getAllowMethods()
Supported only for HTTP APIs.
@Stability(value=Stable) @Nullable default List<String> getAllowOrigins()
Supported only for HTTP APIs.
@Stability(value=Stable) @Nullable default List<String> getExposeHeaders()
Supported only for HTTP APIs.
@Stability(value=Stable) @Nullable default Number getMaxAge()
Supported only for HTTP APIs.
@Stability(value=Stable) static CfnApi.CorsProperty.Builder builder()
CfnApi.CorsProperty.Builder of CfnApi.CorsPropertyCopyright © 2022. All rights reserved.