Interface FunctionUrlCorsOptions
- All Superinterfaces:
- software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
- FunctionUrlCorsOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
           date="2025-10-29T11:15:42.659Z")
@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 SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forFunctionUrlCorsOptionsstatic final classAn implementation forFunctionUrlCorsOptions
- 
Method SummaryModifier 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- 
getAllowCredentialsWhether to allow cookies or other credentials in requests to your function URL.Default: false 
- 
getAllowedHeadersHeaders that are specified in the Access-Control-Request-Headers header.Default: - No headers allowed. 
- 
getAllowedMethodsAn HTTP method that you allow the origin to execute.Default: - [HttpMethod.ALL] 
- 
getAllowedOriginsOne or more origins you want customers to be able to access the bucket from.Default: - No origins allowed. 
- 
getExposedHeadersOne or more headers in the response that you want customers to be able to access from their applications.Default: - No headers exposed. 
- 
getMaxAgeThe 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
 
 
-