Home > @codemonger-io/cdk-rest-api-with-spec > IResourceWithSpec > addMethod
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Adds a method with the OpenAPI definition.
Signature:
addMethod(httpMethod: string, target?: apigateway.Integration, options?: MethodOptionsWithSpec): apigateway.Method;|
Parameter |
Type |
Description |
|---|---|---|
|
httpMethod |
string | |
|
target |
apigateway.Integration |
(Optional) |
|
options |
(Optional) |
Returns:
apigateway.Method