调用DescribePrefixListAssociations查询指定前缀列表已关联的资源信息。

调试

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

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribePrefixListAssociations

系统规定参数。取值:DescribePrefixListAssociations

RegionId String cn-chengdu

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

PrefixListId String pl-x1j1k5ykzqlixdcy****

前缀列表ID。

NextToken String AAAAAdDWBF2****

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

MaxResults Integer 10

分页查询时每页行数。

最大值:100。

默认值:10。

返回数据

名称 类型 示例值 描述
NextToken String AAAAAdDWBF2****

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

RequestId String 38793DB8-A4B2-4AEC-BFD3-111234E9188D

请求ID。

PrefixListAssociations Array of PrefixListAssociation

前缀列表已关联的资源信息组成的数组。

PrefixListAssociation
ResourceId String sg-bp11ujym6xsff6l0****

资源ID。

ResourceType String securitygroup

资源类型。

示例

请求示例

http(s)://ecs.aliyuncs.com/?Action=DescribePrefixListAssociations
&RegionId=cn-chengdu
&PrefixListId=pl-x1j1k5ykzqlixdcy****
&NextToken=AAAAAdDWBF2****
&MaxResults=10
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribePrefixListAssociationsResponse>
    <NextToken>AAAAAdDWBF2****</NextToken>
    <RequestId>38793DB8-A4B2-4AEC-BFD3-111234E9188D</RequestId>
    <PrefixListAssociations>
        <ResourceId>sg-bp11ujym6xsff6l0****</ResourceId>
        <ResourceType>securitygroup</ResourceType>
    </PrefixListAssociations>
</DescribePrefixListAssociationsResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "NextToken" : "AAAAAdDWBF2****",
  "RequestId" : "38793DB8-A4B2-4AEC-BFD3-111234E9188D",
  "PrefixListAssociations" : [ {
    "ResourceId" : "sg-bp11ujym6xsff6l0****",
    "ResourceType" : "securitygroup"
  } ]
}

错误码

HttpCode 错误码 错误信息 描述
400 InvalidParameter %s 无效的参数。
400 NotSupported.ResourceType The specified resource type is not supported. 资源类型不支持。
404 InvalidPrefixListId.NotFound The specified prefix list was not found. 前缀列表不存在。

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