Class CfnApiPropsMixin.CorsProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.apigatewayv2.CfnApiPropsMixin.CorsProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnApiPropsMixin.CorsProperty>
- Enclosing interface:
CfnApiPropsMixin.CorsProperty
@Stability(Stable)
public static final class CfnApiPropsMixin.CorsProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnApiPropsMixin.CorsProperty>
A builder for
CfnApiPropsMixin.CorsProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowCredentials(Boolean allowCredentials) Sets the value ofCfnApiPropsMixin.CorsProperty.getAllowCredentials()allowCredentials(IResolvable allowCredentials) Sets the value ofCfnApiPropsMixin.CorsProperty.getAllowCredentials()allowHeaders(List<String> allowHeaders) Sets the value ofCfnApiPropsMixin.CorsProperty.getAllowHeaders()allowMethods(List<String> allowMethods) Sets the value ofCfnApiPropsMixin.CorsProperty.getAllowMethods()allowOrigins(List<String> allowOrigins) Sets the value ofCfnApiPropsMixin.CorsProperty.getAllowOrigins()build()Builds the configured instance.exposeHeaders(List<String> exposeHeaders) Sets the value ofCfnApiPropsMixin.CorsProperty.getExposeHeaders()Sets the value ofCfnApiPropsMixin.CorsProperty.getMaxAge()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allowCredentials
@Stability(Stable) public CfnApiPropsMixin.CorsProperty.Builder allowCredentials(Boolean allowCredentials) Sets the value ofCfnApiPropsMixin.CorsProperty.getAllowCredentials()- Parameters:
allowCredentials- Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.- Returns:
this
-
allowCredentials
@Stability(Stable) public CfnApiPropsMixin.CorsProperty.Builder allowCredentials(IResolvable allowCredentials) Sets the value ofCfnApiPropsMixin.CorsProperty.getAllowCredentials()- Parameters:
allowCredentials- Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.- Returns:
this
-
allowHeaders
@Stability(Stable) public CfnApiPropsMixin.CorsProperty.Builder allowHeaders(List<String> allowHeaders) Sets the value ofCfnApiPropsMixin.CorsProperty.getAllowHeaders()- Parameters:
allowHeaders- Represents a collection of allowed headers. Supported only for HTTP APIs.- Returns:
this
-
allowMethods
@Stability(Stable) public CfnApiPropsMixin.CorsProperty.Builder allowMethods(List<String> allowMethods) Sets the value ofCfnApiPropsMixin.CorsProperty.getAllowMethods()- Parameters:
allowMethods- Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.- Returns:
this
-
allowOrigins
@Stability(Stable) public CfnApiPropsMixin.CorsProperty.Builder allowOrigins(List<String> allowOrigins) Sets the value ofCfnApiPropsMixin.CorsProperty.getAllowOrigins()- Parameters:
allowOrigins- Represents a collection of allowed origins. Supported only for HTTP APIs.- Returns:
this
-
exposeHeaders
@Stability(Stable) public CfnApiPropsMixin.CorsProperty.Builder exposeHeaders(List<String> exposeHeaders) Sets the value ofCfnApiPropsMixin.CorsProperty.getExposeHeaders()- Parameters:
exposeHeaders- Represents a collection of exposed headers. Supported only for HTTP APIs.- Returns:
this
-
maxAge
Sets the value ofCfnApiPropsMixin.CorsProperty.getMaxAge()- Parameters:
maxAge- The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnApiPropsMixin.CorsProperty>- Returns:
- a new instance of
CfnApiPropsMixin.CorsProperty - Throws:
NullPointerException- if any required attribute was not provided
-