From 429a82b8e055d80a6af2afa078dc1ec0ab932b63 Mon Sep 17 00:00:00 2001 From: Sludge Date: Thu, 24 Aug 2023 13:53:38 +0100 Subject: [PATCH] Update documentation for webhooks to show new method option --- docs/webhook.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/webhook.md b/docs/webhook.md index 984919fa..038940e0 100644 --- a/docs/webhook.md +++ b/docs/webhook.md @@ -20,6 +20,7 @@ constructs: authorizer: handler: myAuthorizer.main path: /my-webhook-endpoint + method: POST plugins: - serverless-lift @@ -162,6 +163,23 @@ constructs: Always favor dynamic path selector to ensure the minimum amount of compute is executed downstream. The list of available dynamic selector is available in [API Gateway documentation](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html#http-api-develop-integrations-aws-services-parameter-mapping). +### Method + +_Optional_ +Defaults to `POST` + +This is the HTTP method the webhook will accept. It can be any of the following: +- `POST` +- `PUT` +- `PATCH` + +```yaml +constructs: + stripe: + # ... + method: POST +``` + ## Extensions You can specify an `extensions` property on the webhook construct to extend the underlying CloudFormation resources. In the exemple below, the EventBridge Bus CloudFormation resource generated by the `stripe` webhook construct will be extended with the new `Name: StripeBus` CloudFormation property.