ModifyImageAttribute

Last updated: 2018-10-12 16:03:02

PDF

1. API Description

Domain name for API request: cvm.tencentcloudapi.com

This API (ModifyImageAttribute) is used to modify the image attributes.

  • Modifying attributes is not allowed for a shared image.

A maximum of 10 requests can be initiated per second for this API.

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: cvm.ap-shanghai-fsi.tencentcloudapi.com

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: ModifyImageAttribute
Version Yes String Common parameter. The value used for this API: 2017-03-12
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
ImageId Yes String Image ID, such as img-gvbnzy6f. Image ID can be obtained by either of the following ways:
  • From the ImageId field returned by the API DescribeImages.
  • Via the Image console.
  • ImageName No String Set a new image name, which must meet the following requirements:
  • It cannot exceed 20 characters.
  • It must be unique.
  • ImageDescription No String Set a new image description, which must meet the following requirements:
  • It cannot exceed 60 characters.
  • 3. Output Parameters

    Parameter Name Type Description
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Error Codes

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InvalidImageId.IncorrectState Invalid image status.
    InvalidImageId.Malformed Incorrect format of image ID.
    InvalidImageId.NotFound The image cannot be found.
    InvalidImageName.Duplicate The specified image name already exists.
    InvalidParameter.ValueTooLarge The length of parameter exceeds the limit.

    5. Example

    Example 1 Modify the image name

    Input example

    https://cvm.tencentcloudapi.com/?Action=ModifyImageAttribute
    &ImageId=img-6pb6lrmy
    &ImageName=sample
    &<Common request parameters>

    Output example

    {
      "Response": {
        "RequestId": "71e69b56-32be-4412-ab45-49eded6a87be"
      }
    }