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
with Amazon API Gateway
Attach a method to an existing REST API resource and redeploy.
- Confirm the target REST API exists before modifying it.
- List the resources for the REST API to obtain a target resource id.
- Add the requested HTTP method to the resolved resource.
- 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.