百度智能云

All Product Document

          MapReduce

          Instance Operation Interface

          Query Instance Lists

          Interface Description

          Query the instance of the specified cluster and instance group.

          Privileges Description

          The request is initiated with legal AccessKeyID and SecretAccessKey, and see the Authentication for more information.

          Notes

          If the request contains no user verification information (i.e., anonymous access), the 403 Forbidden is returned with the error message AccessDenied.

          Request Structure

          GET /v{version}/cluster/{clusterId}/instanceGroup/{instanceGroupId}/instance HTTP/1.1
          accept-encoding: gzip, deflate
          x-bce-date: {utc-date-string}
          host: bmr.bj.baidubce.com
          connection: keep-alive
          accept: */*
          content-type: application/json
          authorization: {bce-authorization-string}

          Request Header Field

          There are no other special header fields except the common header field.

          Request Parameter

          Parameter Name Parameter Type Required Parameter Position Parameter Description
          version String Yes URI parameter API version number, and current number is 1
          clusterId String Yes URI parameter Specified cluster ID
          instanceGroupId String Yes URI parameter Specified instance group ID

          Response Header Field

          There are no other special header fields except the common header field.

          Response Parameter

          Parameter Name Parameter Type Parameter Description
          instances List<[Instance](BMR/API Reference/Data Type.md#Instance)> Returned instance list

          Request Example

          GET /v1/cluster/0ce4f730-4af2-4f37-8fa2-b14f2f44e50e/instanceGroup/dabc21c6-41f8-4b23-98f2-3415e5886a5f/instance HTTP/1.1
          accept-encoding: gzip, deflate
          x-bce-date: 2015-03-24T13:02:00Z
          host: bmr.bj.baidubce.com
          connection: keep-alive
          accept: */*
          content-type: application/json
          authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286

          Return Example

          HTTP/1.1 200 OK
          Transfer-Encoding: chunked
          x-bce-request-id: 73c4e74c-3101-4a00-bf44-fe246959c05e
          Cache-Control: no-cache
          Server: BWS
          Date: Tue, 24 Mar 2015 13:02:01 GMT
          Content-Type: application/json;charset=UTF-8
          {
              "instances": [{
                  "bccInstanceId": "5a5c65e2-6eb7-4e4d-bf86-cb95baa0687d",
                  "id": "6fd35fcf-558d-415d-54eb-f131ec29e2ea",
                  "instanceName": "ngbcd1d97-master-instance-0b5frrum.novalocal",
                  "status": {
                      "code": "",
                      "creationDateTime": "2019-10-14T07:56:07Z",
                      "endDateTime": null,
                      "message": "",
                      "readyDateTime": "2019-10-14T07:56:07Z",
                      "state": "Running"
                  },
                  "managementIP": "10.107.234.74",
                  "privateDnsName": "",
                  "privateIpAddress": "192.168.25.125",
                  "publicDnsName": "",
                  "publicIpAddress": "10.107.245.106",
                  "sshPort": 22
              }]
          }
          Previous
          Instance Group Operation Interface
          Next
          Step Operation Interface