capabilities.work

Add a Method and Redeploy

A 4-step recipe with Amazon API Gateway. We can help you get access.

Recipe · 4 steps

Add a Method and Redeploy

Attach a method to an existing REST API resource and redeploy.

  1. Confirm the target REST API exists before modifying it.
  2. List the resources for the REST API to obtain a target resource id.
  3. Add the requested HTTP method to the resolved resource.
  4. Create a deployment so the new method is published to the stage.
What you'll need to have ready
  • restApiId: Identifier of the existing REST API.
  • resourceId: Optional explicit resource id; when omitted the first listed resource is used.
  • httpMethod: HTTP verb to add to the resource.
  • authorizationType: Authorization type for the method.
  • apiKeyRequired: Whether the method requires an API key.
  • stageName: Stage to publish the redeployment to.
For your developer

Arazzo workflow aws-api-gateway:add-method-and-redeploy, 4 operations: GetRestApi → GetResources → PutMethod → CreateDeployment. Specs on APIs.io.