Modifies the name, description, status, or image family of a custom image.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the custom image. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
ImageId | string | Yes | The ID of the custom image. | m-bp18ygjuqnwhechc**** |
ImageName | string | No | The name of the custom image. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. In this case, the original name is retained. | testImageName |
Status | string | No | The new state of the custom image. Valid values:
Note
If you want to roll back a custom image in the image family to a previous version, you can put the latest available custom image into the Deprecated state. If no custom images are in the Available state within the image family, an image family cannot be used to create instances. Proceed with caution if only a single custom image is in the Available state within the image family.
| Deprecated |
ImageFamily | string | No | The name of the image family. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. | hangzhou-daily-update |
BootMode | string | No | The new boot mode of the custom image. Valid values:
Note
You must be familiar with the boot modes that are supported by the image. When you use this parameter to change the boot mode of an image, specify a boot mode that is supported by the image to ensure that instances that use this image can start as expected.
| BIOS |
LicenseType | string | No | The type of the license used to activate the operating system after the image is imported. Valid values:
Default value: Auto. | Auto |
Description | string | No | The new description of the custom image. The description must be 2 to 256 characters in length It cannot start with http:// or https://. This parameter is empty by default, which specifies that the original description is retained. | testDescription |
Features | object | No | The attributes of the custom image. | |
NvmeSupport | string | No | Specifies whether to support the Non-Volatile Memory Express (NVMe) protocol. Valid values:
| supported |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidImageName.Malformed | The specified Image name is wrongly formed. | The specified image name is invalid. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It cannot contain http:// or https://. |
400 | MissingParameter | The input parameter "RegionId" that is mandatory for processing this request is not supplied. | - |
400 | InvalidImageName.Duplicated | The specified Image name has already bean used. | - |
400 | InvalidDescription.Malformed | The specified description is wrongly formed. | The resource description is invalid. The description must be 2 to 256 characters in length and cannot start with http:// or https://. |
400 | ImageQuotaFull.ImageFamily | The specified image family has exceeded max number of images for one image family. | - |
400 | InvalidImageFamily.Malformed | The specified parameter "ImageFamily" is malformed. | - |
400 | ImageFamilyQuotaFull | The specified region has exceeded max number of image family. | - |
400 | InvalidBootMode.NotSupport | The specified parameter BootMode is not supported. | - |
400 | InvalidLicenseType.NotSupported | The specified parameter LicenseType is not supported. | - |
403 | ImageStatus.NotAvailable | The specified image status is not available. | - |
403 | ImageStatus.NotDeprecated | The specified image status is not deprecated. | The specified image is not in the Deprecated state. |
403 | ImageUseShared | The specified image has been shared to others, please remove shared accounts first. | - |
403 | OperationDeined.ImageUsingByInstance | The boot mode of the image cannot be modified because it has associated instances. | The boot mode of the image cannot be modified while the image has associated instances. |
404 | InvalidImageId.NotFound | The specified ImageId does not exist. | The specified image does not exist in this account. Check whether the image ID is correct. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
2022-11-30 | The Error code has changed | see changesets | ||||||||
|