ModifyImageAttribute

Last Updated: Dec 12, 2017

Description

This operation allows you to modify the name and description of a custom image.

Request parameters

Name Type Required Description
Action String Yes Value: ModifyImageAttribute.
RegionId String Yes Indicates the RegionId of the custom image.
ImageId String Yes Indicates the ID of the custom image.
ImageName String No This parameter indicates the name of the custom image. The image name can be 2 to 128 characters in length and:
  • Must begin with an uppercase or lowercase English letter, or a Chinese character.
  • Can contain digits, “\”, “_“, or “-“.
  • Cannot begin with http:// or https://.
  • Description String No This parameter indicates the description of a custom image. The description can be 0 to 256 characters in length and cannot begin with http:// or https://. The default value is null. If the parameter is left blank, the default value is filled.

    Response parameters

    All parameters are common response parameters. For more information, see Common parameters.

    Error codes

    Error code Error message HTTP status code Meaning
    MissingParameter An input parameter RegionId that is mandatory for processing the request is not supplied. 400 RegionId value is missing.
    MissingParameter An input parameter ImageId that is mandatory for processing the request is not supplied. 400 ImageId value is missing.
    InvalidImageId.NotFound The specified ImageId does not exist. 403 The specified image ID does not exist.
    InvalidImageName.Malformed The specified destination Image name is wrongly formed. 400 The specified image name is invalid.
    InvalidDescription.Malformed The specified destination image description is wrongly formed. 400 The specified image description is invalid.
    InvalidImageName.Duplicated The destination image is exist. 400 The image name is already in use.

    Examples

    Request example

    1. https://ecs.aliyuncs.com/?Action=ModifyImageAttribute
    2. &ImageId=m-281234567
    3. &RegionId=cn-qingdao
    4. &ImageName=testImage123
    5. &<Common Request Parameters>

    Response example

    XML format

    1. <ModifyImageAttributeResponse>
    2. <RequestId>C8B26B44-0189-443E-9816-D951F59623A9</RequestId>
    3. </ModifyImageAttributeResponse>

    JSON format

    1. {
    2. "RequestId": "C8B26B44-0189-443E-9816-D951F59623A9"
    3. }
    Thank you! We've received your feedback.