Bird
0
0

Which of the following is the correct way to define a POST method on a resource in AWS API Gateway using AWS CLI?

easy📝 Syntax Q3 of 15
AWS - API Gateway
Which of the following is the correct way to define a POST method on a resource in AWS API Gateway using AWS CLI?
Aaws apigateway delete-method --rest-api-id abc123 --resource-id xyz789 --http-method POST
Baws apigateway create-resource --rest-api-id abc123 --parent-id xyz789 --path-part POST
Caws apigateway put-method --rest-api-id abc123 --resource-id xyz789 --http-method POST --authorization-type NONE
Daws apigateway get-method --rest-api-id abc123 --resource-id xyz789 --http-method POST
Step-by-Step Solution
Solution:
  1. Step 1: Understand AWS CLI commands for methods

    To define a method, use 'put-method' with the HTTP method and resource ID.
  2. Step 2: Exclude other commands

    'create-resource' creates a resource, 'delete-method' removes a method, 'get-method' retrieves method info.
  3. Final Answer:

    aws apigateway put-method --rest-api-id abc123 --resource-id xyz789 --http-method POST --authorization-type NONE -> Option C
  4. Quick Check:

    Define method = put-method [OK]
Quick Trick: Use put-method to add HTTP methods [OK]
Common Mistakes:
  • Using create-resource to add methods
  • Confusing delete-method with creation
  • Using get-method to define methods

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes