This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Description
So, the Update function API takes a functionId in the url and in the request body. I thought the reason why you needed it twice was due to the fact that you will use the functionId from the url to 'get' the function but will use the functionId value from the request to 'update' the name. But that is not the case:
curl -X PUT http://localhost:8056/v1/functions/getUser \
-d '{
"functionId": "getUser1",
"provider": {
"type": "awslambda",
"arn": "arn:aws:lambda:us-east-1:063733696545:function:user-service-prod-getUserUpdated",
"region": "us-east-1"
}
}'
# response
{
"functionId": "getUser",
"provider": {
"type": "awslambda",
"arn": "arn:aws:lambda:us-east-1:063733696545:function:user-service-prod-getUserUpdated",
"region": "us-east-1"
}
}
So my questions are:
- Can the
functionId be updated?
- If
functionId cannot be updated, then why do we need to pass in functionId in the request body?
Please explain what the intended functionality is.