Modifies the configuration of an edge function (ER).
Operation description
You can modify only the configurations that you need. Other configurations retain their previous settings.
To delete a configuration, manually set its value to empty.
This operation can create a canary environment (the name must comply with naming conventions, otherwise the setting fails).
- Preset canary regions (34 China regions + 1 overseas region):
Overseas region: presetCanaryOverseas.
34 China regions: presetCanaryXX. For example, the Beijing region is presetCanaryBeijing. The regions are as follows: Anhui, Beijing, Chongqing, Fujian, Gansu, Guangdong, Guangxi, Guizhou, Hainan, Hebei, Heilongjiang, Henan, Hong-Kong, Hubei, Hunan, Jiangsu, Jiangxi, Jilin, Liaoning, Macau, Neimenggu, Ningxia, Qinghai, Shaanxi, Shandong, Shanghai, Shanxi, Sichuan, Taiwan, Tianjin, Xinjiang, Xizang, Yunnan, Zhejiang.
API call frequency: 100 calls per second.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dcdn:EditRoutineConf |
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-slc-1 |
| Description |
string |
No |
The description of the edge function. |
the description of this routine |
| EnvConf |
object |
No |
The environment configuration. |
{"staging":{"SpecName":"50ms","AllowedHosts":["test-a.alicdn.com","test-b.alicdn.com"]},"production":{"SpecName":"50ms","AllowedHosts":["test-c.alicdn.com","test-d.alicdn.com"]},"presetCanaryZhejiang":{"SpecName":"100ms","AllowedHosts":["test-e.alicdn.com","test-f.alicdn.com"]},"presetCanaryBeijing":{"SpecName":"5ms","AllowedHosts":["test-g.alicdn.com","test-h.alicdn.com"]},"presetCanaryNotExist":{"SpecName":"5ms","CodeRev":"1622446907645949975","AllowedHosts":["error hosts"]}} |
EnvConf field description
| Name | Type | Description |
| SpecName | String | The CPU specification time slice. |
| CodeRev | String | The code version number. |
| AllowedHosts | String | The CDN domain names that are allowed to be associated. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Content |
object |
The execution error description and the latest configuration version number for each environment. |
Description and EnvConfRev |
| RequestId |
string |
The request ID. |
BAECB354-6D42-42C1-87DA-C9992EF1E7C8 |
Content parameter
| Name | Type | Example | Description |
| Description | String | Validate (Env: presetCanaryNotExist, Error: not valid canary name ) | The routine description. |
| EnvConfRev | JSON | 1622033526212272495 | The configuration version number for each environment. |
Examples
Success response
JSON format
{
"Content": {
"test": "test",
"test2": 1
},
"RequestId": "BAECB354-6D42-42C1-87DA-C9992EF1E7C8"
}
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.