Interface FunctionUrlCorsOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
FunctionUrlCorsOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-17T14:40:54.936Z")
@Stability(Stable)
public interface FunctionUrlCorsOptions
extends software.amazon.jsii.JsiiSerializable
Specifies a cross-origin access property for a function URL.
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());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forFunctionUrlCorsOptionsstatic final classAn implementation forFunctionUrlCorsOptions -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default BooleanWhether to allow cookies or other credentials in requests to your function URL.Headers that are specified in the Access-Control-Request-Headers header.default List<HttpMethod> An HTTP method that you allow the origin to execute.One or more origins you want customers to be able to access the bucket from.One or more headers in the response that you want customers to be able to access from their applications.default DurationThe time in seconds that your browser is to cache the preflight response for the specified resource.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAllowCredentials
Whether to allow cookies or other credentials in requests to your function URL.Default: false
-
getAllowedHeaders
Headers that are specified in the Access-Control-Request-Headers header.Default: - No headers allowed.
-
getAllowedMethods
An HTTP method that you allow the origin to execute.Default: - [HttpMethod.ALL]
-
getAllowedOrigins
One or more origins you want customers to be able to access the bucket from.Default: - No origins allowed.
-
getExposedHeaders
One or more headers in the response that you want customers to be able to access from their applications.Default: - No headers exposed.
-
getMaxAge
The time in seconds that your browser is to cache the preflight response for the specified resource.Default: - Browser default of 5 seconds.
-
builder
- Returns:
- a
FunctionUrlCorsOptions.BuilderofFunctionUrlCorsOptions
-