Class MethodProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.MethodProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<MethodProps>
- Enclosing interface:
- MethodProps
@Stability(Stable)
public static final class MethodProps.Builder
extends Object
implements software.amazon.jsii.Builder<MethodProps>
A builder for
MethodProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.httpMethod(String httpMethod) Sets the value ofMethodProps.getHttpMethod()integration(Integration integration) Sets the value ofMethodProps.getIntegration()options(MethodOptions options) Sets the value ofMethodProps.getOptions()Sets the value ofMethodProps.getResource()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
httpMethod
Sets the value ofMethodProps.getHttpMethod()- Parameters:
httpMethod- The HTTP method ("GET", "POST", "PUT", ...) that clients use to call this method. This parameter is required.- Returns:
this
-
resource
Sets the value ofMethodProps.getResource()- Parameters:
resource- The resource this method is associated with. This parameter is required. For root resource methods, specify theRestApiobject.- Returns:
this
-
integration
Sets the value ofMethodProps.getIntegration()- Parameters:
integration- The backend system that the method calls when it receives a request.- Returns:
this
-
options
Sets the value ofMethodProps.getOptions()- Parameters:
options- Method options.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<MethodProps>- Returns:
- a new instance of
MethodProps - Throws:
NullPointerException- if any required attribute was not provided
-