UpdateImage

Updated at:

Modifies the name, description, version information, and associated application adapters of an image.

Operation description

You can only modify images that are owned by the current account and allow modifications. Shared images cannot be modified.

You must provide at least one of ImageId and VersionId. If both are provided, they must point to the same image. If VersionId is omitted, the current effective version of the image is used. Passing a non-empty AdaptorIdList updates the application adapter associations of the selected version based on the complete list. Make sure to include the adapters that you want to retain.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

appstreaming:UpdateImage

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ImageId

string

No

The ID of the image to be modified. You must provide at least one of ImageId and VersionId. If both are provided, they must belong to the same image.

imgc-bp1example****

ImageName

string

No

The new name of the image. Specify this parameter only when you need to update the name.

OfficeImage_202611

Description

string

No

The new description of the image.

Update office software and basic configurations

AdaptorIdList

array

No

The complete list of application adapter IDs for the selected image version. A maximum of 100 items are supported. When a non-empty list is passed, it must include the adapters that you want to retain. Omitting this parameter or passing an empty list does not clear the existing associations.

string

No

The ID of an application adapter to be retained or added to the image version.

adt-bp1example****

Language

string

No

The language of the image. Valid values:

  • zh-CN: Simplified Chinese.

  • zh-HK: Traditional Chinese (Hong Kong).

  • en-US: English.

  • ja-JP: Japanese.

  • CN: A compatible value for Simplified Chinese.

  • EN: A compatible value for English.

  • JP: A compatible value for Japanese.

  • CN-HK: A compatible value for Traditional Chinese (Hong Kong).

zh-CN

VersionId

string

No

The ID of the image version to be modified. If this parameter is omitted, the current effective version of the image specified by ImageId is used. You must provide at least one of VersionId and ImageId.

iv-bp1example****

Distro

string

No

The operating system distribution information of the image. It must be consistent with the actual operating system distribution of the image.

Ubuntu 22.04 64-bit

VersionName

string

No

The new display name of the image version.

Office environment-202611

Response elements

Element

Type

Description

Example

object

The response of the API call.

Data

boolean

Indicates whether the operation was successful. A value of true indicates that the operation was successful.

Success

boolean

Indicates whether the request was successful. A value of true indicates that the request was successful. To check whether an asynchronous task is completed, you must query the task status separately.

Code

string

The error code. This field is returned when the request fails. A successful response may not contain this field.

Image.NotExist

Message

string

The error message or result prompt. This field describes the cause of a failed request. A successful response may not contain this field.

The image does not exist.

RequestId

string

The unique identifier of the request. You can provide this value for troubleshooting.

01A1A962-5503-107B-AC8F-EBA85DF905AC

Examples

Success response

JSON format

{
  "Data": false,
  "Success": false,
  "Code": "Image.NotExist",
  "Message": "The image does not exist.",
  "RequestId": "01A1A962-5503-107B-AC8F-EBA85DF905AC"
}

Error codes

HTTP status code

Error code

Error message

Description

400 Image.NotExist The image does not exist. The image does not exist.
400 ImageUpdateFailed.NotAllow The image is not allowed to be modified. The image is not allowed to be modified.
400 ImageUpdateSharedImageFailed.NotAllow The shared image is not allowed to be modified. The shared image is not allowed to be modified.
400 UpdateRegion.NotSupport The distributed regions of vhd or container images cannot be modified. The distributed regions of vhd or container images cannot be modified.
400 InternalError Internal error. An internal error occurred.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.