Interface FunctionUrlCorsOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
FunctionUrlCorsOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)",
date="2024-08-15T01:32:50.399Z")
@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 class
A builder forFunctionUrlCorsOptions
static final class
An implementation forFunctionUrlCorsOptions
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Boolean
Whether 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 Duration
The 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.Builder
ofFunctionUrlCorsOptions
-