All Products
Search
Document Center

Virtual Private Cloud:GetVpcPrefixListAssociations

Last Updated:Mar 22, 2024

Queries the resources that are associated with a prefix list.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:GetVpcPrefixListAssociationsRead
  • PrefixList
    acs:vpc:{#regionId}:{#accountId}:prefixlist/{#PrefixListId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PrefixListIdstringYes

The ID of the prefix list that you want to query.

pl-0b7hwu67****
NextTokenstringNo

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.
  • If a value is returned for NextToken, specify the value in the next request to retrieve a new page of results.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultslongNo

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

20
RegionIdstringYes

The region ID of the prefix list.

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

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

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

A pagination token. It can be 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 is used to retrieve a new page of results.
FFmyTO70tTpLG6I3FmYAXGKPd****
TotalCountlong

The number of entries returned.

1
Countlong

The number of entries.

1
PrefixListAssociationobject []

The information about the network instances that are associated with the prefix list.

PrefixListIdstring

The prefix list ID.

pl-0b7hwu67****
ResourceIdstring

The ID of the associated resource.

vtb-bp1drpcfz9srr393h****
ResourceTypestring

The type of the associated resource. Valid values:

  • vpcRouteTable: virtual private cloud (VPC) route table.
  • trRouteTable: route table of a transit router.
vpcRouteTable
OwnerIdstring

The ID of the Alibaba Cloud account to which the prefix list belongs.

153460731706****
Statusstring

The status of the prefix list. Valid values:

  • Created
  • ModifyFailed
  • Creating
  • Modifying
  • Deleting
  • Deleted
Success
Reasonstring

The reason why the association failed.

failed
RegionIdstring

The region ID of the prefix list.

cn-hangzhou
ResourceUidstring

The ID of the Alibaba Cloud account to which the resource associated with the prefix list belongs.

132193271328****

Examples

Sample success responses

JSONformat

{
  "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****"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalParam.NextTokenThe specified NextToken is invalid.The specified NextToken is invalid.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history