Creates a routine.

Note
  • The parameters must comply with the rules of EnvConf. The description of a routine cannot exceed 50 characters in length.
  • This operation creates a routine that contains only production and staging environments.

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 parameter

Parameter Type Required Example Description
Action String Yes CreateRoutine

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

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.

Description String No the description of this routine

The description of the routine.

EnvConf Json No {"Staging":{"SpecName":"50ms"},"Production":{"SpecName":"50ms"}}

The configurations of the environment (Env).

Response parameters

Parameter Type Example Description
Content Map "Status": "OK"

Returns ""Status": "OK"".

RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368

The ID of the request.

Examples

Sample requests

http://dcdn.aliyuncs.com/?Action=CreateRoutine&Name="test"&Description="the description of this routine"&EnvConf={"Staging":{"SpecName":"50ms"},"Production":{"SpecName":"50ms"}}&<Common request parameters>

Sample success responses

XML format

<RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
<Content>
    <Status>OK</Status>
</Content>

JSON format

{
    "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
    "Content": {
        "Status": "OK"
    }
}

Error codes

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

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