All Products
Search
Document Center

Elastic Compute Service:ModifyImageAttribute

Last Updated:Jul 09, 2024

Modifies the name, description, status, or image family of a custom image.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the custom image. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ImageIdstringYes

The ID of the custom image.

m-bp18ygjuqnwhechc****
ImageNamestringNo

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
StatusstringNo

The new state of the custom image. Valid values:

  • Deprecated: puts the image into the Deprecated state. If the custom image is shared, you must unshare it before you can put it into the Deprecated state. Images in the Deprecated state cannot be shared or copied, but can be used to create instances or replace system disks.
  • Available: puts the image into the Available state. You can restore an image from the Deprecated state to the Available state.
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
ImageFamilystringNo

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
BootModestringNo

The new boot mode of the image. Valid values:

  • BIOS: Basic Input/Output System (BIOS)
  • UEFI: Unified Extensible Firmware Interface (UEFI)
  • UEFI-Preferred: BIOS and UEFI
Note Before you change the boot mode, we recommend that you obtain the boot modes supported by the image. If you specify an unsupported boot mode for the image, ECS instances that use the image cannot start as expected. If you do not know which boot modes are supported by the image, we recommend that you use the image check feature to perform a check. For information about the image check feature, see Overview .
Note For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
BIOS
LicenseTypestringNo

The type of the license that is used to activate the operating system after the image is imported. Set the value to BYOL.

BYOL: The license that comes with the source operating system is used. When you use the BYOL license, make sure that your license key is supported by Alibaba Cloud.

Auto
DescriptionstringNo

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
FeaturesobjectNo

The attributes of the custom image.

NvmeSupportstringNo

Specifies whether to support the Non-Volatile Memory Express (NVMe) protocol. Valid values:

  • supported: The image supports NVMe. Instances created from this image also support NVMe.
  • unsupported: The image does not support NVMe. Instances created from this image do not support NVMe.
supported

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidImageName.MalformedThe 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://.
400MissingParameterThe input parameter "RegionId" that is mandatory for processing this request is not supplied.-
400InvalidImageName.DuplicatedThe specified Image name has already bean used.-
400InvalidDescription.MalformedThe 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://.
400ImageQuotaFull.ImageFamilyThe specified image family has exceeded max number of images for one image family.-
400InvalidImageFamily.MalformedThe specified parameter "ImageFamily" is malformed.-
400ImageFamilyQuotaFullThe specified region has exceeded max number of image family.-
400InvalidBootMode.NotSupportThe specified parameter BootMode is not supported.-
400InvalidLicenseType.NotSupportedThe specified parameter LicenseType is not supported.-
400InvalidBootMode.NotSupportThe specified parameter BootMode is not supported for current image architecture.The current image architecture does not support setting this boot mode.
403ImageStatus.NotAvailableThe specified image status is not available.-
403ImageStatus.NotDeprecatedThe specified image status is not deprecated.The specified image is not in the Deprecated state.
403ImageUseSharedThe specified image has been shared to others, please remove shared accounts first.-
403OperationDeined.ImageUsingByInstanceThe 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.
404InvalidImageId.NotFoundThe 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 timeSummary of changesOperation
2022-11-30The Error code has changedView Change Details