All Products
Search
Document Center

Server Load Balancer:ListAScripts

Last Updated:Aug 28, 2026

Retrieves a list of AScript rules.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

alb:ListAScripts

list

*LoadBalancer

acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}

None None

Request parameters

Parameter

Type

Required

Description

Example

NextToken

string

No

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****

MaxResults

integer

No

The maximum number of entries to return.

Valid values: 1 to 100.

Default value: 20.

50

ListenerIds

array

No

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

string

No

The listener ID.

lsn-9v9b8576m2laih****

AScriptIds

array

No

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

string

No

The rule ID.

as-aznwocxofkakf7****

AScriptNames

array

No

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

string

No

The name of the AScript rule.

test

Response elements

Element

Type

Description

Example

object

Schema of Response

TotalCount

integer

The total number of entries returned.

Note

This parameter is optional. By default, this parameter is not returned.

1000

RequestId

string

The request ID.

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

NextToken

string

A pagination token 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 determines the start point of the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

The maximum number of entries returned.

50

AScripts

array<object>

The AScript rules.

object

The AScript rule.

AScriptId

string

The AScript rule ID.

as-aznwocxofkakf7****

AScriptName

string

The name of the AScript rule.

test

Enabled

boolean

Indicates whether the AScript rule is enabled. Valid values:

  • true

  • false

true

ScriptContent

string

The content of the AScript rule.

{test}

AScriptStatus

string

The status of the AScript rule. Valid values:

  • Creating

  • Available

  • Configuring

  • Deleting

Available

ListenerId

string

The listener ID.

lsn-t0w1m9r6suiwmc****

LoadBalancerId

string

The Application Load Balancer (ALB) instance ID.

alb-vv9rg2ub31tyec****

Examples

Success response

JSON format

{
  "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 code

Error code

Error message

Description

400 Forbidden.LoadBalancer Authentication has failed for LoadBalancer.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.