You can call this operation to modify the name or description 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. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No ModifyImageAttribute

The operation that you want to perform. If you use a custom HTTP URL or HTTPS URL to make an API request, you must specify the Action parameter. Set the value to ModifyImageAttribute.

ImageId String Yes m-imageid1

The ID of the custom image.

RegionId String Yes cn-hangzhou

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

ImageName String No Test

The name of the custom image. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). The name must start with a letter and cannot start with http:// or https://.

This parameter is empty by default, indicating that the original name is retained.

Description String No FinanceDept

The description of the custom image. The description must be 2 to 256 characters in length and cannot start with http:// or https://.

This parameter is empty by default, indicating that the original description is retained.

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=ModifyImageAttribute
&ImageId=m-imageid1
&RegionId=cn-hangzhou
&ImageName=Test
&Description=FinanceDept
&<Common request parameters>

Sample success responses

XML format

<ModifyImageAttributeResponse>
      <RequestId>C8B26B44-0189-443E-9816-D951F59623A9</RequestId>
</ModifyImageAttributeResponse>

JSON format

{
    "RequestId": "C8B26B44-0189-443E-9816-D951F59623A9"
}

Error codes

HTTP status code Error code Error message Description
400 InvalidImageName.Malformed The specified Image name is wrongly formed. The error message returned because the specified ImageName parameter is invalid. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name cannot start with http:// or https://.
400 MissingParameter The input parameter "RegionId" that is mandatory for processing this request is not supplied. The error message returned because the required RegionId parameter is not specified.
400 InvalidImageName.Duplicated The specified Image name has already bean used. The error message returned because the specified image name already exists.
400 InvalidDescription.Malformed The specified description is wrongly formed. The error message returned because the specified Description parameter is invalid. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
404 InvalidImageId.NotFound The specified ImageId does not exist. The error message returned because the specified image does not exist in the account. Check whether the image ID is correct.

For a list of error codes, visit the API Error Center.