public static final class CfnUrl.CorsProperty.Builder
extends java.lang.Object
CfnUrl.CorsProperty
Constructor and Description |
---|
Builder() |
public CfnUrl.CorsProperty.Builder allowCredentials(java.lang.Boolean allowCredentials)
CfnUrl.CorsProperty.getAllowCredentials()
allowCredentials
- Whether you want to allow cookies or other credentials in requests to your function URL.
The default is false
.this
public CfnUrl.CorsProperty.Builder allowCredentials(IResolvable allowCredentials)
CfnUrl.CorsProperty.getAllowCredentials()
allowCredentials
- Whether you want to allow cookies or other credentials in requests to your function URL.
The default is false
.this
public CfnUrl.CorsProperty.Builder allowHeaders(java.util.List<java.lang.String> allowHeaders)
CfnUrl.CorsProperty.getAllowHeaders()
allowHeaders
- The HTTP headers that origins can include in requests to your function URL.
For example: Date
, Keep-Alive
, X-Custom-Header
.this
public CfnUrl.CorsProperty.Builder allowMethods(java.util.List<java.lang.String> allowMethods)
CfnUrl.CorsProperty.getAllowMethods()
allowMethods
- The HTTP methods that are allowed when calling your function URL.
For example: GET
, POST
, DELETE
, or the wildcard character ( *
).this
public CfnUrl.CorsProperty.Builder allowOrigins(java.util.List<java.lang.String> allowOrigins)
CfnUrl.CorsProperty.getAllowOrigins()
allowOrigins
- The origins that can access your function URL.
You can list any number of specific origins, separated by a comma. For example: https://www.example.com
, http://localhost:60905
.
Alternatively, you can grant access to all origins with the wildcard character ( *
).
this
public CfnUrl.CorsProperty.Builder exposeHeaders(java.util.List<java.lang.String> exposeHeaders)
CfnUrl.CorsProperty.getExposeHeaders()
exposeHeaders
- The HTTP headers in your function response that you want to expose to origins that call your function URL.
For example: Date
, Keep-Alive
, X-Custom-Header
.this
public CfnUrl.CorsProperty.Builder maxAge(java.lang.Number maxAge)
CfnUrl.CorsProperty.getMaxAge()
maxAge
- The maximum amount of time, in seconds, that browsers can cache results of a preflight request.
By default, this is set to 0
, which means the browser will not cache results.this
public CfnUrl.CorsProperty build()
CfnUrl.CorsProperty
java.lang.NullPointerException
- if any required attribute was not provided