Sharing an Image with an Account in a Specified Project
Function
This API is used to share an image with a specified account.
-
Images can only be shared with other Huawei Cloud accounts (project ID) in the same region.
-
An image can be shared with a maximum of 10 accounts.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
POST /v1/{project_id}/cloud-phone/images/{image_id}/members
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Specifies the project ID. |
|
image_id |
Yes |
String |
Specifies the image ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling an Identity and Access Management (IAM) API. The value of X-Subject-Token in the response header is the user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
member |
No |
String |
Specifies the ID of the project that the image is shared with. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
request_id |
String |
Specifies the request ID. |
|
error_msg |
String |
Specifies the error message returned for the task. |
|
error_code |
String |
Specifies the task error code. |
Example Requests
Sharing an image with an account in a specified project
POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/images/{image_id}/members
{
"member" : "87dc6af96095488d9205b6f31f314b16"
}
Example Responses
Status code: 200
OK
{
"request_id" : "95f25ae6120643ac9e0effd633b37b98"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot