全部产品
Search
文档中心

云服务器 ECS:DescribePrefixLists - 查询前缀列表

更新时间:Oct 21, 2024

调用DescribePrefixLists查询一个或多个前缀列表的信息。

接口说明

请求参数AddressFamilyPrefixListId.NPrefixListName类似于过滤器,为逻辑与(AND)关系。如果某一参数为空,则过滤器不起作用。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
RegionIdstring

地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。

cn-chengdu
PrefixListNamestring

前缀列表的名称。

PrefixListNameSample
NextTokenstring

查询凭证(Token)。取值为上一次调用该接口返回的NextToken参数值,初次调用接口时无需设置该参数。

AAAAAdDWBF2****
MaxResultsinteger

分页查询时每页行数。

最大值:100。

默认值:10。

10
AddressFamilystring

前缀列表的地址族。取值范围:

  • IPv4。
  • IPv6。

默认值:空,查询所有前缀列表信息。

IPv4
PrefixListIdarray

前缀列表 ID。N 的取值范围:0~100。

string

前缀列表 ID。N 的取值范围:0~100。

pl-x1j1k5ykzqlixdcy****

返回参数

名称类型描述示例值
object
NextTokenstring

本次调用返回的查询凭证(Token)。当该返回值为空时,表示无更多返回的数据信息。

AAAAAdDWBF2****
RequestIdstring

请求 ID。

38793DB8-A4B2-4AEC-BFD3-111234E9188D
PrefixListsarray<object>

前缀列表信息组成的数组。

PrefixListobject
CreationTimestring

前缀列表的创建时间。

2021-02-20T07:11Z
AssociationCountinteger

关联资源的数量。

1
MaxEntriesinteger

前缀列表支持的最大条目容量。

20
Descriptionstring

前缀列表的描述信息。

This is description.
AddressFamilystring

前缀列表的地址族。可能值:

  • IPv4。
  • IPv6。
IPv4
PrefixListNamestring

前缀列表的名称。

PrefixListNameSample
PrefixListIdstring

前缀列表 ID。

pl-x1j1k5ykzqlixdcy****

示例

正常返回示例

JSON格式

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

错误码

HTTP status code错误码错误信息描述
400InvalidParameter%s无效的参数。
400LimitExceed.PrefixListIdThe specified number of PrefixListId exceeds the limit.PrefixListId的数量超出限制。
404InvalidRegionId.NotFoundThe specified RegionId does not exist.指定的地域 ID 不存在。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-11-13OpenAPI 错误码发生变更查看变更详情