enum HttpMethod
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Apigatewayv2.HttpMethod |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigatewayv2#HttpMethod |
Java | software.amazon.awscdk.services.apigatewayv2.HttpMethod |
Python | aws_cdk.aws_apigatewayv2.HttpMethod |
TypeScript (source) | aws-cdk-lib » aws_apigatewayv2 » HttpMethod |
Supported HTTP methods.
Example
import { HttpLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
declare const booksDefaultFn: lambda.Function;
const httpApi = new apigwv2.HttpApi(this, 'HttpApi');
const getBooksIntegration = new HttpLambdaIntegration('GetBooksIntegration', booksDefaultFn, {
scopePermissionToRoute: false,
});
const createBookIntegration = new HttpLambdaIntegration('CreateBookIntegration', booksDefaultFn, {
scopePermissionToRoute: false,
});
httpApi.addRoutes({
path: '/books',
methods: [ apigwv2.HttpMethod.GET ],
integration: getBooksIntegration,
});
httpApi.addRoutes({
path: '/books',
methods: [ apigwv2.HttpMethod.POST ],
integration: createBookIntegration,
});
Members
| Name | Description |
|---|---|
| ANY | HTTP ANY. |
| DELETE | HTTP DELETE. |
| GET | HTTP GET. |
| HEAD | HTTP HEAD. |
| OPTIONS | HTTP OPTIONS. |
| PATCH | HTTP PATCH. |
| POST | HTTP POST. |
| PUT | HTTP PUT. |
ANY
HTTP ANY.
DELETE
HTTP DELETE.
GET
HTTP GET.
HEAD
HTTP HEAD.
OPTIONS
HTTP OPTIONS.
PATCH
HTTP PATCH.
POST
HTTP POST.
PUT
HTTP PUT.

.NET
Go
Java
Python
TypeScript (