Uploads staging code for an edge function (ER).
Operation description
Each upload of staging code for an edge function generates a version number, occupies one CodeRev code version slot, and is used only for testing.
This operation automatically publishes the code to the canary environment.
An edge function can retain a maximum of 10 version numbers. After the limit is exceeded, manually call DeleteRoutineCodeRevision to delete unused versions.
API call frequency: 100 calls per second.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dcdn:UploadStagingRoutineCode |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The name of the edge function. The name must be unique within the same account. |
test |
| CodeDescription |
string |
No |
The version description. |
describetion |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Content |
object |
The parameters required for the code. |
OssPostConfig and CodeRevision |
| RequestId |
string |
The request ID. |
DFA2027F-86C0-4421-9593-581A7993696C |
Examples
Success response
JSON format
{
"Content": {
"test": "test",
"test2": 1
},
"RequestId": "DFA2027F-86C0-4421-9593-581A7993696C"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | EdgeRoutine.GeneralError | A server error occurred: %s | A server error occurred. Try again later. If the error persists, submit a ticket. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.