Lists the instances of a specified service.
Operation description
Make sure that you understand the billing methods and pricing of Elastic Algorithm Service (EAS) before you call this operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eas:ListServiceInstances |
get |
*Service
|
None | None |
Request syntax
GET /api/v2/services/{ClusterId}/{ServiceName}/instances HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The ID of the region where the service is deployed. |
cn-shanghai |
| ServiceName |
string |
Yes |
The service name. For more information, see ListServices. |
foo |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PageNumber |
integer |
No |
The page number. The default value is 1. |
1 |
| PageSize |
integer |
No |
The number of entries to return on each page. The default value is 100. |
20 |
| Filter |
string |
No |
A keyword for the search. You can search by instance name, instance IP address, host IP address, or instance type. |
10.118.xx.xx |
| ResourceType |
string |
No |
The type of the resource group to which the service instance belongs. Valid values:
|
PublicResource |
| InstanceType |
string |
No |
The instance type. |
ecs.c7.large |
| InstanceStatus |
string |
No |
The status of the service instance. |
Running |
| InstanceIP |
string |
No |
The IP address of the service instance. |
10.224.xx.xx |
| InstanceName |
string |
No |
The name of the service instance. |
foo-bdc5xxxx-8l7rk |
| HostIP |
string |
No |
The IP address of the host where the service instance is deployed. |
10.224.xx.xx |
| IsSpot |
boolean |
No |
Specifies whether the instance is a spot instance. |
false |
| Role |
string |
No |
The role of the service. Valid values:
|
Queue |
| Sort |
string |
No |
The field to use for sorting. Valid values:
|
StartTime |
| Order |
string |
No |
The sort order. Valid values:
|
desc |
| MemberType |
string |
No |
The type of the sub-service. This parameter is valid only for aggregation services. |
LLMDecode |
| ListReplica |
boolean |
No |
Specifies whether to query the list of instance replicas. |
true |
| ReplicaName |
string |
No |
The name of the instance replica. |
cbh-qwen3-a1bc-prefill-ep1tp4dp |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
40325405-579C-4D82**** |
| Instances |
array |
The list of service instances. |
|
| Instance |
The service instance. |
||
| PageNumber |
integer |
The page number of the returned page. |
1 |
| PageSize |
integer |
The number of entries returned per page. |
20 |
| TotalCount |
integer |
The total number of instances. |
1 |
Examples
Success response
JSON format
{
"RequestId": "40325405-579C-4D82****",
"Instances": [
{
"HostIP": "11.0.XX.XX",
"HostName": "smart-scene-cls-854dbdc99d-****",
"InnerIP": "172.17.0.17",
"InstanceName": "foo-5fc8946767-v****",
"InstancePort": 8080,
"LastState": [
[]
],
"Namespace": "foo",
"Reason": "RUNNING",
"RestartCount": 1,
"Status": "Running",
"TotalProcesses": 1,
"ReadyProcesses": 1,
"StartAt": "2021-05-27T09:46:05Z",
"Role": "Standard",
"ResourceType": "PublicResource",
"TenantInstanceIP": "192.168.xx.xx",
"TenantHostIP": "192.168.xx.xx",
"IsSpot": false,
"CurrentAmount": 0.444,
"OriginalAmount": 2.2,
"Isolated": false,
"Zone": "cn-shanghai-a",
"ExternalIP": "192.168.1.100",
"ExternalInstancePort": 8080,
"StartTime": "2021-05-27T09:46:05Z",
"InstanceType": "ecs.c7.large"
}
],
"PageNumber": 1,
"PageSize": 20,
"TotalCount": 1
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.