java.lang.Object
java.lang.Enum<HttpMethod>
software.amazon.awscdk.services.apigatewayv2.HttpMethod
All Implemented Interfaces:
Serializable, Comparable<HttpMethod>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-08-02T00:29:05.985Z") @Stability(Stable) public enum HttpMethod extends Enum<HttpMethod>
Supported HTTP methods.

Example:

 import software.amazon.awscdk.aws_apigatewayv2_integrations.HttpUrlIntegration;
 import software.amazon.awscdk.aws_apigatewayv2_integrations.HttpLambdaIntegration;
 Function bookStoreDefaultFn;
 HttpUrlIntegration getBooksIntegration = new HttpUrlIntegration("GetBooksIntegration", "https://get-books-proxy.example.com");
 HttpLambdaIntegration bookStoreDefaultIntegration = new HttpLambdaIntegration("BooksIntegration", bookStoreDefaultFn);
 HttpApi httpApi = new HttpApi(this, "HttpApi");
 httpApi.addRoutes(AddRoutesOptions.builder()
         .path("/books")
         .methods(List.of(HttpMethod.GET))
         .integration(getBooksIntegration)
         .build());
 httpApi.addRoutes(AddRoutesOptions.builder()
         .path("/books")
         .methods(List.of(HttpMethod.ANY))
         .integration(bookStoreDefaultIntegration)
         .build());
 
  • Enum Constant Details

    • ANY

      @Stability(Stable) public static final HttpMethod ANY
      HTTP ANY.
    • DELETE

      @Stability(Stable) public static final HttpMethod DELETE
      HTTP DELETE.
    • GET

      @Stability(Stable) public static final HttpMethod GET
      HTTP GET.
    • OPTIONS

      @Stability(Stable) public static final HttpMethod OPTIONS
      HTTP OPTIONS.
    • PATCH

      @Stability(Stable) public static final HttpMethod PATCH
      HTTP PATCH.
    • POST

      @Stability(Stable) public static final HttpMethod POST
      HTTP POST.
    • PUT

      @Stability(Stable) public static final HttpMethod PUT
      HTTP PUT.
  • Method Details

    • values

      public static HttpMethod[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static HttpMethod valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null