UsersAPI
API in API Gateway console./users/{userId}
resource.Create method
.Create method
page - Method details
section:Method type
: Select DELETE
.delete-user
function.Keep other settings as default.
Create method
.You will be redirect to the detail of the /users/{userId} - DELETE
method.
Integration request
tab.Integration request settings
section, click Edit
.Edit integration request
page:Expand the URL path parameters
section:
Add path parameter
.Name
: Fill in userId
.Mapped from
: Fill in method.request.path.userId
.Expand the Mapping templates
section:
Click Add mapping template
.
Content type
: Fill in application/json
.
Template body
: Fill in:
{
"id": "$input.params('userId')"
}
Save
.