Enum CorsHttpMethod

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

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:09.546Z") @Stability(Stable) public enum CorsHttpMethod extends Enum<CorsHttpMethod>
Supported CORS HTTP methods.

Example:

 HttpApi.Builder.create(this, "HttpProxyApi")
         .corsPreflight(CorsPreflightOptions.builder()
                 .allowHeaders(List.of("Authorization"))
                 .allowMethods(List.of(CorsHttpMethod.GET, CorsHttpMethod.HEAD, CorsHttpMethod.OPTIONS, CorsHttpMethod.POST))
                 .allowOrigins(List.of("*"))
                 .maxAge(Duration.days(10))
                 .build())
         .build();
 
  • Enum Constant Details

    • ANY

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

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

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

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

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

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

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

    • values

      public static CorsHttpMethod[] 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 CorsHttpMethod 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