All Products
Search
Document Center

Server Load Balancer:ListAScripts

Last Updated:Sep 09, 2024

Queries AScript rules.

Debugging

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

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
alb:ListAScriptslist
  • LoadBalancer
    acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. Valid values:

  • You do not need to specify this parameter for the first request.****
  • You must specify the token that is obtained from the previous query as the value of NextToken.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultsintegerNo

The maximum number of entries to return.

Valid values: 1 to 100.

Default value: 20. If you do not specify this parameter, the default value is used.

50
ListenerIdsarrayNo

The listener IDs. You can specify at most 20 listener IDs in each call.

stringNo

The listener ID.

lsn-9v9b8576m2laih****
AScriptIdsarrayNo

The AScript rule IDs. You can specify at most 20 IDs in each call.

stringNo

The rule ID.

as-aznwocxofkakf7****
AScriptNamesarrayNo

The AScript rule names. You can specify at most 10 names in each call.

stringNo

The name of the AScript rule.

test

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

TotalCountinteger

The total number of entries returned.

Note This parameter is optional. By default, this parameter is not returned.
1000
RequestIdstring

The request ID.

2CA81429-F160-593A-8AB5-A2A9617845B9
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

  • If NextToken is empty, no next page exists.
  • If a value is returned for NextToken, the value is the token that determines the start point of the next query.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultsinteger

The maximum number of entries returned.

50
AScriptsarray<object>

The AScript rules.

object

The AScript rule.

AScriptIdstring

The AScript rule ID.

as-aznwocxofkakf7****
AScriptNamestring

The name of the AScript rule.

test
Enabledboolean

Indicates whether the AScript rule is enabled. Valid values:

  • true
  • false
true
ScriptContentstring

The content of the AScript rule.

{test}
AScriptStatusstring

The status of the AScript rule. Valid values:

  • Creating
  • Available
  • Configuring
  • Deleting
Available
ListenerIdstring

The listener ID.

lsn-t0w1m9r6suiwmc****
LoadBalancerIdstring

The Application Load Balancer (ALB) instance ID.

alb-vv9rg2ub31tyec****

Examples

Sample success responses

JSONformat

{
  "TotalCount": 1000,
  "RequestId": "2CA81429-F160-593A-8AB5-A2A9617845B9",
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "MaxResults": 50,
  "AScripts": [
    {
      "AScriptId": "as-aznwocxofkakf7****",
      "AScriptName": "test",
      "Enabled": true,
      "ScriptContent": "{test}",
      "AScriptStatus": "Available",
      "ListenerId": "lsn-t0w1m9r6suiwmc****",
      "LoadBalancerId": "alb-vv9rg2ub31tyec****"
    }
  ]
}

Error codes

HTTP status codeError codeError message
400Forbidden.LoadBalancerAuthentication has failed for LoadBalancer.

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

Change history

Change timeSummary of changesOperation
2024-01-17The Error code has changedView Change Details