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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowCredentials(Boolean allowCredentials) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowCredentials()allowCredentials(software.amazon.awscdk.core.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- `CfnHttpApi.CorsConfigurationObjectProperty.AllowCredentials`.- Returns:
this
-
allowCredentials
@Stability(Stable) public CfnHttpApi.CorsConfigurationObjectProperty.Builder allowCredentials(software.amazon.awscdk.core.IResolvable allowCredentials) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowCredentials()- Parameters:
allowCredentials- `CfnHttpApi.CorsConfigurationObjectProperty.AllowCredentials`.- Returns:
this
-
allowHeaders
@Stability(Stable) public CfnHttpApi.CorsConfigurationObjectProperty.Builder allowHeaders(List<String> allowHeaders) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowHeaders()- Parameters:
allowHeaders- `CfnHttpApi.CorsConfigurationObjectProperty.AllowHeaders`.- Returns:
this
-
allowMethods
@Stability(Stable) public CfnHttpApi.CorsConfigurationObjectProperty.Builder allowMethods(List<String> allowMethods) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowMethods()- Parameters:
allowMethods- `CfnHttpApi.CorsConfigurationObjectProperty.AllowMethods`.- Returns:
this
-
allowOrigins
@Stability(Stable) public CfnHttpApi.CorsConfigurationObjectProperty.Builder allowOrigins(List<String> allowOrigins) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getAllowOrigins()- Parameters:
allowOrigins- `CfnHttpApi.CorsConfigurationObjectProperty.AllowOrigins`.- Returns:
this
-
exposeHeaders
@Stability(Stable) public CfnHttpApi.CorsConfigurationObjectProperty.Builder exposeHeaders(List<String> exposeHeaders) Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getExposeHeaders()- Parameters:
exposeHeaders- `CfnHttpApi.CorsConfigurationObjectProperty.ExposeHeaders`.- Returns:
this
-
maxAge
Sets the value ofCfnHttpApi.CorsConfigurationObjectProperty.getMaxAge()- Parameters:
maxAge- `CfnHttpApi.CorsConfigurationObjectProperty.MaxAge`.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnHttpApi.CorsConfigurationObjectProperty>- Returns:
- a new instance of
CfnHttpApi.CorsConfigurationObjectProperty - Throws:
NullPointerException- if any required attribute was not provided
-