ListRouteMaps

Updated at:

Queries the details of one or more route maps.

Operation description

Request description

  • RouteMapIds: Optional. The list of IDs of one or more route maps to query. If you do not specify this parameter, all route maps are queried by default.

  • Filter: Optional. The filter conditions used to filter route maps based on specific attributes such as name and direction.

  • ResourceGroupId: Optional. The ID of the resource group used to further filter the results.

  • DryRun: Optional. Specifies whether to precheck the request without actually performing the operation.

  • MaxResults and NextToken: Pagination parameters used to control the number of returned results and obtain the next page of data.

Note: When both RouteMapIds and Filter are used, they have an OR relationship. A route map is returned if it meets either condition.

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

cen:ListRouteMaps

list

RouteMap

acs:cen:*:{#accountId}:routemap/*

RouteMap

acs:cen:*:{#accountId}:routemap/{#RouteMapId}

None None

Request syntax

GET / HTTP/1.1

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 generate a parameter value on your client to ensure that the parameter value is unique across different requests. The ClientToken parameter supports only ASCII characters.

Note

If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId of each API request may be different.

02fb3da4-130e-11e9-8e44-001****

RouteMapIds

array

No

The IDs of the route maps to query. If you do not specify this parameter, all route maps are queried.

string

No

The IDs of the route maps to query. If you do not specify this parameter, all route maps are queried.

rm-0a1b2c3d4e5f6a7b8

Filter

array<object>

No

The filter conditions.

You can specify up to 5 filter conditions at a time.

object

No

The filter conditions.

You can specify up to 5 filter conditions at a time.

Key

string

No

The filter condition. Valid values:

  • Direction: the direction of the route map.

  • Name: the name of the route map.

  • Priority: the priority of the route map.

By default, multiple filter conditions have an AND relationship. A route map is considered a match only if it meets all filter conditions.

You can specify up to 5 filter conditions at a time.

Priority

Value

array

No

The value of the filter condition.

Specify the filter value based on the Key. You can specify multiple filter values for a single Key. Multiple filter values have an OR relationship. A route map is considered a match if it meets any of the filter values.

You can specify up to 5 filter values for a single filter condition.

string

No

The value of the filter condition.

Specify the filter value based on the Key. You can specify multiple filter values for a single Key. Multiple filter values have an OR relationship. A route map is considered a match if it meets any of the filter values.

You can specify up to 5 filter values for a single filter condition.

10

ResourceGroupId

string

No

The ID of the resource group.

rg-0a1b2c3d4e5f6a7b8

DryRun

boolean

No

Specifies whether to precheck the request. Valid values:

  • true: prechecks the request without performing the query. The system checks whether required parameters are specified, the request format is valid, and the service limits are met. If the request fails the precheck, the corresponding error is returned. If the request passes the precheck, the DryRunOperation error code is returned.

  • false: sends the normal request. This is the default value.

true

MaxResults

integer

No

The number of entries to return on each page. Valid values: 1 to 100. If you do not specify the MaxResults parameter, pagination is not used. After you call the operation, the value of MaxResults indicates the total number of entries. If you specify the MaxResults parameter, pagination is used. After you call the operation, the value of MaxResults indicates the number of entries returned in the current query. Set MaxResults to 20.

10

NextToken

string

No

The token for the next query. Valid values:

  • If this is the first query or no next query is available, you do not need to specify this parameter.

  • If a next query is available, set the value to the NextToken value returned from the previous API call.

dd20****

Response elements

Element

Type

Description

Example

object

The time when the route map was created.

The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format.

RouteMaps

array<object>

The route map information.

array<object>

The route map information.

RouteMapId

string

The ID of the route map.

rm-y40mxdvf7joc12****

Name

string

The name of the route map.

test

Direction

string

The direction of the route map. Valid values:

  • Inbound: inbound.

  • Outbound: outbound.

Inbound

Description

string

The description of the route map.

desctest

Status

string

The status of the route map. Valid values:

  • Creating: The route map is being created.

  • Updating: The route map is being updated.

  • Active: The route map is available.

  • Deleting: The route map is being deleted.

Active

Priority

integer

The priority of the route map. A smaller value indicates a higher priority.

10

Version

integer

The version number of the route map configuration.

The version number increases each time the route map and its associated route map rules are modified.

7

CreationTime

string

The time when the route map was created.

The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDThh:mmZ format.

2026-03-28T02:29:19Z

ResourceGroupId

string

The ID of the resource group.

rg-acfmydlzjd6dlhi

Tag

array<object>

The list of tags.

object

The tag information.

Key

string

The tag key.

test

Value

string

The tag value.

jg

MaxResults

integer

The number of entries returned on each page. Default value: 20.

20

NextToken

string

The token for the next query. Valid values:

  • If NextToken is empty, no next query is available.

  • If NextToken returns a value, the value is the token for the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

TotalCount

integer

The total number of entries.

1

RequestId

string

The request ID.

B2063B16-852B-5B66-B73D-4ED4D1A5E5C2

Examples

Success response

JSON format

{
  "RouteMaps": [
    {
      "RouteMapId": "rm-y40mxdvf7joc12****",
      "Name": "test",
      "Direction": "Inbound",
      "Description": "desctest",
      "Status": "Active",
      "Priority": 10,
      "Version": 7,
      "CreationTime": "2026-03-28T02:29:19Z",
      "ResourceGroupId": "rg-acfmydlzjd6dlhi",
      "Tag": [
        {
          "Key": "test",
          "Value": "jg"
        }
      ]
    }
  ],
  "MaxResults": 20,
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "TotalCount": 1,
  "RequestId": "B2063B16-852B-5B66-B73D-4ED4D1A5E5C2"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidOperation.UnsupportFilterValue The specified FeatureFilter Value is not supported by this operation. The error message returned because the specified filter value is invalid.
400 IllegalParam.NextToken NextToken is illegal The error message returned because the NextToken parameter is set to an invalid value.
400 InvalidParameter.MaxResults The specified MaxResults is invalid. The error message returned because the MaxResults parameter is set to an invalid value.
400 InvalidParameter.RouteMapIds The specified RouteMapIds is invalid. The specified RouteMapIds is invalid.
400 InvalidParameter.Filter The specified Filter is invalid. The specified Filter is invalid.
400 IllegalParam.TagKey The tag keys are not valid. The error message returned because the specified tag key is invalid.
400 InvalidParameter.ResourceGroupId The specified parameter ResourceGroupId is invalid. The specified parameter ResourceGroupId is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.