All Products
Search
Document Center

Elastic Compute Service:StartImagePipelineExecution

Last Updated:Sep 09, 2026

Executes an image building task by using an image template.

Operation description

  • After an image template is created, call this operation to execute an image building task. The system builds, distributes, and creates shared images based on the parameters configured in the image template settings.

  • For the same image template, only one image building task can be executed at a time. You can call CancelImagePipelineExecution multiple times simultaneously. Canceling an image building task does not interfere with other image building tasks.

  • When you execute an image building template, multiple intermediate instances are created to help build images. The intermediate instances are ECS instances that use the pay-as-you-go billing method, and billing fees are incurred. For more information, see Pay-as-you-go.

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

ecs:StartImagePipelineExecution

update

*ImagePipeline

acs:ecs:{#regionId}:{#accountId}:imagepipeline/{#imagepipelineId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID. You can call DescribeRegions to query the most recent region list.

cn-hangzhou

TemplateTag deprecated

array<object>

No

Note

This parameter is deprecated.

object

No

Key

string

No

Note

This parameter is deprecated.

null

Value

string

No

Note

This parameter is deprecated.

null

Tag

array<object>

No

The tags.

object

No

The tag object.

Key

string

No

The key of the tag. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot start with aliyun or acs:. The tag key cannot contain http:// or https://.

TestKey

Value

string

No

The value of the tag. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with acs:. The tag value cannot contain http:// or https://.

TestValue

ImagePipelineId

string

Yes

The ID of the image template.

ip-2ze5tsl5bp6nf2b3****

ClientToken

string

No

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but make sure that the token is unique among different requests. ClientToken can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

123e4567-e89b-12d3-a456-426655440000

Response elements

Element

Type

Description

Example

object

ExecutionId

string

The ID of the building task.

exec-5fb8facb8ed7427c****

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Examples

Success response

JSON format

{
  "ExecutionId": "exec-5fb8facb8ed7427c****",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidImage.OsTypeUnsupported The specified base image does not support image building. The operating system of the specified base image does not support image building.
400 InvalidParameter.BuildContent %s. The build content is invalid.
400 InvalidParameter.TestContent %s. The test content is invalid.
400 InvalidImageComponent.NotSupported %s. The specified image component is not available.
400 Duplicate.TagKey The Tag.N.Key contain duplicate key. The specified tag key already exists. Tag keys must be unique.
400 InvalidTagKey.Malformed The specified Tag.N.Key is not valid. Tag keys cannot be empty or null, support up to 128 characters, cannot start with "aliyun" or "acs:", and cannot contain "http://" or "https://". The specified Tag.N.Key is not valid. Tag keys cannot be empty or null, support up to 128 characters, cannot start with "aliyun" or "acs:", and cannot contain "http://" or "https://".
400 InvalidTagValue.Malformed The specified Tag.N.Value is not valid. Tag values support up to 128 characters, and cannot contain "http://" or "https://". The specified Tag.N.Value is not valid. Tag values support up to 128 characters, and cannot contain "http://" or "https://".
400 InvalidDockerRepositoryCredential.DockerRegistryMalformed The specified parameter DockerRepositoryCredential.DockerRegistry is invalid. The length should be between 1 to 512 characters. The specified parameter DockerRepositoryCredential.DockerRegistry is invalid. The length should be between 1 to 512 characters.
400 InvalidDockerRepositoryCredential.UserMalformed The specified parameter DockerRepositoryCredential.User is invalid. The length should be between 1 to 128 characters. The specified parameter DockerRepositoryCredential.User is invalid. The length should be between 1 to 128 characters.
400 InvalidImageName.Duplicated The specified image name is already in use. The specified image name is already in use.
500 StartImagePipelineExecution.Failed Start image pipeline execution failed. Failed to execute the image template task.
403 InvalidImagePipeline.HasRunningExecution %s
403 InvalidImagePipeline.OSSObjectNotAuthorized The ImportImageOptions.DiskDeviceMappings.OSSObject of the specified ImagePipeline is not allowed to access. The ImportImageOptions.DiskDeviceMappings.OSSObject of the specified ImagePipeline is not allowed to access.
403 InvalidImagePipeline.OSSObjectNeedRestore The ImportImageOptions.DiskDeviceMappings.OSSObject of the specified ImagePipeline is an archived object and needs to be restored first. The ImportImageOptions.DiskDeviceMappings.OSSObject of the specified ImagePipeline is an archived object and needs to be restored first.
403 InvalidOperation.NoRightAccessOSS ECS service is not authorized to access your OSS. Check your RAM roles and policies, and ensure that ecs.aliyuncs.com is authorized to assume AliyunECSImageImportDefaultRole. ECS service is not authorized to access your OSS. Check your RAM roles and policies, and ensure that "ecs.aliyuncs.com" is authorized to assume "AliyunECSImageImportDefaultRole".
404 InvalidImagePipeline.NotFound %s
404 InvalidInstanceType.NotFound The specified instance type does not exist. The specified InstanceType parameter does not exist.
404 InvalidVSwitchId.NotFound The specified VSwitchId does not exist. The specified VSwitchId does not exist
404 InvalidRegionId.NotFound %s The specified region ID does not exist.
404 InvalidImage.NotFound %s. The specified image ID does not exist.
404 ImageComponent.NotFound %s. The specified image component ID is not found.
404 InvalidImagePipeline.BaseImageNotFound The BaseImage of the specified ImagePipeline is not found. The BaseImage of the specified ImagePipeline is not found.
404 InvalidImagePipeline.OSSObjectNotFound The ImportImageOptions.DiskDeviceMappings.OSSObject of the specified ImagePipeline is not found in this region. The ImportImageOptions.DiskDeviceMappings.OSSObject of the specified ImagePipeline is not found in this region.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.