Class CfnApi.CorsConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.sam.CfnApi.CorsConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnApi.CorsConfigurationProperty>
- Enclosing interface:
- CfnApi.CorsConfigurationProperty
@Stability(Stable)
public static final class CfnApi.CorsConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnApi.CorsConfigurationProperty>
A builder for
CfnApi.CorsConfigurationProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowCredentials(Boolean allowCredentials) Sets the value ofCfnApi.CorsConfigurationProperty.getAllowCredentials()allowCredentials(IResolvable allowCredentials) Sets the value ofCfnApi.CorsConfigurationProperty.getAllowCredentials()allowHeaders(String allowHeaders) Sets the value ofCfnApi.CorsConfigurationProperty.getAllowHeaders()allowMethods(String allowMethods) Sets the value ofCfnApi.CorsConfigurationProperty.getAllowMethods()allowOrigin(String allowOrigin) Sets the value ofCfnApi.CorsConfigurationProperty.getAllowOrigin()build()Builds the configured instance.Sets the value ofCfnApi.CorsConfigurationProperty.getMaxAge()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allowOrigin
Sets the value ofCfnApi.CorsConfigurationProperty.getAllowOrigin()- Parameters:
allowOrigin-CfnApi.CorsConfigurationProperty.AllowOrigin. This parameter is required.- Returns:
this
-
allowCredentials
@Stability(Stable) public CfnApi.CorsConfigurationProperty.Builder allowCredentials(Boolean allowCredentials) Sets the value ofCfnApi.CorsConfigurationProperty.getAllowCredentials()- Parameters:
allowCredentials-CfnApi.CorsConfigurationProperty.AllowCredentials.- Returns:
this
-
allowCredentials
@Stability(Stable) public CfnApi.CorsConfigurationProperty.Builder allowCredentials(IResolvable allowCredentials) Sets the value ofCfnApi.CorsConfigurationProperty.getAllowCredentials()- Parameters:
allowCredentials-CfnApi.CorsConfigurationProperty.AllowCredentials.- Returns:
this
-
allowHeaders
@Stability(Stable) public CfnApi.CorsConfigurationProperty.Builder allowHeaders(String allowHeaders) Sets the value ofCfnApi.CorsConfigurationProperty.getAllowHeaders()- Parameters:
allowHeaders-CfnApi.CorsConfigurationProperty.AllowHeaders.- Returns:
this
-
allowMethods
@Stability(Stable) public CfnApi.CorsConfigurationProperty.Builder allowMethods(String allowMethods) Sets the value ofCfnApi.CorsConfigurationProperty.getAllowMethods()- Parameters:
allowMethods-CfnApi.CorsConfigurationProperty.AllowMethods.- Returns:
this
-
maxAge
Sets the value ofCfnApi.CorsConfigurationProperty.getMaxAge()- Parameters:
maxAge-CfnApi.CorsConfigurationProperty.MaxAge.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnApi.CorsConfigurationProperty>- Returns:
- a new instance of
CfnApi.CorsConfigurationProperty - Throws:
NullPointerException- if any required attribute was not provided
-