百度智能云

All Product Document

          Virtual Private Cloud

          Query VPN List

          Description

          Query the VPN list information.

          Request Structure

              GET /v{version}/vpn?marker=vpn-IyWRtII7&maxKeys=1&vpcId=vpc-IyWRtII7&eip=10.107.247.3   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 The maximum quantity contained in each page. The maximum quantity usually does not exceed 1000. The default is 1000
          vpcId String Yes Query parameter Identifier of VPC to which VPN belongs
          eip String No Query parameter Eip address bound to VPN

          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 int Maximum number contained in each page.
          vpns List<Vpn> VPN list

          Request Example

              GET /v{version}/vpn?marker=vpn-IyWRtII7&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": "vpn-xktdeMSf",
              "marker": "vpn-IyWRtII7",
              "maxKeys": 1,
              "isTruncated": true,
              "vpns": [
                  {
                		"status": "active",
                		"eip": "10.12.34.32",
                		"vpnId": "vpn-IyWRtII7",
                		"vpcId": "83edd0d2-8a68-4ce5-a396-9d2917d58a57",
                		"description": "",
                		"expiredTime": null,
                		"productType": "postpay",
                		"vpnConnNum": 0,
                		"bandwidthInMbps": 10,
                		"vpnConns": [],
                		"vpnName": "VPN_aoko_2"
              	 }
                  ]
              }  
          Previous
          Query VPN Details
          Next
          Update VPN