All Products
Search
Document Center

Server Load Balancer:UpdateAScripts

Last Updated:Jul 15, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ClientTokenstringNo

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
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
  • false(default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
false
AScriptsarray<object>No

The information about the AScript rule.

objectNo

The AScript rule.

AScriptNamestringNo

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
EnabledbooleanNo

Specifies whether to enable the AScript rule. Valid values:

  • true
  • false (default)
true
ScriptContentstringNo

The content of the AScript rule.

if and(match_re($uri, '^/1.txt$'), $arg_type) { rewrite(concat('/1.', $arg_type), 'break') }
ExtAttributesarray<object>No

The extended attribute.

objectNo
AttributeKeystringYes

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
AttributeValuestringYes

The attribute value, which must be 1 to 128 characters in length, and can contain letters and digits.

test123
AScriptIdstringYes

The rule ID.

as-mhqxcanmivn4g5****
ExtAttributeEnabledbooleanNo

Specifies whether to enable the extended attributes of the Ascript rule. Valid values:

  • true
  • false (false)
true

Response parameters

ParameterTypeDescriptionExample
object

Updates AScript rules.

JobIdstring

The asynchronous task ID.

2e82b5f4-1ba9-4d20-89c8-1082ebaa****
RequestIdstring

The request ID.

ACA19FE1-C09E-53C7-8FDA-560F49D71891

Examples

Sample success responses

JSONformat

{
  "JobId": "2e82b5f4-1ba9-4d20-89c8-1082ebaa****",
  "RequestId": "ACA19FE1-C09E-53C7-8FDA-560F49D71891"
}

Error codes

HTTP status codeError codeError messageDescription
400IncorrectStatus.ListenerThe status of %s [%s] is incorrect.The status of %s [%s] is incorrect.
400ResourceQuotaExceeded.AScriptsNumThe quota of %s is exceeded for resource %s, usage %s/%s.-
400ResourceQuotaExceeded.AScriptsTotalLinesNumThe quota of %s is exceeded for resource %s, usage %s/%s.-
400ResourceQuotaExceeded.AScriptLinesNumThe quota of %s is exceeded for resource %s, usage %s/%s.-
404ResourceNotFound.AscriptThe specified resource of %s is not found.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-06-11The Error code has changedView Change Details
2024-06-11The Error code has changedView Change Details
2024-01-24The Error code has changedView Change Details
2024-01-18The Error code has changedView Change Details