百度智能云

All Product Document

          Virtual Private Cloud

          Query Subnet List

          Description

          Query all the subnet list information.

          Request Structure

          GET /v{version}/subnet?marker={marker}&maxKeys={maxKeys}&vpcId={vpcId}&zoneName={zoneName}&subnetType={subnetType} HTTP/1.1
          Host: bcc.bj.baidubce.com
          Authorization: authorization string

          Request Header

          There are no other special headers except the public headers.

          Request Parameter

          Parameter name Type Required or not Parameter position Description
          version String Yes URL parameter API version number
          marker String No Query parameter The starting location of query for batch acquisition of lists, and is one string generated by the system.
          maxKeys Integer No Query parameter Maximum number contained in each page, generally not exceeding 1000. The default value is 1000.
          vpcId String No Query parameter Id of vpc affiliated
          zoneName String No Query parameter Name of the available zone affiliated
          subnetType String No Query parameter Subnet type, "BCC" and "BBC".

          Return Header

          There are no other special headers except the public headers.

          Return Parameter

          Parameter name Type Description
          marker String It marks the queried starting position.
          isTruncated boolean True means there are additional data in the following pages and false means the current page is the last page.
          nextMarker String The marker value requiring to be passed in order to acquire the next page. The domain doesn't appear when isTruncated is false.
          maxKeys Integer Maximum number contained in each page.
          subnets List\<Subnet> Instance information, an set composed by Subnets.

          Request Example

          GET /v1/subnet?marker=sbn-IyWRnII7&maxKeys=1 HTTP/1.1
          Host: bcc.bj.baidubce.com
          ContentType: application/json
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de

          Return Example

          HTTP/1.1 200 OK
          x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
          Date: Thu, 16 Mar 2017 06:29:48 GMT
          Content-Type: application/json;charset=UTF-8
          Server: BWS
          
          {
              "nextMarker": "sbn-IyarenI7",
              "marker": "sbn-IyWRnII7",
              "maxKeys": 1,
              "isTruncated": true,
              "subnets": [
                  {
                    "Name": "Predefined subnet of the system", 
                  	"subnetId": "sbn-IyWRnII7",
                  	"zoneName": "cn-bj-a",
                  	"cidr": "192.168.0.0/20",
                  	"vpcId": "vpc-IyrqYIQ7",
                  	"subnetType": "BCC",
                  	"description": "",
                      "createdTime": "2020-11-19T12:46:01Z",
                  	"tags": [
                            {
                              "tagKey": "aa",
                              "tagValue": "bb"
                            }
                        ]
                  }
              ]
          }
          Previous
          Create Subnet
          Next
          Query Specified Subnet