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
-
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
- the value to be set. This parameter is required.- Returns:
this
-
allowCredentials
@Stability(Stable) public CfnApi.CorsConfigurationProperty.Builder allowCredentials(Boolean allowCredentials) Sets the value ofCfnApi.CorsConfigurationProperty.getAllowCredentials()
- Parameters:
allowCredentials
- the value to be set.- Returns:
this
-
allowCredentials
@Stability(Stable) public CfnApi.CorsConfigurationProperty.Builder allowCredentials(IResolvable allowCredentials) Sets the value ofCfnApi.CorsConfigurationProperty.getAllowCredentials()
- Parameters:
allowCredentials
- the value to be set.- Returns:
this
-
allowHeaders
@Stability(Stable) public CfnApi.CorsConfigurationProperty.Builder allowHeaders(String allowHeaders) Sets the value ofCfnApi.CorsConfigurationProperty.getAllowHeaders()
- Parameters:
allowHeaders
- the value to be set.- Returns:
this
-
allowMethods
@Stability(Stable) public CfnApi.CorsConfigurationProperty.Builder allowMethods(String allowMethods) Sets the value ofCfnApi.CorsConfigurationProperty.getAllowMethods()
- Parameters:
allowMethods
- the value to be set.- Returns:
this
-
maxAge
Sets the value ofCfnApi.CorsConfigurationProperty.getMaxAge()
- Parameters:
maxAge
- the value to be set.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnApi.CorsConfigurationProperty>
- Returns:
- a new instance of
CfnApi.CorsConfigurationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-