Class Method.Builder

java.lang.Object
software.amazon.awscdk.services.apigateway.Method.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<Method>
Enclosing class:
Method

@Stability(Stable) public static final class Method.Builder extends Object implements software.amazon.jsii.Builder<Method>
A fluent builder for Method.
  • Method Details

    • create

      @Stability(Stable) public static Method.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of Method.Builder.
    • httpMethod

      @Stability(Stable) public Method.Builder httpMethod(String httpMethod)
      The HTTP method ("GET", "POST", "PUT", ...) that clients use to call this method.

      Parameters:
      httpMethod - The HTTP method ("GET", "POST", "PUT", ...) that clients use to call this method. This parameter is required.
      Returns:
      this
    • resource

      @Stability(Stable) public Method.Builder resource(IResource resource)
      The resource this method is associated with.

      For root resource methods, specify the RestApi object.

      Parameters:
      resource - The resource this method is associated with. This parameter is required.
      Returns:
      this
    • integration

      @Stability(Stable) public Method.Builder integration(Integration integration)
      The backend system that the method calls when it receives a request.

      Default: - a new `MockIntegration`.

      Parameters:
      integration - The backend system that the method calls when it receives a request. This parameter is required.
      Returns:
      this
    • options

      @Stability(Stable) public Method.Builder options(MethodOptions options)
      Method options.

      Default: - No options.

      Parameters:
      options - Method options. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public Method build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Method>
      Returns:
      a newly built instance of Method.