HttpMethod

class aws_cdk.aws_apigatewayv2.HttpMethod(value)

Bases: enum.Enum

(experimental) Supported HTTP methods.

Stability

experimental

ExampleMetadata

infused

Example:

from aws_cdk.aws_apigatewayv2_integrations import HttpUrlIntegration, HttpLambdaIntegration

# books_default_fn: lambda.Function


get_books_integration = HttpUrlIntegration("GetBooksIntegration", "https://get-books-proxy.myproxy.internal")
books_default_integration = HttpLambdaIntegration("BooksIntegration", books_default_fn)

http_api = apigwv2.HttpApi(self, "HttpApi")

http_api.add_routes(
    path="/books",
    methods=[apigwv2.HttpMethod.GET],
    integration=get_books_integration
)
http_api.add_routes(
    path="/books",
    methods=[apigwv2.HttpMethod.ANY],
    integration=books_default_integration
)

Attributes

ANY

(experimental) HTTP ANY.

Stability

experimental

DELETE

(experimental) HTTP DELETE.

Stability

experimental

GET

(experimental) HTTP GET.

Stability

experimental

HEAD

(experimental) HTTP HEAD.

Stability

experimental

OPTIONS

(experimental) HTTP OPTIONS.

Stability

experimental

PATCH

(experimental) HTTP PATCH.

Stability

experimental

POST

(experimental) HTTP POST.

Stability

experimental

PUT

(experimental) HTTP PUT.

Stability

experimental