Queries the information about custom images in a region.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
swas-open:ListCustomImages | get |
|
| 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.
| 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:
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 parameters
Examples
Sample success responses
JSON
format
{
"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",
"RequiredSystemDiskSize": 20,
"RequiredDataDiskSize": 20,
"SourceImageName": "CentOS",
"SourceImageVersion": "8.0"
}
],
"TotalCount": "4",
"PageSize": "10",
"PageNumber": "1"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
500 | InternalError | An error occurred while processing your request. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-10-09 | The Error code has changed. The response structure of the API has changed | View Change Details |
2024-07-02 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2024-02-20 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |