Updated on 2026-07-07 GMT+08:00

Adding Image Recipients

Function

This is an extended API used to share more than one image with multiple users.

This is an asynchronous API. If job_id is returned, the job is successfully delivered. You need to query the status of the asynchronous job. If the status is success, the job is successfully executed. If the status is failed, the job fails. For details about how to query an asynchronous job, see Querying the Progress of an Asynchronous Job.

Huawei Cloud has stopped providing Windows images. This API will no longer be used to share Windows images.

Debugging

You can debug this API in API Explorer.

Authorization

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned. For details about the required permissions, see Permissions and Supported Actions.

URI

POST /v1/cloudimages/members

Request

  • Request parameters

    Parameter

    Mandatory

    Type

    Description

    images

    Yes

    Array of strings

    Definition

    Image IDs.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    projects

    Yes

    Array of strings

    Definition

    Project IDs.

    Constraints

    At least one of projects, domains, or organizations must be specified.

    Range

    N/A

    Default Value

    N/A

    domains

    No

    Array of strings

    Definition

    Account IDs.

    Constraints

    At least one of projects, domains, or organizations must be specified.

    Range

    N/A

    Default Value

    N/A

    organizations

    No

    Array of strings

    Definition

    Organization URNs.

    Constraints

    At least one of projects, domains, or organizations must be specified.

    Range

    N/A

    Default Value

    N/A

    At least one of projects, domains, and organizations must be specified.

Example Request

Adding tenants who can use shared images (image IDs: d164b5df-1bc3-4c3f-893e-3e471fd16e64, 0b680482-acaa-4045-b14c-9a8c7dfe9c70; project IDs: 9c61004714024f9586705d090530f9fa, edc89b490d7d4392898e19b2deb34797)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
POST https://{Endpoint}/v1/cloudimages/members
{
    "images": [
        "d164b5df-1bc3-4c3f-893e-3e471fd16e64",
        "0b680482-acaa-4045-b14c-9a8c7dfe9c70"
    ],
    "projects": [
        "9c61004714024f9586705d090530f9fa",
        "edc89b490d7d4392898e19b2deb34797"
    ]
}

Response

  • Response parameters

    Parameter

    Type

    Description

    job_id

    String

    Definition

    Asynchronous job ID.

    For details, see Querying the Progress of an Asynchronous Job.

    Range

    N/A

  • Example response
    STATUS CODE 200
    1
    2
    3
    {
        "job_id": "edc89b490d7d4392898e19b2deb34797"
    }
    

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Request error. For details, see Error Codes.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    Insufficient permissions.

    404 Not Found

    Requested resource not found.

    500 Internal Server Error

    Internal service error.

    503 Service Unavailable

    Service unavailable.