Queries the information of resources that are associated with a specific prefix list.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribePrefixListAssociations

The operation that you want to perform. Set the value to DescribePrefixListAssociations.

RegionId String Yes cn-chengdu

The region ID of the prefix list. You can call the DescribeRegions operation to query the most recent region list.

PrefixListId String Yes pl-x1j1k5ykzqlixdcy****

The ID of the prefix list.

NextToken String No AAAAAdDWBF2****

The query token. Set the value to the NextToken value returned in the previous call to the DescribePrefixListAssociations operation. Leave this parameter empty the first time you call this operation.

MaxResults Integer No 10

The number of entries to return on each page.

Maximum value: 100.

Default value: 10.

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.

PrefixListAssociations Array of PrefixListAssociation

Details about the resources that are associated with the prefix list.

PrefixListAssociation
ResourceId String sg-bp11ujym6xsff6l0****

The ID of the resource.

ResourceType String securitygroup

The type of the resource.

Examples

Sample requests

http(s)://ecs.aliyuncs.com/?Action=DescribePrefixListAssociations
&RegionId=cn-chengdu
&PrefixListId=pl-x1j1k5ykzqlixdcy****
&NextToken=AAAAAdDWBF2****
&MaxResults=10
&<Common request parameters>

Sample success responses

XML format

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 format

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

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

Error codes

HTTP status code Error code Error message Description
400 InvalidParameter %s The error message returned because a specified parameter is invalid.
400 NotSupported.ResourceType The specified resource type is not supported. The error message returned because the specified resource type is not supported.
404 InvalidPrefixListId.NotFound The specified prefix list was not found. The error message returned because the specified prefix list does not exist.

For a list of error codes, visit the API Error Center.