public static interface CfnApi.CorsProperty
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 java.lang.Object |
getAllowCredentials()
Specifies whether credentials are included in the CORS request.
|
default java.util.List<java.lang.String> |
getAllowHeaders()
Represents a collection of allowed headers.
|
default java.util.List<java.lang.String> |
getAllowMethods()
Represents a collection of allowed HTTP methods.
|
default java.util.List<java.lang.String> |
getAllowOrigins()
Represents a collection of allowed origins.
|
default java.util.List<java.lang.String> |
getExposeHeaders()
Represents a collection of exposed headers.
|
default java.lang.Number |
getMaxAge()
The number of seconds that the browser should cache preflight request results.
|
default java.lang.Object getAllowCredentials()
Supported only for HTTP APIs.
default java.util.List<java.lang.String> getAllowHeaders()
Supported only for HTTP APIs.
default java.util.List<java.lang.String> getAllowMethods()
Supported only for HTTP APIs.
default java.util.List<java.lang.String> getAllowOrigins()
Supported only for HTTP APIs.
default java.util.List<java.lang.String> getExposeHeaders()
Supported only for HTTP APIs.
default java.lang.Number getMaxAge()
Supported only for HTTP APIs.
static CfnApi.CorsProperty.Builder builder()
CfnApi.CorsProperty.Builder
of CfnApi.CorsProperty