UpdateImage
Modifies the name, description, version information, and associated application adapters of an image.
Operation description
You can only modify images that are owned by the current account and allow modifications. Shared images cannot be modified.
You must provide at least one of ImageId and VersionId. If both are provided, they must point to the same image. If VersionId is omitted, the current effective version of the image is used. Passing a non-empty AdaptorIdList updates the application adapter associations of the selected version based on the complete list. Make sure to include the adapters that you want to retain.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:UpdateImage |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ImageId |
string |
No |
The ID of the image to be modified. You must provide at least one of ImageId and VersionId. If both are provided, they must belong to the same image. |
imgc-bp1example**** |
| ImageName |
string |
No |
The new name of the image. Specify this parameter only when you need to update the name. |
OfficeImage_202611 |
| Description |
string |
No |
The new description of the image. |
Update office software and basic configurations |
| AdaptorIdList |
array |
No |
The complete list of application adapter IDs for the selected image version. A maximum of 100 items are supported. When a non-empty list is passed, it must include the adapters that you want to retain. Omitting this parameter or passing an empty list does not clear the existing associations. |
|
|
string |
No |
The ID of an application adapter to be retained or added to the image version. |
adt-bp1example**** |
|
| Language |
string |
No |
The language of the image. Valid values:
|
zh-CN |
| VersionId |
string |
No |
The ID of the image version to be modified. If this parameter is omitted, the current effective version of the image specified by ImageId is used. You must provide at least one of VersionId and ImageId. |
iv-bp1example**** |
| Distro |
string |
No |
The operating system distribution information of the image. It must be consistent with the actual operating system distribution of the image. |
Ubuntu 22.04 64-bit |
| VersionName |
string |
No |
The new display name of the image version. |
Office environment-202611 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response of the API call. |
||
| Data |
boolean |
Indicates whether the operation was successful. A value of true indicates that the operation was successful. |
|
| Success |
boolean |
Indicates whether the request was successful. A value of true indicates that the request was successful. To check whether an asynchronous task is completed, you must query the task status separately. |
|
| Code |
string |
The error code. This field is returned when the request fails. A successful response may not contain this field. |
Image.NotExist |
| Message |
string |
The error message or result prompt. This field describes the cause of a failed request. A successful response may not contain this field. |
The image does not exist. |
| RequestId |
string |
The unique identifier of the request. You can provide this value for troubleshooting. |
01A1A962-5503-107B-AC8F-EBA85DF905AC |
Examples
Success response
JSON format
{
"Data": false,
"Success": false,
"Code": "Image.NotExist",
"Message": "The image does not exist.",
"RequestId": "01A1A962-5503-107B-AC8F-EBA85DF905AC"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Image.NotExist | The image does not exist. | The image does not exist. |
| 400 | ImageUpdateFailed.NotAllow | The image is not allowed to be modified. | The image is not allowed to be modified. |
| 400 | ImageUpdateSharedImageFailed.NotAllow | The shared image is not allowed to be modified. | The shared image is not allowed to be modified. |
| 400 | UpdateRegion.NotSupport | The distributed regions of vhd or container images cannot be modified. | The distributed regions of vhd or container images cannot be modified. |
| 400 | InternalError | Internal error. | An internal error occurred. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.