Private Network(UVPC)

Obtain Subnet Information - DescribeSubnet


Obtain Subnet Information


Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is DescribeSubnet.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ProjectIdstringProject ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface.No
SubnetIds.NstringArray of subnet IDs, suitable for querying multiple subnet information at once.No
SubnetIdstringSubnet id, applicable for querying information of one subnet at a time.No
RouteTableIdstringRouting Table IdNo
VPCIdstringVPC Resource IDNo
TagstringBusiness group name, default is DefaultNo
OffsetintOffset, default is 0No
LimitintList length, default is 20No
ShowAvailableIPsbooleanWhether to return the number of available IPs in the subnet, true for yes, false for no, not returned by default.No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
TotalCountintTotal number of subnetsYes
DataSetarray[SubnetInfo]Array of subnet information, see SubnetInfo for specific resourcesYes

Data Model


Field NameTypeDescription InformationRequired
ZonestringAvailability Zone NameNo
IPv6NetworkstringIPv6 segment associated with the subnetNo
VPCNamestringVPC NameNo
SubnetIdstringSubnet IdNo
SubnetNamestringSubnet NameNo
TagstringBusiness GroupNo
SubnetTypeintSubnet TypeNo
SubnetstringSubnet SegmentNo
NetmaskstringSubnet MaskNo
GatewaystringSubnet GatewayNo
CreateTimeintCreation TimeNo
HasNATGWbooleanIs there a natgw?No
RouteTableIdstringRouting Table IdNo
AvailableIPsintAvailable IP QuantityNo


Request Example

Response Example

  "Action": "DescribeSubnetResponse",
  "DataSet": [
      "CreateTime": 1528353483,
      "Gateway": "172.16.XX.1",
      "HasNATGW": false,
      "Name": "test-s1",
      "Netmask": "24",
      "Remark": "test",
      "RouteTableId": "routetable-XXXX",
      "Subnet": "172.16.XXX.0",
      "SubnetId": "subnet-XXXXX",
      "SubnetName": "test-s1",
      "SubnetType": 2,
      "Tag": "Default",
      "VPCId": "uvnet-XXXX",
      "VPCName": "test",
      "VRouterId": "Default_VRouter",
      "Zone": "cn-sh2-01"
  "RetCode": 0,
  "TotalCount": 1
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved
  • Contact our sales to help your business.
  • Contact our sales to help your business.