Queries prefix lists.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:ListPrefixLists | list | *PrefixList acs:vpc:{#regionId}:{#accountId}:prefixlist/* |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
PrefixListIds | array | No | The IDs of prefix lists to be queried. Valid values of N are 1 to 100, which specifies that you can query up to 100 prefix lists at a time. | |
string | No | The ID of the prefix list. | pl-0b7hwu67**** | |
NextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. Valid values:
| FFmyTO70tTpLG6I3FmYAXGKPd**** |
MaxResults | long | No | The number of entries per 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 tags. | |
object | No | |||
Key | string | No | The tag key. You can specify up to 20 tag keys. The tag key cannot be an empty string. The key cannot exceed 64 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). The key must start with a letter but cannot start with | FinanceDept |
Value | string | No | The tag value. You can specify up to 20 tag values. The tag value can be an empty string. The tag value cannot exceed 128 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). The key must start with a letter but cannot start with | FinanceJoshua |
RegionId | string | Yes | The ID of the region where you want to query prefix lists. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
PrefixListName | string | No | The name of the prefix list to query. The name must be 1 to 128 characters in length and cannot start with | name |
Response parameters
Examples
Sample success responses
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-12-12 | The Error code has changed. The response structure of the API has changed | View Change Details |