Queries the information of one or more prefix lists.
Description
You can specify the AddressFamily, PrefixListId.N, and PrefixListName request parameters to be queried. Specified parameters have logical AND relations.
Only the specified parameters are included in the filter conditions.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DescribePrefixLists |
The operation that you want to perform. Set the value to DescribePrefixLists. |
| RegionId | String | Yes | cn-chengdu |
The region ID. You can call the DescribeRegions operation to query the most recent region list. |
| PrefixListName | String | No | PrefixListNameSample |
The name of the prefix list. |
| NextToken | String | No | AAAAAdDWBF2**** |
The query token. Set the value to the |
| MaxResults | Integer | No | 10 |
The number of entries to return on each page. Maximum value: 100. Default value: 10. |
| AddressFamily | String | No | IPv4 |
The IP address family of the prefix list. Valid values:
This parameter is empty by default, which indicates that all prefix lists are queried. |
| PrefixListId.N | String | No | pl-x1j1k5ykzqlixdcy**** |
The ID of prefix list N. Valid values of N: 0 to 100. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| NextToken | String | AAAAAdDWBF2**** |
The query token returned in this call. If the return value is empty, no more data is returned. |
| RequestId | String | 38793DB8-A4B2-4AEC-BFD3-111234E9188D |
The ID of the request. |
| PrefixLists | Array of PrefixList |
Details about the prefix lists. |
|
| PrefixList | |||
| CreationTime | String | 2021-02-20T07:11Z |
The time when the prefix list was created. |
| AssociationCount | Integer | 1 |
The number of associated resources. |
| MaxEntries | Integer | 20 |
The maximum number of entries that the prefix list can contain. |
| Description | String | This is description. |
The description of the prefix list. |
| AddressFamily | String | IPv4 |
The IP address family of the prefix list. Valid values:
|
| PrefixListName | String | PrefixListNameSample |
The name of the prefix list. |
| PrefixListId | String | pl-x1j1k5ykzqlixdcy**** |
The ID of the prefix list. |
Examples
Sample requests
http(s)://ecs.aliyuncs.com/?Action=DescribePrefixLists
&RegionId=cn-chengdu
&PrefixListName=PrefixListNameSample
&NextToken=AAAAAdDWBF2****
&MaxResults=10
&AddressFamily=IPv4
&PrefixListId=["pl-x1j1k5ykzqlixdcy****"]
&<Common request parameters>
Sample responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribePrefixListsResponse>
<NextToken>AAAAAdDWBF2****</NextToken>
<RequestId>38793DB8-A4B2-4AEC-BFD3-111234E9188D</RequestId>
<PrefixLists>
<CreationTime>2021-02-20T07:11Z</CreationTime>
<AssociationCount>1</AssociationCount>
<MaxEntries>20</MaxEntries>
<Description>This is description.</Description>
<AddressFamily>IPv4</AddressFamily>
<PrefixListName>PrefixListNameSample</PrefixListName>
<PrefixListId>pl-x1j1k5ykzqlixdcy****</PrefixListId>
</PrefixLists>
</DescribePrefixListsResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"NextToken" : "AAAAAdDWBF2****",
"RequestId" : "38793DB8-A4B2-4AEC-BFD3-111234E9188D",
"PrefixLists" : [ {
"CreationTime" : "2021-02-20T07:11Z",
"AssociationCount" : 1,
"MaxEntries" : 20,
"Description" : "This is description.",
"AddressFamily" : "IPv4",
"PrefixListName" : "PrefixListNameSample",
"PrefixListId" : "pl-x1j1k5ykzqlixdcy****"
} ]
}
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | InvalidParameter | %s | The error message returned because a specified parameter is invalid. |
| 400 | LimitExceed.PrefixListId | The specified number of PrefixListId exceeds the limit. | The error message returned because the maximum number of prefix lists has been reached. |
For a list of error codes, visit the API Error Center.