public static final class CfnApi.CorsProperty.Builder
extends java.lang.Object
CfnApi.CorsProperty
Constructor and Description |
---|
Builder() |
public CfnApi.CorsProperty.Builder allowCredentials(java.lang.Boolean allowCredentials)
CfnApi.CorsProperty.getAllowCredentials()
allowCredentials
- Specifies whether credentials are included in the CORS request.
Supported only for HTTP APIs.this
public CfnApi.CorsProperty.Builder allowCredentials(IResolvable allowCredentials)
CfnApi.CorsProperty.getAllowCredentials()
allowCredentials
- Specifies whether credentials are included in the CORS request.
Supported only for HTTP APIs.this
public CfnApi.CorsProperty.Builder allowHeaders(java.util.List<java.lang.String> allowHeaders)
CfnApi.CorsProperty.getAllowHeaders()
allowHeaders
- Represents a collection of allowed headers.
Supported only for HTTP APIs.this
public CfnApi.CorsProperty.Builder allowMethods(java.util.List<java.lang.String> allowMethods)
CfnApi.CorsProperty.getAllowMethods()
allowMethods
- Represents a collection of allowed HTTP methods.
Supported only for HTTP APIs.this
public CfnApi.CorsProperty.Builder allowOrigins(java.util.List<java.lang.String> allowOrigins)
CfnApi.CorsProperty.getAllowOrigins()
allowOrigins
- Represents a collection of allowed origins.
Supported only for HTTP APIs.this
public CfnApi.CorsProperty.Builder exposeHeaders(java.util.List<java.lang.String> exposeHeaders)
CfnApi.CorsProperty.getExposeHeaders()
exposeHeaders
- Represents a collection of exposed headers.
Supported only for HTTP APIs.this
public CfnApi.CorsProperty.Builder maxAge(java.lang.Number maxAge)
CfnApi.CorsProperty.getMaxAge()
maxAge
- The number of seconds that the browser should cache preflight request results.
Supported only for HTTP APIs.this
public CfnApi.CorsProperty build()
CfnApi.CorsProperty
java.lang.NullPointerException
- if any required attribute was not provided