Class ProxyResourceProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.ProxyResourceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ProxyResourceProps>
- Enclosing interface:
ProxyResourceProps
@Stability(Stable)
public static final class ProxyResourceProps.Builder
extends Object
implements software.amazon.jsii.Builder<ProxyResourceProps>
A builder for
ProxyResourceProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofProxyResourceOptions.getAnyMethod()
build()
Builds the configured instance.defaultCorsPreflightOptions
(CorsOptions defaultCorsPreflightOptions) Sets the value ofResourceOptions.getDefaultCorsPreflightOptions()
defaultIntegration
(Integration defaultIntegration) Sets the value ofResourceOptions.getDefaultIntegration()
defaultMethodOptions
(MethodOptions defaultMethodOptions) Sets the value ofResourceOptions.getDefaultMethodOptions()
Sets the value ofProxyResourceProps.getParent()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
parent
Sets the value ofProxyResourceProps.getParent()
- Parameters:
parent
- The parent resource of this resource. This parameter is required. You can either pass anotherResource
object or aRestApi
object here.- Returns:
this
-
anyMethod
Sets the value ofProxyResourceOptions.getAnyMethod()
- Parameters:
anyMethod
- Adds an "ANY" method to this resource. If set tofalse
, you will have to explicitly add methods to this resource after it's created.- Returns:
this
-
defaultCorsPreflightOptions
@Stability(Stable) public ProxyResourceProps.Builder defaultCorsPreflightOptions(CorsOptions defaultCorsPreflightOptions) Sets the value ofResourceOptions.getDefaultCorsPreflightOptions()
- Parameters:
defaultCorsPreflightOptions
- Adds a CORS preflight OPTIONS method to this resource and all child resources. You can add CORS at the resource-level usingaddCorsPreflight
.- Returns:
this
-
defaultIntegration
@Stability(Stable) public ProxyResourceProps.Builder defaultIntegration(Integration defaultIntegration) Sets the value ofResourceOptions.getDefaultIntegration()
- Parameters:
defaultIntegration
- An integration to use as a default for all methods created within this API unless an integration is specified.- Returns:
this
-
defaultMethodOptions
@Stability(Stable) public ProxyResourceProps.Builder defaultMethodOptions(MethodOptions defaultMethodOptions) Sets the value ofResourceOptions.getDefaultMethodOptions()
- Parameters:
defaultMethodOptions
- Method options to use as a default for all methods created within this API unless custom options are specified.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ProxyResourceProps>
- Returns:
- a new instance of
ProxyResourceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-