All Products
Search
Document Center

Virtual Private Cloud:GetVpcPrefixListAssociations

Last Updated:Jun 19, 2026

Queries the associations of a prefix list by calling the GetVpcPrefixListAssociations operation.

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:GetVpcPrefixListAssociations

get

*PrefixList

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

None None

Request parameters

Parameter

Type

Required

Description

Example

PrefixListId

string

Yes

The instance ID of the prefix list to query.

pl-0b7hwu67****

NextToken

string

No

The pagination token. Valid values:

  • Leave this parameter empty for the first query or if no subsequent query is required.

  • If a subsequent query is required, set this parameter to the NextToken value returned in the previous API call.

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

No

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

20

RegionId

string

Yes

The region ID of the prefix list to query.

You can call the DescribeRegions operation to query the region ID.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

4EC47282-1B74-4534-BD0E-403F3EE64CAF

NextToken

string

The pagination token. Valid values:

  • If NextToken is empty, no subsequent query exists.

  • If NextToken is returned, the value indicates the token for the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

TotalCount

integer

The total number of entries returned.

1

Count

integer

The number of entries returned.

1

PrefixListAssociation

array<object>

The association information of the prefix list.

object

The association information of the prefix list.

PrefixListId

string

The instance ID of the prefix list.

pl-0b7hwu67****

ResourceId

string

The ID of the associated resource.

vtb-bp1drpcfz9srr393h****

ResourceType

string

The type of the associated resource. Valid values:

  • vpcRouteTable: VPC route table.

  • trRouteTable: transit router route table.

vpcRouteTable

OwnerId

string

The ID of the Alibaba Cloud account that owns the prefix list.

153460731706****

Status

string

The association status of the prefix list. Valid values:

  • Created: The association is created.

  • ModifyFailed: The association is not updated to the latest version.

  • Creating: The association is being created.

  • Modifying: The association is being modified.

  • Deleting: The association is being deleted.

  • Deleted: The association is deleted.

Success

Reason

string

The reason for the association failure.

failed

RegionId

string

The region ID of the prefix list.

cn-hangzhou

ResourceUid

string

The ID of the Alibaba Cloud account that owns the resource associated with the prefix list.

132193271328****

CidrList

string

The list of CIDR blocks in the prefix list that are effective for the associated resource.

192.168.0.0/16

Examples

Success response

JSON format

{
  "RequestId": "4EC47282-1B74-4534-BD0E-403F3EE64CAF",
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "TotalCount": 1,
  "Count": 1,
  "PrefixListAssociation": [
    {
      "PrefixListId": "pl-0b7hwu67****",
      "ResourceId": "vtb-bp1drpcfz9srr393h****",
      "ResourceType": "vpcRouteTable",
      "OwnerId": "153460731706****",
      "Status": "Success",
      "Reason": "failed",
      "RegionId": "cn-hangzhou",
      "ResourceUid": "132193271328****",
      "CidrList": "192.168.0.0/16"
    }
  ]
}

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.