百度智能云

All Product Document

          Cloud Compute Service

          Query the Shared User List of the Image

          Description

          • This API is used to query the shared user list of images.
          • The image specified by imageId does not exist, and it prompts an error 404.

          Request Structure

          GET /v{version}/image/{imageId}/sharedUsers HTTP/1.1
          Host: bcc.bj.baidubce.com
          Authorization: authorization string

          Request Header Field

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

          Request Parameters

          Parameter Name Type Required Parameter Position Description
          version String Yes URL parameter API version number
          imageId String Yes URL parameter Image ID to be queried

          Return Header Field

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

          Return Parameter

          Parameter Name Type Description
          users List<[SharedUser](BCC/API Reference/Appendix.md#SharedUser)> Shared user list returned

          Error Code

          Error Code Error Description HTTP Status Code Explanations
          Image.UnCustomImageCannotBeShared Only custom image can be shared. 403 The non-custom image can not be shared.

          Request Instance

          GET /v2/image/m-nky7qeom/sharedUsers HTTP/1.1
          Host: bcc.bj.baidubce.com
          ContentType: application/json
          Date: Wed, 01 Mar 2006 12:00:00 GMT
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de

          Return Instance

          HTTP/1.1 200 OK
          x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
          Date: Wed, 03 Dec 2014 06:42:19 GMT
          Content-Type: application/json;charset=UTF-8
          Server: BWS
          
          {
              users:[
                  {
                      account:'ceshizhanghao',
                      accountId : 'ab1d7802cb9b436bafaf3361fe482ca6'
                  }
              ]
          }
          Previous
          Cancel the Cross-region Replicated Custom Image
          Next
          Query the OS Information in Batch According to the Instance ID