@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-05-10T17:05:56.559Z") @Stability(value=Stable) public interface FunctionUrlCorsOptions extends software.amazon.jsii.JsiiSerializable
Example:
Function fn;
fn.addFunctionUrl(FunctionUrlOptions.builder()
.authType(FunctionUrlAuthType.NONE)
.cors(FunctionUrlCorsOptions.builder()
// Allow this to be called from websites on https://example.com.
// Can also be ['*'] to allow all domain.
.allowedOrigins(List.of("https://example.com"))
.build())
.build());
| Modifier and Type | Interface and Description |
|---|---|
static class |
FunctionUrlCorsOptions.Builder
A builder for
FunctionUrlCorsOptions |
static class |
FunctionUrlCorsOptions.Jsii$Proxy
An implementation for
FunctionUrlCorsOptions |
| Modifier and Type | Method and Description |
|---|---|
static FunctionUrlCorsOptions.Builder |
builder() |
default Boolean |
getAllowCredentials()
Whether to allow cookies or other credentials in requests to your function URL.
|
default List<String> |
getAllowedHeaders()
Headers that are specified in the Access-Control-Request-Headers header.
|
default List<HttpMethod> |
getAllowedMethods()
An HTTP method that you allow the origin to execute.
|
default 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 Duration |
getMaxAge()
The time in seconds that your browser is to cache the preflight response for the specified resource.
|
@Stability(value=Stable) @Nullable default Boolean getAllowCredentials()
Default: false
@Stability(value=Stable) @Nullable default List<String> getAllowedHeaders()
Default: - No headers allowed.
@Stability(value=Stable) @Nullable default List<HttpMethod> getAllowedMethods()
Default: - [HttpMethod.ALL]
@Stability(value=Stable) @Nullable default List<String> getAllowedOrigins()
Default: - No origins allowed.
@Stability(value=Stable) @Nullable default List<String> getExposedHeaders()
Default: - No headers exposed.
@Stability(value=Stable) @Nullable default Duration getMaxAge()
Default: - Browser default of 5 seconds.
@Stability(value=Stable) static FunctionUrlCorsOptions.Builder builder()
FunctionUrlCorsOptions.Builder of FunctionUrlCorsOptionsCopyright © 2023. All rights reserved.