Interface Cors.Builder
-
- All Superinterfaces:
Buildable
,CopyableBuilder<Cors.Builder,Cors>
,SdkBuilder<Cors.Builder,Cors>
,SdkPojo
- Enclosing class:
- Cors
public static interface Cors.Builder extends SdkPojo, CopyableBuilder<Cors.Builder,Cors>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Cors.Builder
allowCredentials(Boolean allowCredentials)
Whether to allow cookies or other credentials in requests to your function URL.Cors.Builder
allowHeaders(String... allowHeaders)
The HTTP headers that origins can include in requests to your function URL.Cors.Builder
allowHeaders(Collection<String> allowHeaders)
The HTTP headers that origins can include in requests to your function URL.Cors.Builder
allowMethods(String... allowMethods)
The HTTP methods that are allowed when calling your function URL.Cors.Builder
allowMethods(Collection<String> allowMethods)
The HTTP methods that are allowed when calling your function URL.Cors.Builder
allowOrigins(String... allowOrigins)
The origins that can access your function URL.Cors.Builder
allowOrigins(Collection<String> allowOrigins)
The origins that can access your function URL.Cors.Builder
exposeHeaders(String... exposeHeaders)
The HTTP headers in your function response that you want to expose to origins that call your function URL.Cors.Builder
exposeHeaders(Collection<String> exposeHeaders)
The HTTP headers in your function response that you want to expose to origins that call your function URL.Cors.Builder
maxAge(Integer maxAge)
The maximum amount of time, in seconds, that web browsers can cache results of a preflight request.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
allowCredentials
Cors.Builder allowCredentials(Boolean allowCredentials)
Whether to allow cookies or other credentials in requests to your function URL. The default is
false
.- Parameters:
allowCredentials
- Whether to allow cookies or other credentials in requests to your function URL. The default isfalse
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowHeaders
Cors.Builder allowHeaders(Collection<String> allowHeaders)
The HTTP headers that origins can include in requests to your function URL. For example:
Date
,Keep-Alive
,X-Custom-Header
.- Parameters:
allowHeaders
- The HTTP headers that origins can include in requests to your function URL. For example:Date
,Keep-Alive
,X-Custom-Header
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowHeaders
Cors.Builder allowHeaders(String... allowHeaders)
The HTTP headers that origins can include in requests to your function URL. For example:
Date
,Keep-Alive
,X-Custom-Header
.- Parameters:
allowHeaders
- The HTTP headers that origins can include in requests to your function URL. For example:Date
,Keep-Alive
,X-Custom-Header
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowMethods
Cors.Builder allowMethods(Collection<String> allowMethods)
The HTTP methods that are allowed when calling your function URL. For example:
GET
,POST
,DELETE
, or the wildcard character (*
).- Parameters:
allowMethods
- The HTTP methods that are allowed when calling your function URL. For example:GET
,POST
,DELETE
, or the wildcard character (*
).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowMethods
Cors.Builder allowMethods(String... allowMethods)
The HTTP methods that are allowed when calling your function URL. For example:
GET
,POST
,DELETE
, or the wildcard character (*
).- Parameters:
allowMethods
- The HTTP methods that are allowed when calling your function URL. For example:GET
,POST
,DELETE
, or the wildcard character (*
).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowOrigins
Cors.Builder allowOrigins(Collection<String> 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 using the wildcard character (
*
).- Parameters:
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 using the wildcard character (
*
).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowOrigins
Cors.Builder allowOrigins(String... 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 using the wildcard character (
*
).- Parameters:
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 using the wildcard character (
*
).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
exposeHeaders
Cors.Builder exposeHeaders(Collection<String> 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
.- Parameters:
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
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
exposeHeaders
Cors.Builder exposeHeaders(String... 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
.- Parameters:
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
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
maxAge
Cors.Builder maxAge(Integer maxAge)
The maximum amount of time, in seconds, that web browsers can cache results of a preflight request. By default, this is set to
0
, which means that the browser doesn't cache results.- Parameters:
maxAge
- The maximum amount of time, in seconds, that web browsers can cache results of a preflight request. By default, this is set to0
, which means that the browser doesn't cache results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-