UpdateImage

Updated at:

Updates an image.

Operation description

  1. DataWorks Basic Edition or higher is required.

  2. Ensure that the service-linked role AliyunServiceRoleForDataWorks is created before you call this operation.

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

dataworks:UpdateImage

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Id

string

Yes

The image ID.

Custom_image_xxxx_xxxx

Name

string

No

The image name.

task_image_001

Description

string

No

The image description.

create by xxxx

Accessibility

string

No

The image visibility. Valid values:

  • Public: Visible to all users.

  • Private: Visible only to the creator.

Valid values:

  • Private :

    Private

  • Public :

    Public

Public

Supported

object

No

The image sub-purpose.

Module

string

No

The image sub-module. Valid values:

  • Scheduler: Data Studio.

Valid values:

  • Scheduler :

    Scheduler

Scheduler

TaskTypes

array

No

The list of task types supported by the image.

string

No

The supported task type. Valid values:

  • Shell

  • Python

  • ServerIDE

  • Notebook

  • PyODPS 2

  • PyODPS 3

Valid values:

  • PyODPS 2 :

    PyODPS 2

  • Shell :

    Shell

  • Notebook :

    Notebook

  • PyODPS 3 :

    PyODPS 3

  • ServerIDE :

    ServerIDE

  • Python :

    Python

Shell

BuildConfig

object

No

The image build configuration.

BuildType

string

No

The build type.

Valid values:

  • PackageInstallation :

    Package installation.

PackageInstallation

PackageInstallationScripts

array<object>

No

The list of pre-installation scripts.

object

No

The pre-installation script.

Type

string

No

The script type.

Valid values:

  • Yum :

    YUM

  • Script :

    Script.

  • Python2 :

    Python 2

  • Python3 :

    Python 3

Python3

Content

string

No

The script content. If the content specifies package names, separate them with commas.

requests

ProviderImageId

string

No

The ID of the image provided by the provider. This parameter is required when you reference an official DataWorks image.

System_shell_20251201

AcrInstanceId

string

No

The ID of the Container Registry (ACR) instance. This parameter is required when you reference an ACR image.

acr_instance_id

Namespace

string

No

The image namespace. If you reference an official DataWorks image, set this parameter to DataWorks Default.

namespace_name

RepositoryName

string

No

The image repository name. If you reference an official DataWorks image, set this parameter to DataWorks Default.

repo_name

ImageUri

string

No

The image URI. This parameter is required when you reference an ACR image.

registry-vpc.cn-beijing.cr.aliyuncs.com/namespace/image:0.1.0

AcrAssociatedVpcId

string

No

The ID of the VPC associated with the ACR instance. This parameter is required when you reference an ACR image.

vpc-xxx

Response elements

Element

Type

Description

Example

object

Schema of Response

Success

boolean

Indicates whether the request is successful.

true

Data

boolean

The API request result.

true

RequestId

string

The request ID, which is used to locate logs and troubleshoot issues.

6A6CBE87-9F91-1323-B680-E7A7065XXXXX

Examples

Success response

JSON format

{
  "Success": true,
  "Data": true,
  "RequestId": "6A6CBE87-9F91-1323-B680-E7A7065XXXXX"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.