ListSubnets

Updated at:

Queries the details of one or more Lingjun subnets, including the subnet type, network CIDR block, and the instance ID of the Lingjun CIDR block to which the subnet belongs.

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

eflo:ListSubnets

get

*Subnet

acs:eflo:{#regionId}:{#accountId}:Subnet/*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-wulanchabu

ZoneId

string

No

The zone ID.

cn-wulanchabu-a

SubnetId

string

No

The instance ID of the Lingjun subnet.

subnet-anhtskts

SubnetName

string

No

The name of the Lingjun subnet.

subnet-1

VpdId

string

No

The instance ID of the Lingjun CIDR block to which the subnet belongs.

vpd-fuliephf

Status

string

No

The instance status. Valid values:

  • Available: Normal.

  • Not Available: Unavailable.

  • Executing: Executing.

  • Deleting: Deleting.

Available

Type

string

No

The usage type of the Lingjun subnet. This parameter is optional. Valid values:

  • Leave empty for the general type.

  • OOB: OOB.

  • LB: LB.

Null

ResourceGroupId

string

No

The ID of the resource group.

rg-aeky5f3qx6ceapq

Tag

array<object>

No

The tags. You can specify up to 20 tags at a time.

object

No

The tag information.

Key

string

No

The tag key of the resource. The tag key cannot be an empty string. It can be up to 64 characters in length, and cannot start with aliyun or acs:, or contain http:// or https://. You can specify up to 20 tag keys at a time.

rg-subnet

Value

string

No

The tag value of the resource. The tag value can be empty or a string of up to 128 characters in length. It cannot start with aliyun or acs:, or contain http:// or https://. Each tag key corresponds to a tag value. You can specify up to 20 tag values at a time.

subnet-group-1

PageNumber

integer

No

The page number. Valid values: integers greater than 0. Default value: 1.

1

PageSize

integer

No

The number of entries to return on each page. Valid values: 1 to 100. Default value: 20.

20

EnablePage

boolean

No

Specifies whether to enable paging for the paged query. Valid values:

  • true: Enables paging.

  • false: Disables paging.

false

Response elements

Element

Type

Description

Example

object

The response information.

Code

integer

The response code.

0

Message

string

The response message.

SUCCESS

RequestId

string

The ID of the request.

7F9082CC-3D94-560F-A575-8E8EF6CE2CB8

Content

object

The response content.

Total

integer

The total number of entries.

10

Data

array<object>

The list of Lingjun subnets.

array<object>

The Lingjun subnet information.

CreateTime

string

The creation time. The value is a 13-digit UNIX timestamp in milliseconds.

1678273219000

GmtModified

string

The update time.

1678273219000

TenantId

string

The tenant ID.

1655449505171

RegionId

string

The region ID.

cn-wulanchabu

ZoneId

string

The zone ID.

cn-wulanchabu-b

Type

string

The usage type of the Lingjun subnet. This parameter is optional. Valid values:

  • Leave empty for the general type.

  • OOB: OOB.

  • LB: LB.

OOB

SubnetId

string

The Lingjun subnet instance ID.

subnet-c6wci55i

SubnetName

string

The name of the Lingjun subnet.

yzp-rg-test3

Cidr

string

The CIDR block of the subnet.

  • The CIDR block of a subnet must be a proper subset of the CIDR block of the Lingjun CIDR block to which the subnet belongs. The subnet mask must be between 16 and 29 bits in length, which provides 8 to 65,536 IP addresses. For example, if the CIDR block of the Lingjun CIDR block is 192.168.0.0/16, the CIDR blocks of the subnets in the Lingjun CIDR block can range from 192.168.0.0/17 to 192.168.0.0/29.

  • The first and the last three IP addresses in each subnet CIDR block are system reserved IP addresses. For example, if the subnet CIDR block is 192.168.1.0/24, the following four IP addresses are system reserved IP addresses: 192.168.1.0, 192.168.1.253, 192.168.1.254, and 192.168.1.255.

172.18.0.0/24

VpdId

string

The instance ID of the parent Lingjun CIDR block.

vpd-ze3na0wf

Status

string

The instance status. Valid values:

  • Available: The instance is available.

  • Not Available: The instance is unavailable.

  • Executing: The instance is being processed.

  • Deleting: The instance is being deleted.

Available

Message

string

The error message. If the instance status is abnormal, this parameter indicates the cause of the exception.

Success

VpdBaseInfo

object

The basic information of the VPD.

VpdId

string

The instance ID of the Lingjun CIDR block.

vpd-d3isyds4

VpdName

string

The name of the Lingjun VPD instance.

yzp-rg-test3

Cidr

string

The CIDR block of the VPD.

  • Use RFC private network addresses as the CIDR block of the Lingjun CIDR block, such as 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. If multiple Lingjun CIDR blocks need to communicate with each other, or if a Lingjun CIDR block needs to communicate with a VPC, make sure that the CIDR blocks do not conflict.

  • You can also use a custom CIDR block as the primary IPv4 CIDR block of the VPD, except for 100.64.0.0/10, 224.0.0.0/4, 127.0.0.0/8, 169.254.0.0/16, and their subnets.

10.0.0.0/8

CreateTime

string

The creation time. The value is a 13-digit UNIX timestamp in milliseconds.

1678273219000

NcCount

integer

The number of hosts.

16

NetworkInterfaceCount

integer

The number of Lingjun network interfaces.

1

ResourceGroupId

string

The ID of the resource group.

rg-aek2l4sq6l7unhi

Tags

array<object>

The tags. You can specify up to 20 tags at a time.

object

The tag information.

TagKey

string

The tag key of the resource. The tag key cannot be an empty string. It can be up to 64 characters in length, and cannot start with aliyun or acs:, or contain http:// or https://. You can specify up to 20 tag keys at a time.

tag-subnet

TagValue

string

The tag value of the resource. The tag value can be empty or a string of up to 128 characters in length. It cannot start with aliyun or acs:, or contain http:// or https://. Each tag key corresponds to a tag value. You can specify up to 20 tag values at a time.

subnet-group-1

AccessDeniedDetail

string

The details of the access denial.

None

Examples

Success response

JSON format

{
  "Code": 0,
  "Message": "Succeeded",
  "RequestId": "7F9082CC-3D94-560F-A575-8E8EF6CE2CB8",
  "Content": {
    "Total": 10,
    "Data": [
      {
        "CreateTime": "1678273219000",
        "GmtModified": "1678273219000",
        "TenantId": "1655449505171",
        "RegionId": "cn-wulanchabu",
        "ZoneId": "cn-wulanchabu-b",
        "Type": "OOB",
        "SubnetId": "subnet-c6wci55i",
        "SubnetName": "yzp-rg-test3",
        "Cidr": "172.18.0.0/24",
        "VpdId": "vpd-ze3na0wf",
        "Status": "Available",
        "Message": "SUCCESS",
        "VpdBaseInfo": {
          "VpdId": "vpd-d3isyds4",
          "VpdName": "yzp-rg-test3",
          "Cidr": "10.0.0.0/8",
          "CreateTime": "1678273219000"
        },
        "NcCount": 16,
        "NetworkInterfaceCount": 1,
        "ResourceGroupId": "rg-aek2l4sq6l7unhi",
        "Tags": [
          {
            "TagKey": "tag-subnet",
            "TagValue": "subnet-group-1"
          }
        ]
      }
    ]
  },
  "AccessDeniedDetail": "None"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.