UpdateImageTask

Updated at:

Sends a status update request for an existing image creation task to the corresponding creation resource.

Operation description

The task must exist before you call this operation, and the corresponding creation resource and resource node must be available. The TaskType must match the actual type of the task. This operation does not support modifying the task step, image version, or destination region by using TaskStep, VersionId, or BizRegionId. Do not pass these three parameters. A successful request only indicates that the status update call is completed. To query the final status of the task, call GetTask.

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:UpdateTask

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TaskType

string

Yes

The actual type of the task to be updated, which must match the task specified by TaskId. Status updates support the following application adaptation and manual image creation tasks. Valid values:

  • ADAPT_AUTO: Creates an application adaptation automatically.

  • ADAPT_AUTO_RETRY: Retries automatic application adaptation creation.

  • ADAPT_MANUAL: Creates an application adaptation manually.

  • ADAPT_MANUAL_RETRY: Retries manual application adaptation creation.

  • IMAGE_MANUAL: Creates an image manually.

  • IMAGE_MANUAL_RETRY: Retries manual image creation.

IMAGE_MANUAL

TaskId

string

Yes

The ID of the task to be updated. The task and its creation resource must already exist.

tid-bp1example****

TaskStep

string

No

Not enabled. Do not pass this parameter. This parameter is not supported for updating the task step. The example "N/A (not enabled)" is only a description of the field status and is not a valid parameter value.

N/A (not enabled)

Status

string

No

The status identifier reported by the creation resource. It must match the task type and the current creation stage. You cannot directly use the overall task status from GetTask as a substitute. Valid values for image creation tasks (IMAGE_MANUAL and IMAGE_MANUAL_RETRY):

  • BUILDER_INIT_SUCCESS: The creation environment is initialized.

  • DOWNLOAD_SUCCESS: The creation resource is downloaded.

  • DOWNLOAD_FAILED: The creation resource fails to be downloaded.

  • BUILD_START: The image creation starts.

  • BUILD_SUCCESS: The application installation and image configuration are successful.

  • BUILD_FAILED: The application installation or image configuration fails.

  • BUILD_COMPLETE: The creation is completed and the subsequent verification process starts.

  • BUILD_COMPLETE_SKIP_VALIDATE: The creation is completed in compatibility mode. Whether verification is performed depends on the task query result. Valid values for application adaptation tasks:

  • BUILDER_INIT_SUCCESS: The creation environment is initialized.

  • DOWNLOAD_SUCCESS: The application resource is downloaded.

  • DOWNLOAD_FAILED: The application resource fails to be downloaded.

  • BUILD_START: The application recording starts.

  • BUILD_SUCCESS: The application recording is successful.

  • BUILD_FAILED: The application recording fails.

  • NAS_DISPATCH_SUCCESS: The application files are distributed to NAS.

  • NAS_DISPATCH_FAILED: The application files fail to be distributed to NAS.

  • OSS_UPLOAD_SUCCESS: The application files are uploaded to OSS.

  • OSS_UPLOAD_FAILED: The application files fail to be uploaded to OSS.

  • UPLOAD_SUCCESS: The application files are uploaded.

  • UPLOAD_FAILED: The application files fail to be uploaded.

  • BUILD_COMPLETE: The application creation is completed.

BUILD_START

Code

string

No

Not enabled. Do not pass this parameter. This parameter is not involved in task status updates. The example "N/A (not enabled)" is only a description of the field status and is not a valid parameter value.

N/A (not enabled)

VersionId

string

No

Not enabled. Do not pass this parameter. This parameter is not supported for modifying the image version associated with the task. The example "N/A (not enabled)" is only a description of the field status and is not a valid parameter value.

N/A (not enabled)

BizRegionId

string

No

Not enabled. Do not pass this parameter. The task region is determined by the associated creation resource. This parameter is not used to switch regions. The example "N/A (not enabled)" is only a description of the field status and is not a valid parameter value.

N/A (not enabled)

Response elements

Element

Type

Description

Example

object

The response result of this API call.

Data

boolean

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

Success

boolean

Indicates whether the request is successful. A value of true indicates that the request is successful. To check whether an asynchronous task is completed, 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.

InternalError

Message

string

The error or result message. This field describes the cause when the request fails. A successful response may not contain this field.

Internal error.

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": "InternalError",
  "Message": "Internal error.",
  "RequestId": "01A1A962-5503-107B-AC8F-EBA85DF905AC"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.