Class ResourceProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.ResourceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ResourceProps>
- Enclosing interface:
- ResourceProps
@Stability(Stable)
public static final class ResourceProps.Builder
extends Object
implements software.amazon.jsii.Builder<ResourceProps>
A builder for
ResourceProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
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 ofResourceProps.getParent()
Sets the value ofResourceProps.getPathPart()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
parent
Sets the value ofResourceProps.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
-
pathPart
Sets the value ofResourceProps.getPathPart()
- Parameters:
pathPart
- A path name for the resource. This parameter is required.- Returns:
this
-
defaultCorsPreflightOptions
@Stability(Stable) public ResourceProps.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
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 ResourceProps.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<ResourceProps>
- Returns:
- a new instance of
ResourceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-