I am copying an exact example from aws to upload an integration request base mapping to my api via the cli and I am getting an error.
This is the command:
aws apigateway update-integration --rest-api-id a1b2c3d4e5 --resource-id a1b2c3 --http-method POST --patch-operations op='replace',path='/requestTemplates/application~1json',value='{"example": "json"}'
and this is the error:
Error parsing parameter '--patch-operations': Expected: '=', received: '"' for input:
op=add,path=/requestTemplates/application~1json,value={"example": "json"}
^
This is where I found the command: https://docs.aws.amazon.com/cli/latest/reference/apigateway/update-integration.html
What is going on?
Found the solution, wrap the command in quotes:
aws apigateway update-integration --rest-api-id a1b2c3d4e5 --resource-id a1b2c3 --http-method POST --patch-operations "op='replace',path='/requestTemplates/application~1json',value='{"example": "json"}'"
AWS should update their example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With