Retrieves information about managed and unmanaged instances, including ECS information.
Operation description
The instance list returned by this operation contains only machines that are managed by SysOM. If an ECS instance exists but is not managed by SysOM, it does not appear in the list.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sysom:ListInstancesWithEcsInfo |
get |
*All Resource
|
None | None |
Request syntax
GET /api/v1/am/instance/listInstancesWithEcsInfo HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| region |
string |
Yes |
Filters instances by region. |
cn-shenzhen |
| instance_id |
string |
No |
Specifies the instance ID to filter the Agent installation status of the specified instance. |
i-bp118piqcio9tiwgh84b |
| instance_name |
string |
No |
The name of the component instance. |
block-load-balancer-hjdm9 |
| instance_id_name |
string |
No |
Filters instances by instance name or instance ID. Fuzzy match is supported. |
84b |
| is_managed |
integer |
No |
Filters instances by managed status. |
1 |
| instance_tag |
object |
No |
Filters instances by instance tag. |
|
| key |
string |
No |
The tag key. |
feature_dim_radar_chart |
| value |
string |
No |
The tag value. |
test |
| public_ip |
string |
No |
Filters instances by public IP address. |
1.1.1.1 |
| private_ip |
string |
No |
Filters instances by private IP address. |
1.1.1.1 |
| resource_group_name |
string |
No |
Filters instances by resource group name. |
default resource group |
| resource_group_id |
string |
No |
Filters instances by resource group ID. |
rg-xxxxxxx |
| resource_group_id_name |
string |
No |
Filters instances by resource group name or resource group ID. Fuzzy match is supported. |
default |
| health_status |
string |
No |
Filters instances by health status. |
healthy |
| os_name |
string |
No |
Filters instances by operating system name. |
Alibaba Cloud Linux 3.2104 LTS 64bit |
| current |
integer |
No |
The page number for pagination. This field indicates the current page. |
1 |
| pageSize |
integer |
No |
The number of entries per page. Default value: 10. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| code |
string |
The status code. |
Success |
| data |
array<object> |
The returned data. |
|
|
array<object> |
The returned results. |
||
| cluster_id |
string |
The cluster ID. |
cbf7a37bc905d4682a3338b3744810269 |
| instance_id |
string |
The instance ID. |
i-bp118piqcio9tiwgh84b |
| instance_name |
string |
The instance name. |
allowed-repos-r2tzl |
| instance_tag |
array<object> |
The instance tags. |
|
|
object |
|||
| tag_key |
string |
The tag key. |
test_tag_key |
| tag_value |
string |
The tag value. |
test_tag_value |
| kernel_version |
string |
The kernel version. |
5.10.134-14.an8.x86_64 |
| os_arch |
string |
The architecture of the ECS instance. |
x86 |
| os_health_score |
string |
The health score of the instance. |
100 |
| os_name |
string |
The operating system name of the instance. |
Alibaba Cloud Linux 3.2104 LTS 64bit |
| private_ip |
string |
The private IP address of the instance. |
1.1.1.1 |
| public_ip |
string |
The public IP address of the instance. |
1.1.1.1 |
| resource_group_id |
string |
The resource group ID. |
rg-xxxxxx |
| resource_group_name |
string |
The resource group name. |
default resource group |
| status |
string |
The running status of the instance. Valid values:
Note
An instance in the Offline state indicates that the heartbeat between the node and the SysOM server is lost. It does not mean that the corresponding ECS instance is not running. |
Running |
| message |
string |
The error message. An empty value indicates that all data has been read. |
result: code=1 msg=(Request failed, status_code != 200) |
| request_id |
string |
The request ID. |
35F91AAB-5FDF-5A22-B211-C7C6B00817D0 |
| total |
integer |
The total number of records. |
319 |
Examples
Success response
JSON format
{
"code": "Success",
"data": [
{
"cluster_id": "cbf7a37bc905d4682a3338b3744810269",
"instance_id": "i-bp118piqcio9tiwgh84b",
"instance_name": "allowed-repos-r2tzl",
"instance_tag": [
{
"tag_key": "test_tag_key",
"tag_value": "test_tag_value"
}
],
"kernel_version": "5.10.134-14.an8.x86_64",
"os_arch": "x86",
"os_health_score": "100",
"os_name": "Alibaba Cloud Linux 3.2104 LTS 64bit",
"private_ip": "1.1.1.1",
"public_ip": "1.1.1.1",
"resource_group_id": "rg-xxxxxx",
"resource_group_name": "default resource group",
"status": "Running"
}
],
"message": "result: code=1 msg=(Request failed, status_code != 200)",
"request_id": "35F91AAB-5FDF-5A22-B211-C7C6B00817D0",
"total": 319
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.