Queries a list of application instances.
Debugging
Request headers
This operation uses only common request headers and does not have operation-specific request headers. For more information, see Common request and response headers.
Request syntax
GET /pop/v1/sam/app/describeApplicationInstances HTTP/1.1
Request parameters
Parameter |
Type |
Position |
Required |
Example |
Description |
AppId | String | Query | Yes | d700e680-aa4d-4ec1-afc2-6566b5ff**** | The application ID. |
GroupId | String | Query | Yes | b2a8a925-477a-4ed7-b825-d5e22500**** | The ID of the application group. You can call the DescribeApplicationGroups operation to obtain the ID. |
CurrentPage | Integer | Query | No | 1 | The page number. |
PageSize | Integer | Query | No | 10 | The number of entries per page. Default value: 10. Value range: (0, 1000000000). |
Reverse | Boolean | Query | No | true | Specifies the order of application instances that are sorted by the instance state. Application instances with the same state are sorted by the instance ID. Valid values:
The following instance states are numbered: 1. Error: An error occurred during the instance startup. 2. CrashLoopBackOff: The container failed to start. An error occurred during the startup process and persisted after the restart. 3. ErrImagePull: An error occurred while the container image was being pulled from the instance. 4. ImagePullBackOff: The container image cannot be obtained. 5. Pending: The instance is waiting to be scheduled. 6. Unknown: An unknown exception occurred. 7. Terminating: The instance creation process is being terminated. 8. NotFound: The instance cannot be found. 9. PodInitializing: The instance is being initialized. 10. Init:0/1: The instance is initialized. 11. Running: The instance is running. |
Response parameters
Parameter |
Type |
Example |
Description |
RequestId | String | 91F93257-7A4A-4BD3-9A7E-2F6EAE6D**** | The request ID. |
Message | String | success | The returned message. |
TraceId | String | 0a98a02315955564772843261e**** | The trace ID that is used to query the details of the request. |
Data | Object | The details of the application instances. |
|
CurrentPage | Integer | 1 | The page number. |
TotalSize | Integer | 10 | The total number of instances. |
PageSize | Integer | 10 | The number of entries per page. |
Instances | Array of Instance | The application instances. |
|
CreateTimeStamp | Long | 1558442609000 | The start time of the instance creation process. Unit: milliseconds. |
VSwitchId | String | vsw-*** | The ID of the zone where the instance is deployed. |
InstanceContainerStatus | String | Running | The state of the instance. Valid values:
|
InstanceHealthStatus | String | WithoutHealthCheckConfig | The configurations of health checks. Valid values:
|
InstanceContainerRestarts | Long | 0 | The number of times the instance was restarted. |
GroupId | String | b2a8a925-477a-4ed7-b825-d5e22500**** | The ID of the group to which the instance belongs. |
InstanceContainerIp | String | 192.168.X.X | The internal IP address of the instance. |
InstanceId | String | b2a8a925-477a-4ed7-b825-d5e22500**** | The instance ID. |
ImageUrl | String | registry-vpc.cn-beijing.aliyuncs.com/sae-demo-image/cartservice:1.0 | The address of the repository. Note If you deploy the application by using a JAR or WAR package, the image generated by SAE is not available for download. |
PackageVersion | String | 1609939496200 | The version of the package. |
Eip | String | 8.129.XX.XXX | The elastic IP address (EIP). |
FinishTimeStamp | Long | 1642757283000 | The end time of the instance creation process. Unit: milliseconds. |
DebugStatus | Boolean | False | Indicates whether the instance is being debugged. Valid values:
|
ErrorCode | String | Null | The error code. Valid values:
|
Code | String | 200 | The HTTP status code. Valid values:
|
Success | Boolean | true | Indicates whether the list of application instances was obtained. Valid values:
|
Examples
Sample requests
GET /pop/v1/sam/app/describeApplicationInstances?AppId=d700e680-aa4d-4ec1-afc2-6566b5ff****&GroupId=b2a8a925-477a-4ed7-b825-d5e22500****&CurrentPage=1&PageSize=10&Reverse=true HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeApplicationInstancesResponse>
<RequestId>91F93257-7A4A-4BD3-9A7E-2F6EAE6D****</RequestId>
<Message>success</Message>
<TraceId>0a98a02315955564772843261e****</TraceId>
<Data>
<CurrentPage>1</CurrentPage>
<TotalSize>10</TotalSize>
<PageSize>10</PageSize>
<Instances>
<CreateTimeStamp>1558442609000</CreateTimeStamp>
<VSwitchId>vsw-***</VSwitchId>
<InstanceContainerStatus>Running</InstanceContainerStatus>
<InstanceHealthStatus>WithoutHealthCheckConfig</InstanceHealthStatus>
<InstanceContainerRestarts>0</InstanceContainerRestarts>
<GroupId>b2a8a925-477a-4ed7-b825-d5e22500****</GroupId>
<InstanceContainerIp>192.168.X.X</InstanceContainerIp>
<InstanceId>b2a8a925-477a-4ed7-b825-d5e22500****</InstanceId>
<ImageUrl>registry-vpc.cn-beijing.aliyuncs.com/sae-demo-image/cartservice:1.0</ImageUrl>
<PackageVersion>1609939496200</PackageVersion>
<Eip>8.129.XX.XXX</Eip>
<FinishTimeStamp>1642757283000</FinishTimeStamp>
<DebugStatus>false</DebugStatus>
</Instances>
</Data>
<Code>200</Code>
<Success>true</Success>
</DescribeApplicationInstancesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message" : "success",
"TraceId" : "0a98a02315955564772843261e****",
"Data" : {
"CurrentPage" : 1,
"TotalSize" : 10,
"PageSize" : 10,
"Instances" : [ {
"CreateTimeStamp" : 1558442609000,
"VSwitchId" : "vsw-***",
"InstanceContainerStatus" : "Running",
"InstanceHealthStatus" : "WithoutHealthCheckConfig",
"InstanceContainerRestarts" : 0,
"GroupId" : "b2a8a925-477a-4ed7-b825-d5e22500****",
"InstanceContainerIp" : "192.168.X.X",
"InstanceId" : "b2a8a925-477a-4ed7-b825-d5e22500****",
"ImageUrl" : "registry-vpc.cn-beijing.aliyuncs.com/sae-demo-image/cartservice:1.0",
"PackageVersion" : "1609939496200",
"Eip" : "8.129.XX.XXX",
"FinishTimeStamp" : 1642757283000,
"DebugStatus" : false
} ]
},
"Code" : "200",
"Success" : true
}
Error codes
For a list of error codes, see Service error codes.