Generates an official code version from unstable JavaScript code that is in the staging environment. The version can be used in the canary release or production environment.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CommitStagingRoutineCode

The operation that you want to perform. Set the value to CommitStagingRoutineCode.

CodeDescription String Yes Hello World

The description of the code version.

Name String Yes test

The name of the routine. The name must be unique among the routines that belong to the same Alibaba Cloud account.

Response parameters

Parameter Type Example Description
Content Map 1620876959997924701

The version number of the code.

RequestId String 5CC228B4-7A67-4016-9C9F-4A4133494A91

The ID of the request.

Examples

Sample requests

http://dcdn.aliyuncs.com/?Action=CommitStagingRoutineCode&Name="test"&CodeDescription="Hello World"&<Common request parameters>

Sample success responses

XML format

<RequestId>A513734D-D17B-411E-864D-XXXX</RequestId>
<Content>
    <CodeRevision>1620876959997924701</CodeRevision>
</Content>

JSON format

{
  "RequestId": "A513734D-D17B-411E-864D-XXXX",
  "Content": {
    "CodeRevision": "1620876959997924701"
  }
}

Error codes

HttpCode Error code Error message Description
400 EdgeRoutine.GeneralError A server error occurred: %s The error message returned because an error %s occurred on the server. If the problem persists, submit a ticket.

For a list of error codes, visit the API Error Center.