All Products
Search
Document Center

:ListPrefixLists

最終更新日:Aug 21, 2023

Queries prefix lists.

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 ListPrefixLists

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

PrefixListIds.N String No pl-0b7hwu67****

The ID of the prefix list.

NextToken String No FFmyTO70tTpLG6I3FmYAXGKPd****

The pagination token that is used in the next request to retrieve a new page of results. Valid values:

  • You do not need to specify this parameter for the first request.
  • You must specify the token that is obtained from the previous query as the value of NextToken.
MaxResults Long No 20

The number of entries per page. Valid values: 1 to 100. Default value: 20.

ResourceGroupId String No rg-bp67acfmxazb4ph****

The ID of the resource group to which the prefix list belongs.

Tags.N.Key String No FinanceDept

The key of tag N to add to the resource. You can specify at most 20 tag keys. The tag key cannot be an empty string.

The tag key can be at most 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

Tags.N.Value String No FinanceJoshua

The value of tag N to add to the resource. You can specify at most 20 tag values. The tag value can be an empty string.

The tag value can be up to 128 characters in length, and cannot contain http:// or https://. The tag value cannot start with aliyun or acs:.

RegionId String Yes cn-hangzhou

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.

PrefixListName String No name

The name of the prefix list to query.

The name must be 1 to 128 characters in length and cannot start with http:// or https://.

Response parameters

Parameter Type Example Description
RequestId String DF72F7BB-5DFA-529C-887E-B0BB70D89C4F

The request ID.

NextToken String FFmyTO70tTpLG6I3FmYAXGKPd****

A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

  • If no value is returned for NextToken, no next queries are sent.
  • If a value is returned for NextToken, the value indicates the token that is used for the next query.
TotalCount Long 1

The total number of entries returned.

MaxResults Long 20

The number of entries per page. Valid values: 1 to 100. Default value: 20.

PrefixLists Array of PrefixList

The information about the prefix lists.

PrefixListId String pl-m5estsqsdqwg88hjf****

The ID of the prefix list.

PrefixListName String test

The name of the prefix list.

PrefixListDescription String Created with oss service by system.

The description of the prefix list.

IpVersion String IPV4

The IP version of the prefix list. Valid values:

  • IPv4
  • IPV6
CreationTime String 2022-07-12T14:22:32Z

The time when the prefix list was created.

CidrBlocks Array of String 100.115.XX.XX/24

The CIDR block specified in the prefix list.

ShareType String Shared

Indicates whether the prefix list is shared. Valid values:

  • Shared
  • If an empty value is returned, it indicates that the prefix list is not shared.
MaxEntries Integer 10

The maximum number of CIDR blocks that you can specify in the prefix list.

Status String Created

The status of the prefix list. Valid values:

  • Created
  • Deleted
  • Modifying
OwnerId String 1210123456123456

The Alibaba Cloud account to which the prefix list belongs.

PrefixListStatus String Created

The status of the prefix list. Valid values:

  • Created
  • Deleted
  • Modifying
Note This parameter is the same as the Status parameter.
RegionId String cn-hangzhou

The region ID of the prefix list.

ResourceGroupId String rg-bp67acfmxazb4ph****

The ID of the resource group to which the prefix list belongs.

Tags Array of Tag

The list of tags.

Key String FinanceDept

The key of tag N.

Value String FinanceJoshua

The value of tag N.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListPrefixLists
&PrefixListIds=["pl-0b7hwu67****"]
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&MaxResults=20
&ResourceGroupId=rg-bp67acfmxazb4ph****
&Tags=[{"Key":"FinanceDept","Value":"FinanceJoshua"}]
&RegionId=cn-hangzhou
&PrefixListName=name
&Common request parameters

Sample success responses

XML format

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

<ListPrefixListsResponse>
    <RequestId>DF72F7BB-5DFA-529C-887E-B0BB70D89C4F</RequestId>
    <NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
    <TotalCount>1</TotalCount>
    <MaxResults>20</MaxResults>
    <PrefixLists>
        <PrefixListId>pl-m5estsqsdqwg88hjf****</PrefixListId>
        <PrefixListName>test</PrefixListName>
        <PrefixListDescription>Created with oss service by system.</PrefixListDescription>
        <IpVersion>IPV4</IpVersion>
        <CreationTime>2022-07-12T14:22:32Z</CreationTime>
        <CidrBlocks>100.115.XX.XX/24</CidrBlocks>
        <ShareType>Shared</ShareType>
        <MaxEntries>10</MaxEntries>
        <Status>Created</Status>
        <OwnerId>1210123456123456</OwnerId>
        <PrefixListStatus>Created</PrefixListStatus>
        <RegionId>cn-hangzhou</RegionId>
        <ResourceGroupId>rg-bp67acfmxazb4ph****</ResourceGroupId>
        <Tags>
            <Key>FinanceDept</Key>
            <Value>FinanceJoshua</Value>
        </Tags>
    </PrefixLists>
</ListPrefixListsResponse>

JSON format

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

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

Error codes

HttpCode Error code Error message Description
400 IllegalParam.NextToken The specified NextToken is invalid. NextToken is set to an invalid value.

For a list of error codes, see Service error codes.