Class CfnHttpApi.CorsConfigurationObjectProperty.Builder
java.lang.Object
software.amazon.awscdk.services.sam.CfnHttpApi.CorsConfigurationObjectProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnHttpApi.CorsConfigurationObjectProperty>
- Enclosing interface:
CfnHttpApi.CorsConfigurationObjectProperty
@Stability(Stable)
public static final class CfnHttpApi.CorsConfigurationObjectProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnHttpApi.CorsConfigurationObjectProperty>
A builder for
CfnHttpApi.CorsConfigurationObjectProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowCredentials
(Boolean allowCredentials) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowCredentials()
allowCredentials
(IResolvable allowCredentials) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowCredentials()
allowHeaders
(List<String> allowHeaders) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowHeaders()
allowMethods
(List<String> allowMethods) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowMethods()
allowOrigins
(List<String> allowOrigins) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowOrigins()
build()
Builds the configured instance.exposeHeaders
(List<String> exposeHeaders) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getExposeHeaders()
Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getMaxAge()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allowCredentials
@Stability(Stable) public CfnHttpApi.CorsConfigurationObjectProperty.Builder allowCredentials(Boolean allowCredentials) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowCredentials()
- Parameters:
allowCredentials
- the value to be set.- Returns:
this
-
allowCredentials
@Stability(Stable) public CfnHttpApi.CorsConfigurationObjectProperty.Builder allowCredentials(IResolvable allowCredentials) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowCredentials()
- Parameters:
allowCredentials
- the value to be set.- Returns:
this
-
allowHeaders
@Stability(Stable) public CfnHttpApi.CorsConfigurationObjectProperty.Builder allowHeaders(List<String> allowHeaders) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowHeaders()
- Parameters:
allowHeaders
- the value to be set.- Returns:
this
-
allowMethods
@Stability(Stable) public CfnHttpApi.CorsConfigurationObjectProperty.Builder allowMethods(List<String> allowMethods) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowMethods()
- Parameters:
allowMethods
- the value to be set.- Returns:
this
-
allowOrigins
@Stability(Stable) public CfnHttpApi.CorsConfigurationObjectProperty.Builder allowOrigins(List<String> allowOrigins) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowOrigins()
- Parameters:
allowOrigins
- the value to be set.- Returns:
this
-
exposeHeaders
@Stability(Stable) public CfnHttpApi.CorsConfigurationObjectProperty.Builder exposeHeaders(List<String> exposeHeaders) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getExposeHeaders()
- Parameters:
exposeHeaders
- the value to be set.- Returns:
this
-
maxAge
Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getMaxAge()
- Parameters:
maxAge
- the value to be set.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnHttpApi.CorsConfigurationObjectProperty>
- Returns:
- a new instance of
CfnHttpApi.CorsConfigurationObjectProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-