All Products
Search
Document Center

Simple Application Server:ListCustomImages

Last Updated:Jul 25, 2024

Queries the information about custom images in a region.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
swas-open:ListCustomImagesget
  • CustomImage
    acs:swas-open:{#regionId}:{#accountId}:customimage/*
  • CustomImage
    acs:swas-open:{#regionId}:{#accountId}:customimage/{#CustomImageId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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
ClientTokenstringNo

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
ImageIdsstringNo

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****"]
PageSizeintegerNo

The number of entries per page.

  • Maximum value: 100.
  • Default value: 10.
10
PageNumberintegerNo

The page number. Default value: 1.

1
ImageNamesstringNo

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****"]
SystemSnapshotIdstringNo

The ID of the system disk snapshot.

s-bp14m09pq8***0g6
DataSnapshotIdstringNo

The ID of the data disk snapshot.

s-acscasca****
Tagarray<object>No

Tag N of the custom image.

objectNo

The tags of the custom image.

KeystringNo

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

TestKey
ValuestringNo

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

TestValue
ResourceGroupIdstringNo

The ID of the resource group.

rg-aek2bti7cf7yj2i

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

20758A-585D-4A41-A9B2-28DA8F4F534F
CustomImagesarray<object>

The array of queried custom images.

object

The information about the array object.

CreationTimestring

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
DataSnapshotNamestring

The name of the data disk snapshot.

data disk snapshot
SystemSnapshotIdstring

The ID of the system disk snapshot.

s-bp1h173hj21puxb***
InShareboolean

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

false
InstanceIdstring

The ID of the simple application server.

2d06ee0520b44de1ae88d4be****
DataSnapshotIdstring

The ID of the data disk snapshot.

s-bp19rn9u8eqzlfb***
RegionIdstring

The region ID.

cn-hangzhou
SystemSnapshotNamestring

The name of the system disk snapshot.

system disk snapshot
Descriptionstring

The description of the custom image.

test-custom-image
Namestring

The name of the custom image.

hua
ImageIdstring

The ID of the custom image.

m-bp1e79zktg26n2b***
Statusstring

The status of the custom image.

1
Tagsarray<object>

The tags of the custom image.

object

The tags of the custom image.

Keystring

The tag key of the custom image.

TestKey
Valuestring

The tag value of the custom image.

TestValue
InstanceNamestring

The name of the simple application server.

swas-asdf23***
ResourceGroupIdstring

The ID of the resource group.

rg-acfm2h2lvp3ublq
TotalCountstring

The total number of entries returned.

4
PageSizestring

The number of entries per page.

10
PageNumberstring

The page number.

1

Examples

Sample success responses

JSONformat

{
  "RequestId": "20758A-585D-4A41-A9B2-28DA8F4F534F",
  "CustomImages": [
    {
      "CreationTime": "2022-10-09T02:28:06Z",
      "DataSnapshotName": "data disk snapshot",
      "SystemSnapshotId": "s-bp1h173hj21puxb***",
      "InShare": false,
      "InShareUser": true,
      "InstanceId": "2d06ee0520b44de1ae88d4be****",
      "DataSnapshotId": "s-bp19rn9u8eqzlfb***",
      "RegionId": "cn-hangzhou",
      "SystemSnapshotName": "system disk snapshot",
      "Description": "test-custom-image",
      "Name": "hua",
      "ImageId": "m-bp1e79zktg26n2b***",
      "Status": "1",
      "Tags": [
        {
          "Key": "TestKey",
          "Value": "TestValue"
        }
      ],
      "InstanceName": "swas-asdf23***",
      "ResourceGroupId": "rg-acfm2h2lvp3ublq",
      "CreateInstances": [
        "9ffb716db6ae406ca78a476c0c81****"
      ],
      "UserId": 0,
      "OsType": "Linux"
    }
  ],
  "TotalCount": "4",
  "PageSize": "10",
  "PageNumber": "1"
}

Error codes

HTTP status codeError codeError message
500InternalErrorAn error occurred while processing your request.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-07-02The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details
2024-02-20The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details