DescribePortRangeLists

Updated at:

Queries a list of port range lists.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:DescribePortRangeLists

list

*PortRangeList

acs:ecs:{#regionId}:{#accountId}:portrangelist/*

PortRangeList

acs:ecs:{#regionId}:{#accountId}:portrangelist/{#portRangeListId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

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

cn-hangzhou

NextToken

string

No

The pagination token. Set this parameter to the NextToken value returned in the previous call to this operation. You do not need to set this parameter for the first request.

727d41872117f2816343eeb432fbc5bfd21dc824589d2a4be0b5e8707e68181f

MaxResults

integer

No

The number of entries per page for a paged query.

  • Maximum value: 100.

  • Default value: 10.

10

PortRangeListName

string

No

The name of the port range list. The name must be 2 to 128 characters in length and must start with a letter or a Chinese character. The name cannot start with http://, https://, com.aliyun, or com.alibabacloud. The name can contain letters, Chinese characters, digits, colons (:), underscores (_), periods (.), and hyphens (-).

PortRangeListNameSample

PortRangeListId

array

No

The ID of the port range list. Valid values of N: 0 to 100.

string

No

The ID of the port range list.

prl-2ze9743****

ResourceGroupId

string

No

The resource group ID. When you use this parameter to filter resources, the resource count cannot exceed 1,000. You can invoke ListResourceGroups to query the list of resource groups.

Note

Filtering by the default resource group is not supported.

rg-bp67acfmxazb4p****

Tag

array<object>

No

The tags bound to the port range list.

object

No

The tag key-value pair information bound to the port range list.

Key

string

No

The tag key of the instance. Valid values of N: 1 to 20.

If you use a single tag to filter resources, the resource count with this tag cannot exceed 1,000. If you use multiple tags to filter resources, the resource count that has all specified tags attached cannot exceed 1,000. If the resource count exceeds 1,000, call ListTagResources to query resources.

key for PortRangeList

Value

string

No

The tag value.

value for PortRangeList

Response elements

Element

Type

Description

Example

object

The response parameters.

NextToken

string

The pagination token returned in this call. If the return value is empty, no more data is available.

AAAAAdDWBF2

RequestId

string

The request ID.

6040AD98-11C3-5F78-9346-FCA8E9D8960F

PortRangeLists

array<object>

The port range list information.

array<object>

The port range list information.

PortRangeListId

string

The ID of the port range list.

prl-2ze9743****

PortRangeListName

string

The name of the port range list.

PortRangeListNameSample

MaxEntries

integer

The maximum number of entries supported by the port range list.

20

AssociationCount

integer

The number of associated resources.

1

Description

string

The description of the port range list.

This is description.

CreationTime

string

The time when the port range list was created. The time is in ISO 8601 format and displayed in UTC.

2024-12-04T07:11Z

ResourceGroupId

string

The ID of the resource group to which the port range list belongs.

rg-2zeg82g****

Tags

array<object>

The tags of the port range list.

object

The tags of the port range list.

TagKey

string

The tag key of the port range list.

TestKey

TagValue

string

The tag value of the port range list.

TestValue

Examples

Success response

JSON format

{
  "NextToken": "AAAAAdDWBF2",
  "RequestId": "6040AD98-11C3-5F78-9346-FCA8E9D8960F",
  "PortRangeLists": [
    {
      "PortRangeListId": "prl-2ze9743****",
      "PortRangeListName": "PortRangeListNameSample",
      "MaxEntries": 20,
      "AssociationCount": 1,
      "Description": "This is description.",
      "CreationTime": "2024-12-04T07:11Z",
      "ResourceGroupId": "rg-2zeg82g****",
      "Tags": [
        {
          "TagKey": "TestKey",
          "TagValue": "TestValue"
        }
      ]
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 LimitExceed.PortRangeListId The specified number of PortRangeListId exceeds the limit. The number of port list IDs specified exceeds the limit.
400 InvalidParameter The specified parameter is not valid. A specified parameter is invalid.
404 InvalidRegionId.NotFound The specified parameter RegionId is not valid. The specified RegionId parameter does not exist. Check whether the service is available in the specified region.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.