All Products
Search
Document Center

Simple Application Server:ListCustomImages

Last Updated:Jan 15, 2026

Queries the information about custom images in a region.

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

swas-open:ListCustomImages

get

*CustomImage

acs:swas-open:{#regionId}:{#accountId}:customimage/*

*CustomImage

acs:swas-open:{#regionId}:{#accountId}:customimage/{#CustomImageId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the simple application servers corresponding to the custom images. You can call the ListRegions operation to query the most recent region list.

cn-hangzhou

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 you must make sure that the token is unique among different requests. The value of 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

ImageIds

string

No

The image IDs of the simple application server. The value can be a JSON array that consists of up to 100 image IDs. Separate multiple image IDs with commas (,).

["fe9c66133a9d4688872869726b52****", "794c230fd3e64ea19f83f4d7a0ad****"]

PageSize

integer

No

The number of entries per page.

  • Maximum value: 100.

  • Default value: 10.

10

PageNumber

integer

No

The page number. Default value: 1.

1

ImageNames

string

No

The image names of the simple application servers. The value can be a JSON array that consists of up to 100 image names. Separate multiple image names with commas (,).

["test1****", "test2****"]

SystemSnapshotId

string

No

The ID of the system disk snapshot.

s-bp14m09pq8***0g6

DataSnapshotId

string

No

The ID of the data disk snapshot.

s-acscasca****

Tag

array<object>

No

Tag N of the custom image.

object

No

The tags of the custom image.

Key

string

No

The key of tag N. A tag key can be 1 to 64 characters in length. Valid values of N: 1 to 20.

TestKey

Value

string

No

The value of tag N. A tag value can be up to 64 characters in length. Valid values of N: 1 to 20.

TestValue

ResourceGroupId

string

No

The ID of the resource group.

rg-aek2bti7cf7yj2i

Share

boolean

No

Specifies whether to query shared images. Valid values:

  • False: do not query shared images. The shared images are not included in the response.

  • True: query shared images. The shared images are included in the response.

If you do not specify this parameter, all images are returned.

False

InstanceId

string

No

The ID of the simple application server from which the image is derived.

ace0706b2ac4454d984295a94213****

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

20758A-585D-4A41-A9B2-28DA8F4F534F

CustomImages

array<object>

The array of queried custom images.

array<object>

The information about the array object.

CreationTime

string

The time when the snapshot was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is in UTC.

2022-10-09T02:28:06Z

DataSnapshotName

string

The name of the data disk snapshot.

数据盘快照

SystemSnapshotId

string

The ID of the system disk snapshot.

s-bp1h173hj21puxb***

InShare

boolean

Indicates whether the custom image is shared to Elastic Compute Service (ECS).

false

InShareUser

boolean

Indicates whether the custom image is shared across accounts.

False

InstanceId

string

The ID of the simple application server from which the image is derived.

2d06ee0520b44de1ae88d4be****

DataSnapshotId

string

The ID of the data disk snapshot.

s-bp19rn9u8eqzlfb***

RegionId

string

The region ID.

cn-hangzhou

SystemSnapshotName

string

The name of the system disk snapshot.

系统盘快照

Description

string

The description of the custom image.

自定义镜像-1

Name

string

The name of the custom image.

test

ImageId

string

The ID of the custom image.

m-bp1e79zktg26n2b***

Status

string

The status of the custom image. Valid values:

  • 0: copying

  • 1: available

  • 2: unavailable

  • 3: creation failed

  • 4: creating

1

Tags

array<object>

The tags of the custom image.

object

The tags of the custom image.

Key

string

The tag key of the custom image.

TestKey

Value

string

The tag value of the custom image.

TestValue

InstanceName

string

The name of the simple application server.

swas-asdf23***

ResourceGroupId

string

The ID of the resource group.

rg-acfm2h2lvp3ublq

CreateInstances

array

The simple application servers created from the image.

string

The ID of the simple application server created from the image.

9ffb716db6ae406ca78a476c0c81****

UserId

integer

The ID of the Alibaba Cloud account to which the image belongs.

180185828710****

OsType

string

The operating system type of the image.

Linux

RequiredSystemDiskSize

integer

The size of the image system disk. Unit: GiB.

20

RequiredDataDiskSize

integer

The size of the image data disk. Unit: GiB.

20

SourceImageName

string

The name of the source image that is used to create the simple application server.

CentOS

SourceImageVersion

string

The version of the source image that is used to create the simple application server.

8.0

TotalCount

string

The total number of entries returned.

4

PageSize

string

The number of entries per page.

10

PageNumber

string

The page number.

1

Examples

Success response

JSON format

{
  "RequestId": "20758A-585D-4A41-A9B2-28DA8F4F534F",
  "CustomImages": [
    {
      "CreationTime": "2022-10-09T02:28:06Z",
      "DataSnapshotName": "数据盘快照",
      "SystemSnapshotId": "s-bp1h173hj21puxb***",
      "InShare": false,
      "InShareUser": true,
      "InstanceId": "2d06ee0520b44de1ae88d4be****",
      "DataSnapshotId": "s-bp19rn9u8eqzlfb***",
      "RegionId": "cn-hangzhou",
      "SystemSnapshotName": "系统盘快照",
      "Description": "自定义镜像-1",
      "Name": "test",
      "ImageId": "m-bp1e79zktg26n2b***",
      "Status": "1",
      "Tags": [
        {
          "Key": "TestKey",
          "Value": "TestValue"
        }
      ],
      "InstanceName": "swas-asdf23***",
      "ResourceGroupId": "rg-acfm2h2lvp3ublq",
      "CreateInstances": [
        "9ffb716db6ae406ca78a476c0c81****"
      ],
      "UserId": 0,
      "OsType": "Linux",
      "RequiredSystemDiskSize": 20,
      "RequiredDataDiskSize": 20,
      "SourceImageName": "CentOS",
      "SourceImageVersion": "8.0"
    }
  ],
  "TotalCount": "4",
  "PageSize": "10",
  "PageNumber": "1"
}

Error codes

HTTP status code

Error code

Error message

Description

500 InternalError An error occurred while processing your request.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.