Updates AScript rules.
Operation description
UpdateAScripts is an an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the ListAScripts operation to query the status of an AScript rule.
- If the rule is in the Configuring state, the rule is being updated.
- If the rule is in the Available state, the rule is updated.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
| b1f642ac-5558-4a36-b7d9-cf53f40ea5c8 |
DryRun | boolean | No | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
| false |
AScripts | array<object> | No | The information about the AScript rule. | |
object | No | The AScript rule. | ||
AScriptName | string | No | The name of the AScript rule. The name must be 2 to 128 character in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. | Group1 |
Enabled | boolean | No | Specifies whether to enable the AScript rule. Valid values:
| true |
ScriptContent | string | No | The content of the AScript rule. | if and(match_re($uri, '^/1.txt$'), $arg_type) { rewrite(concat('/1.', $arg_type), 'break') } |
ExtAttributes | array<object> | No | The extended attribute. | |
object | No | |||
AttributeKey | string | Yes | The attribute name. Set the value to EsDebug, which specifies that when requests carry the _es_dbg parameter whose value is the specified key, the debugging header is enabled to output the execution result. | EsDebug |
AttributeValue | string | Yes | The attribute value, which must be 1 to 128 characters in length, and can contain letters and digits. | test123 |
AScriptId | string | Yes | The rule ID. | as-mhqxcanmivn4g5**** |
ExtAttributeEnabled | boolean | No | Specifies whether to enable the extended attributes of the Ascript rule. Valid values:
| true |
Response parameters
Examples
Sample success responses
JSON
format
{
"JobId": "2e82b5f4-1ba9-4d20-89c8-1082ebaa****",
"RequestId": "ACA19FE1-C09E-53C7-8FDA-560F49D71891"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IncorrectStatus.Listener | The status of %s [%s] is incorrect. | The status of %s [%s] is incorrect. |
400 | ResourceQuotaExceeded.AScriptsNum | The quota of %s is exceeded for resource %s, usage %s/%s. | - |
400 | ResourceQuotaExceeded.AScriptsTotalLinesNum | The quota of %s is exceeded for resource %s, usage %s/%s. | - |
400 | ResourceQuotaExceeded.AScriptLinesNum | The quota of %s is exceeded for resource %s, usage %s/%s. | - |
404 | ResourceNotFound.Ascript | The specified resource of %s is not found. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-06-11 | The Error code has changed | View Change Details |
2024-06-11 | The Error code has changed | View Change Details |
2024-01-24 | The Error code has changed | View Change Details |
2024-01-18 | The Error code has changed | View Change Details |