All Products
Search
Document Center

Compute Nest:UpdateArtifact

Last Updated:Oct 23, 2025

Updates an artifact.

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

computenestsupplier:UpdateArtifact

update

*Artifact

acs:computenestsupplier:{#regionId}:{#accountId}:artifact/{#ArtifactId}

None None

Request parameters

Parameter

Type

Required

Description

Example

ArtifactId

string

Yes

The ID of the artifact.

To obtain the artifact ID, call the ListArtifacts operation.

artifact-eea08d1e2d3a43ae****

VersionName

string

No

The name of the artifact version.

v1

Description

string

No

The description of the artifact.

Redhat8_0镜像

ArtifactProperty

object

No

The properties of the artifact.

Url

string

No

The URL of the file artifact.

You can upload the file and obtain its URL in the Object Storage Service console.

https://service-info-private.oss-cn-hangzhou.aliyuncs.com/130920852865****/template/2e1ce8fc-****-481c-9e8e-789ba9db487d.json

RegionId

string

No

The region of the image.

Note

This parameter is available only for image artifacts.

cn-hangzhou

ImageId

string

No

The ID of the image.

After you specify a region ID, call the DescribeImages operation to query available image IDs in that region.

Note

This parameter is available only for image artifacts.

m-0xij191j9cuev6uc****

CommodityCode

string

No

The code of the Alibaba Cloud Marketplace product.

You can obtain the product code in the Alibaba Cloud Marketplace console.

Note

This parameter is available only for image artifacts.

cmjj00****

CommodityVersion

string

No

The version of the Alibaba Cloud Marketplace product.

You can view the product version on the Alibaba Cloud Marketplace page.

Note

This parameter is available only for image artifacts.

V1.0

RepoName

string

No

The name of the image repository.

Note

This parameter is available only for container image artifacts and Helm Chart artifacts.

wordpress

RepoId

string

No

The ID of the image repository.

To obtain the image repository ID, call the ListAcrImageRepositories operation.

Note

This parameter is available only for container image artifacts and Helm Chart artifacts.

crr-d8o1nponyc2t****

Tag

string

No

The version tag of the image in the repository.

To obtain the version tag, call the ListAcrImageTags operation.

Note

This parameter is available only for container image artifacts and Helm Chart artifacts.

v1

RepoType

string

No

The permission type of the repository. Valid values:

  • Public: public repository

  • Private: private repository

Note

This parameter is available only for container image artifacts and Helm Chart artifacts.

Public

SupportRegionIds

array

No

The IDs of regions to which the image can be distributed.

string

No

The ID of a region to which the image can be distributed.

Note

This parameter is available only for ECS image artifacts.

["cn-hangzhou","cn-beijing"]

ArtifactBuildProperty

object

No

The properties for building the artifact. This is used for managed artifact builds.

CommandType

string

No

The command type. Valid values:

  • RunBatScript: The command is a batch script that runs on a Windows instance.

  • RunPowerShellScript: The command is a PowerShell script that runs on a Windows instance.

  • RunShellScript: The command is a shell script that runs on a Linux instance.

Note

This parameter is available only for ECS image artifacts.

RunShellScript

CommandContent

string

No

The content of the command.

Note

This parameter is available only for ECS image artifacts.

echo "start run command"

SourceImageId

string

No

The source image ID. The following types are supported:

  • Image ID: The ID of the ECS image.

  • OOS common parameter name: The system automatically obtains the corresponding image ID based on the OOS common parameter name.

Note

This parameter is available only for ECS image artifacts.

镜像ID:m-t4nhenrdc38pe4***** ubuntu_22_04_x64_20G_alibase_20240926.vhd oos公共参数名称:aliyun/services/computenest/images/aliyun_3_2104_python_3_11

RegionId

string

No

The ID of the region where the source image is located.

Note

This parameter is available only for ECS image artifacts.

cn-hangzhou

CodeRepo

object

No

The code repository address.

Note

This parameter is available only when `ArtifactBuildType` is set to `Dockerfile` or `Buildpacks`.

Platform

string

No

The platform of the code repository. Valid values:

  • github

  • gitee

  • gitlab

  • codeup

github

RepoName

string

No

The repository name.

aliyun-computenest/quickstart-Lobexxx

Owner

string

No

The owner of the code repository.

Note

This parameter is required only if the code repository is private.

aliyun-computenest

Branch

string

No

The branch name of the code repository.

main

Endpoint

string

No

The endpoint. This parameter is required for a private GitLab deployment.

http://121.40.25.0

OrgId

string

No

The organization ID.

455231

RepoId

integer

No

The repository ID.

103

DockerfilePath

string

No

The relative path of the Dockerfile in the code repository.

Default value: Dockerfile

Note

This parameter is available only when `ArtifactBuildType` is set to `Dockerfile`.

./file/Dockerfile

BuildArgs

array<object>

No

The build arguments.

Note

This parameter is available only when `ArtifactBuildType` is set to `Dockerfile`.

object

No

Used for `docker build --build-arg`.

ArgumentName

string

No

The name of the build argument.

ENV

ArgumentValue

string

No

The value of the build argument.

nginx:latest

SourceContainerImage

string

No

The pull URL of the source container image.

Used for `docker pull ${SourceContainerImage}`.

Note

This parameter is available only when `ArtifactBuildType` is set to `ContainerImage`.

pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel

SystemDiskSize

integer

No

The size of the system disk. Unit: GiB.

40

EnableGpu

boolean

No

Specifies whether to use a GPU-accelerated instance for the build. By default, a CPU instance is used.

false

ClientToken

string

No

A client token to ensure the idempotence of the request. Generate a unique token for each request from your client. The ClientToken can contain only ASCII characters and must be no more than 64 characters long.

10CM943JP0EN9D51H

PermissionType

string

No

The permission type. This parameter is valid for container image artifacts and Helm Chart artifacts. The value can be changed only from `Automatic` to `Public`. Valid values:

  • Public

  • Automatic

Public

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

9F350409-2ACC-5B61-ACD9-3C8995792F8F

ArtifactId

string

The artifact ID.

artifact-eea08d1e2d3a43ae****

ArtifactType

string

The artifact type.

EcsImage

VersionName

string

The version name.

v1

ArtifactVersion

string

The artifact version.

2

Description

string

The description of the artifact.

Redhat8_0镜像

GmtModified

string

The time when the artifact was modified.

2022-10-20T02:19:55Z

Status

string

The status of the artifact.

Valid values:

  • Created: The artifact is created.

  • Scanning: The artifact is being scanned.

  • ScanFailed: The artifact failed to be scanned.

  • Delivering: The artifact is being distributed.

  • Available: The artifact is available.

  • Deleted: The artifact is deleted.

Available

ArtifactProperty

string

The content of the artifact.

{\"CommodityCode\":\"cmjj0005****\",\"CommodityVersion\":\"V2022****\"}

SupportRegionIds

string

The IDs of the regions to which the artifact can be distributed.

[ "cn-beijing", "cn-hangzhou", "cn-shanghai" ]

ArtifactBuildProperty

string

The properties for building the artifact. This is used for managed artifact builds.

"{\"RegionId\":\"xxx\", \"SourceImageId\":\"xxx\", \"\":\"xxx\", \"CommandType\":\"xxx\", \"CommandContent\":\"xxx\"}"

StatusDetail

string

The details of the artifact status.

"/usr/local/share/aliyun-assist/work/script/t-hz04zm90y6og0sg.sh: line 1: pip: command not found"

ArtifactBuildType

string

The build type of the artifact.

"{\"RegionId\":\"xxx\", \"SourceImageId\":\"xxx\", \"\":\"xxx\", \"CommandType\":\"xxx\", \"CommandContent\":\"xxx\"}"

Examples

Success response

JSON format

{
  "RequestId": "9F350409-2ACC-5B61-ACD9-3C8995792F8F",
  "ArtifactId": "artifact-eea08d1e2d3a43ae****",
  "ArtifactType": "EcsImage",
  "VersionName": "v1",
  "ArtifactVersion": "2",
  "Description": "Redhat8_0镜像",
  "GmtModified": "2022-10-20T02:19:55Z",
  "Status": "Available",
  "ArtifactProperty": "{\\\"CommodityCode\\\":\\\"cmjj0005****\\\",\\\"CommodityVersion\\\":\\\"V2022****\\\"}",
  "SupportRegionIds": "[\n\t\t\t\"cn-beijing\",\n\t\t\t\"cn-hangzhou\",\n\t\t\t\"cn-shanghai\"\n\t\t]",
  "ArtifactBuildProperty": "\"{\\\"RegionId\\\":\\\"xxx\\\", \\\"SourceImageId\\\":\\\"xxx\\\", \\\"\\\":\\\"xxx\\\", \\\"CommandType\\\":\\\"xxx\\\", \\\"CommandContent\\\":\\\"xxx\\\"}\"",
  "StatusDetail": "\"/usr/local/share/aliyun-assist/work/script/t-hz04zm90y6og0sg.sh: line 1: pip: command not found\"\n",
  "ArtifactBuildType": "\"{\\\"RegionId\\\":\\\"xxx\\\", \\\"SourceImageId\\\":\\\"xxx\\\", \\\"\\\":\\\"xxx\\\", \\\"CommandType\\\":\\\"xxx\\\", \\\"CommandContent\\\":\\\"xxx\\\"}\"\n"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.