Queries the information of prefix lists.
Operation description
You can specify the AddressFamily, PrefixListId.N, and PrefixListName request parameters in the request. Specified parameters have logical AND relations. Only the parameters that you set are included in the filter conditions.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribePrefixLists |
get |
*PrefixList
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. You can call the DescribeRegions operation to query the most recent region list. |
cn-chengdu |
| RegionId |
string |
Yes |
The region ID. You can call the DescribeRegions operation to query the most recent region list. |
cn-chengdu |
| PrefixListName |
string |
No |
The name of the prefix list. |
PrefixListNameSample |
| NextToken |
string |
No |
The pagination token that is used in the request to retrieve a new page of results. Set the value to the |
AAAAAdDWBF2**** |
| MaxResults |
integer |
No |
The number of entries per page. Valid values: 1 to 100. Default value: 10. |
10 |
| AddressFamily |
string |
No |
The IP address family. Valid values:
This parameter is empty by default, which indicates that all prefix lists are queried. |
IPv4 |
| PrefixListId |
array |
No |
The IDs of prefix lists. Valid values of N: 0 to 100. |
pl-x1j1k5ykzqlixdcy**** |
|
string |
No |
The ID of prefix list N. Valid values of N: 0 to 100. |
pl-x1j1k5ykzqlixdcy**** |
|
| ResourceGroupId |
string |
No |
The ID of the resource group to which the prefix list belongs. |
rg-bp67acfmxazb4p**** |
| Tag |
array<object> |
No |
The tags of the prefix list. |
|
|
object |
No |
Tag N of the prefix list. |
||
| Key |
string |
No |
The key of tag N of the prefix list. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length. It cannot start with aliyun or acs: and cannot contain |
TestKey |
| Value |
string |
No |
The value of tag N of the prefix list. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain |
TestValue |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The query token that is returned in this call. If the return value is empty, no more data is returned. |
AAAAAdDWBF2**** |
| RequestId |
string |
The request ID. |
38793DB8-A4B2-4AEC-BFD3-111234E9188D |
| PrefixLists |
object |
||
| PrefixList |
array<object> |
Details about the prefix lists. |
|
|
array<object> |
|||
| CreationTime |
string |
The time when the prefix list was created. |
2021-02-20T07:11Z |
| AssociationCount |
integer |
The number of associated resources. |
1 |
| MaxEntries |
integer |
The maximum number of entries that the prefix list can contain. |
20 |
| Description |
string |
The description of the prefix list. |
This is description. |
| AddressFamily |
string |
The IP address family of the prefix list. Valid values:
|
IPv4 |
| PrefixListName |
string |
The name of the prefix list. |
PrefixListNameSample |
| PrefixListId |
string |
The ID of the prefix list. |
pl-x1j1k5ykzqlixdcy**** |
| Tags |
object |
||
| Tag |
array<object> |
The tags of the prefix list. |
|
|
object |
The tag of the prefix list. |
||
| TagValue |
string |
The tag key. A prefix list can have 1 to 20 tags. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot start with |
TestKey |
| TagKey |
string |
The tag value. A prefix list can have 1 to 20 tags. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain |
TestValue |
| ResourceGroupId |
string |
The ID of the resource group to which the prefix list belongs. |
rg-bp67acfmxazb4p**** |
Examples
Success response
JSON format
{
"NextToken": "AAAAAdDWBF2****",
"RequestId": "38793DB8-A4B2-4AEC-BFD3-111234E9188D",
"PrefixLists": {
"PrefixList": [
{
"CreationTime": "2021-02-20T07:11Z",
"AssociationCount": 1,
"MaxEntries": 20,
"Description": "This is description.",
"AddressFamily": "IPv4",
"PrefixListName": "PrefixListNameSample",
"PrefixListId": "pl-x1j1k5ykzqlixdcy****",
"Tags": {
"Tag": [
{
"TagValue": "TestKey",
"TagKey": "TestValue\n"
}
]
},
"ResourceGroupId": "rg-bp67acfmxazb4p****\n"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | %s | The specified parameter is invalid. |
| 400 | LimitExceed.PrefixListId | The specified number of PrefixListId exceeds the limit. | The number of specified prefix list IDs exceeds the upper limit. |
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist. | The specified region ID does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.