All Products
Search
Document Center

Virtual Private Cloud:ListPrefixLists

Last Updated:Aug 28, 2026

Queries prefix lists.

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

vpc:ListPrefixLists

list

PrefixList

acs:vpc:{#regionId}:{#accountId}:prefixlist/*

None None

Request parameters

Parameter

Type

Required

Description

Example

PrefixListIds

array

No

The IDs of prefix lists to query. Valid values of N: 1 to 100. You can query up to 100 prefix lists at a time.

pl-m5estsqsdqwg88hjf****

string

No

The ID of the prefix list.

pl-0b7hwu67****

NextToken

string

No

The pagination token for 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 obtained from the previous query as the value of NextToken.

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

No

The number of entries per page. Valid values: 1 to 100. Default value: 20.

20

ResourceGroupId

string

No

The ID of the resource group to which the prefix list belongs.

rg-bp67acfmxazb4ph****

Tags

array<object>

No

The tags.

object

No

Key

string

No

The tag key. You can specify up to 20 tag keys. It cannot be an empty string.

The key can be up to 64 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter but cannot start with aliyun or acs:. It cannot contain http:// or https://.

FinanceDept

Value

string

No

The tag value. You can specify up to 20 tag values. It can be an empty string.

The tag value can be up to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The key must start with a letter but cannot start with aliyun or acs:. The key cannot contain http:// or https://.

FinanceJoshua

RegionId

string

Yes

The ID of the region where you want to query prefix lists.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou

PrefixListName

string

No

The name of the prefix list to query.

The name must be 1 to 128 characters in length and cannot start with http:// or https://.

name

Response elements

Element

Type

Description

Example

object

The request ID.

RequestId

string

The request ID.

DF72F7BB-5DFA-529C-887E-B0BB70D89C4F

NextToken

string

A pagination token. Use it 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, use the value for the next request to retrieve a new page of results.

FFmyTO70tTpLG6I3FmYAXGKPd****

TotalCount

integer

The total number of entries returned.

1

MaxResults

integer

The number of entries per page. Valid values: 1 to 100. Default value: 20.

20

PrefixLists

array<object>

The prefix lists.

array<object>

PrefixListId

string

The ID of the prefix list.

pl-m5estsqsdqwg88hjf****

PrefixListName

string

The name of the prefix list.

test

PrefixListDescription

string

The description of the prefix list.

Created with oss service by system.

IpVersion

string

The IP version of the prefix list. Valid values:

  • IPV4

  • IPV6

IPV4

CreationTime

string

The time when the prefix list was created.

2022-07-12T14:22:32Z

CidrBlocks

array

The CIDR block specified in the prefix list.

string

The CIDR block specified in the prefix list.

100.115.XX.XX/24

ShareType

string

Whether the prefix list is shared. Valid values:

  • Shared: The prefix list is shared.

  • If an empty value is returned, the prefix list is not shared.

Shared

MaxEntries

integer

The maximum number of CIDR blocks allowed in the prefix list.

10

Status

string

The status of the prefix list. Valid values:

  • Created

  • Deleted

  • Modifying

Created

OwnerId

string

The Alibaba Cloud account that owns the prefix list.

1210123456123456

PrefixListStatus

string

The status of the prefix list. Valid values:

  • Created

  • Deleted

  • Modifying

Note

This parameter is the same as the Status parameter.

Created

RegionId

string

The region ID of the prefix list.

cn-hangzhou

ResourceGroupId

string

The ID of the resource group to which the prefix list belongs.

rg-bp67acfmxazb4ph****

Tags

array<object>

The tags.

object

Key

string

The tag key.

FinanceDept

Value

string

The tag value.

FinanceJoshua

PrefixListType

string

The type of the prefix list.

Custom

Error codes

HTTP status code

Error code

Error message

Description

400 IllegalParam.NextToken The specified NextToken is invalid. The specified NextToken is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.