All Products
Search
Document Center

Virtual Private Cloud:ListPrefixLists

Last Updated:Oct 19, 2026

Queries the details of 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 the prefix lists. Valid values of N: 1 to 100. You can query up to 100 prefix lists at a time.

pl-m5estsqsdqwg88hjf****

string

No

The instance ID of the prefix list.

pl-0b7hwu67****

NextToken

string

No

The token for the next query. Valid values:

  • If this is the first query or no next query is required, leave this parameter empty.

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

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

No

The number of entries to return on each 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 list of tags.

object

No

The list of tags.

Key

string

No

The tag key of the resource. You can specify up to 20 tag keys. If you specify this parameter, you cannot specify an empty string.

A tag key can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

FinanceDept

Value

string

No

The tag value of the resource. You can specify up to 20 tag values. If you specify this parameter, you can specify an empty string.

A tag value can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

FinanceJoshua

RegionId

string

Yes

The region ID of the prefix list.

You can call the DescribeRegions operation to query region IDs.

cn-hangzhou

PrefixListName

string

No

The name of the prefix list.

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

The token for the next query. Valid values:

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

  • If NextToken has a return value, the value indicates the token for the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

TotalCount

integer

The total number of prefix lists returned.

1

MaxResults

integer

The number of entries to return on each page. Valid values: 1 to 100. Default value: 20.

20

PrefixLists

array<object>

The details of the prefix lists.

array<object>

The details of the prefix lists.

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: IPv4.

  • IPV6: IPv6.

IPV4

CreationTime

string

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

2022-07-12T14:22:32Z

CidrBlocks

array

The Classless Inter-Domain Routing block information of the prefix list.

string

The Classless Inter-Domain Routing block information of the prefix list.

100.115.XX.XX/24

ShareType

string

The sharing type of the prefix list. Valid values:

  • Shared: The prefix list is shared.

  • Empty: The prefix list is not shared.

Shared

MaxEntries

integer

The maximum number of entries for Classless Inter-Domain Routing in the prefix list.

10

Status

string

The status of the prefix list. Valid values:

  • Created: The prefix list is created.

  • Deleted: The prefix list is deleted.

  • Modifying: The prefix list is being modified.

Created

OwnerId

string

The Alibaba Cloud account to which the prefix list belongs.

1210123456123456

PrefixListStatus

string

The status of the prefix list. Valid values:

  • Created: The prefix list is created.

  • Deleted: The prefix list is deleted.

  • Modifying: The prefix list is being modified.

Note

This parameter has the same meaning and valid values as Status.

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 list of tags.

object

The list of tags.

Key

string

The tag key.

FinanceDept

Value

string

The tag value.

FinanceJoshua

PrefixListType

string

The type of the prefix list.

Custom

Examples

Success response

JSON format

{
  "RequestId": "DF72F7BB-5DFA-529C-887E-B0BB70D89C4F",
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "TotalCount": 1,
  "MaxResults": 20,
  "PrefixLists": [
    {
      "PrefixListId": "pl-m5estsqsdqwg88hjf****",
      "PrefixListName": "test",
      "PrefixListDescription": "Created with oss service by system.",
      "IpVersion": "IPV4",
      "CreationTime": "2022-07-12T14:22:32Z",
      "CidrBlocks": [
        "100.115.XX.XX/24"
      ],
      "ShareType": "Shared",
      "MaxEntries": 10,
      "Status": "Created",
      "OwnerId": "1210123456123456",
      "PrefixListStatus": "Created",
      "RegionId": "cn-hangzhou",
      "ResourceGroupId": "rg-bp67acfmxazb4ph****",
      "Tags": [
        {
          "Key": "FinanceDept",
          "Value": "FinanceJoshua"
        }
      ],
      "PrefixListType": "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.