Created
August 18, 2021 19:01
-
-
Save Lucifergene/180738ec994ce28d4b4d8fa7c71bbab7 to your computer and use it in GitHub Desktop.
Intregation Request Mapping Template of POST Method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"TableName": "URL-Shortener", | |
"ConditionExpression": "attribute_not_exists(id)", | |
"Key": { | |
"shortId": { | |
"S": $input.json('$.shortURL') | |
} | |
}, | |
"ExpressionAttributeNames": { | |
"#u": "longURL", | |
"#o": "owner" | |
}, | |
"ExpressionAttributeValues": { | |
":u": { | |
"S": $input.json('$.longURL') | |
}, | |
":o": { | |
"S": $input.json('$.owner') | |
} | |
}, | |
"UpdateExpression": "SET #u = :u, #o = :o", | |
"ReturnValues": "ALL_NEW" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment