GetSubnet

Updated at:

Queries the details of a Lingjun subnet, including the subnet type, CIDR block, instance ID of the associated Lingjun VPD, instance status, and number of NCs.

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:GetSubnet

get

*Subnet

acs:eflo:{#regionId}:{#accountId}:subnet/{#SubnetId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-wulanchabu

SubnetId

string

Yes

The instance ID of the Lingjun subnet.

subnet-2avf0itf

VpdId

string

No

The ID of the associated Lingjun VPD.

vpd-cxcmdk1m

Response elements

Element

Type

Description

Example

object

The response information.

Code

integer

The business code.

0

Message

string

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

Success

RequestId

string

The ID of the request.

0901F411-28FA-5B9C-BAEE-7776463FF0DC

Content

object

The response content.

CreateTime

string

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

1648085472000

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

SubnetId

string

The instance ID of the Lingjun subnet.

subnet-aj93mko8

SubnetName

string

The name of the Lingjun subnet instance.

subnet-1

Cidr

string

The CIDR block of the subnet.

  • The CIDR block of the subnet must be a proper subset of the CIDR block of the associated Lingjun VPD, and 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 VPD is 192.168.0.0/16, the CIDR blocks of the subnets in the VPD 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 CIDR block of the subnet 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.

10.10.10.0/24

VpdId

string

The instance ID of the associated Lingjun CIDR block.

vpd-ze3na0wf

Type

string

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

  • Empty value: General type.

  • OOB: OOB type.

  • LB: LB type.

OOB

Status

string

The instance status.

Available

Message

string

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

Success

NcCount

integer

The number of NCs.

16

NetworkInterfaceCount

integer

The number of Lingjun network interfaces.

4

LbCount

integer

The number of load balancing instances.

0

VpdBaseInfo

object

The information about the associated Lingjun VPD.

VpdId

string

The instance ID of the Lingjun CIDR block.

vpd-iv2zm1qf

VpdName

string

The name of the Lingjun VPD instance.

vpd-1

Cidr

string

The CIDR block of the VPD.

  • We recommend that you use RFC private endpoint addresses in the private network 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 a Lingjun CIDR block needs to communicate with a VPC, make sure that the address planning does not conflict.

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

10.0.0.0/8

CreateTime

string

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

1678273219000

ResourceGroupId

string

The resource group ID.

rg-aek2l4sq6l7unhi

Tags

array<object>

The tag information.

You can specify up to 20 tags at a time.

object

The tag information of the resource.

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 an empty string or a string of up to 128 characters. 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

PrivateIpCount

integer

The total number of secondary private IP addresses.

20

AvailableIps

integer

The number of available IP addresses.

1024

AccessDeniedDetail

string

The details of the access denial.

None

Examples

Success response

JSON format

{
  "Code": 0,
  "Message": "Succeeded",
  "RequestId": "0901F411-28FA-5B9C-BAEE-7776463FF0DC",
  "Content": {
    "CreateTime": "1648085472000",
    "GmtModified": "1678273219000",
    "TenantId": "1655449505171",
    "RegionId": "cn-wulanchabu",
    "ZoneId": "cn-wulanchabu-b",
    "SubnetId": "subnet-aj93mko8",
    "SubnetName": "subnet-1",
    "Cidr": "10.10.10.0/24",
    "VpdId": "vpd-ze3na0wf",
    "Type": "OOB",
    "Status": "Available",
    "Message": "test example",
    "NcCount": 16,
    "NetworkInterfaceCount": 4,
    "LbCount": 0,
    "VpdBaseInfo": {
      "VpdId": "vpd-iv2zm1qf",
      "VpdName": "vpd-1",
      "Cidr": "10.0.0.0/8",
      "CreateTime": "1678273219000"
    },
    "ResourceGroupId": "rg-aek2l4sq6l7unhi",
    "Tags": [
      {
        "TagKey": "tag-subnet",
        "TagValue": "subnet-group-1"
      }
    ],
    "PrivateIpCount": 20,
    "AvailableIps": 1024
  },
  "AccessDeniedDetail": "None"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.