GetLifecycle
Retrieves the lifecycle of an instance.
Operation description
Retrieves the lifecycle transition information of an instance. You can obtain the details of an instance transitioning to a specific state at a certain point in time.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paidsw:GetLifecycle |
get |
*All Resource
|
None | None |
Request syntax
GET /api/v2/instances/{InstanceId}/lifecycle HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. For more information about how to obtain the instance ID, see ListInstances. |
dsw-9698d842b6*** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SessionNumber |
integer |
No |
A session represents the process of an instance from startup to failure or stop. SessionNumber indicates the sequence number offset of the instance session. |
1 |
| StartTime |
string |
No |
The start time of the query. |
2020-11-08T15:00:00Z |
| EndTime |
string |
No |
The end time of the query. |
2020-11-08T15:00:00Z |
| Limit |
integer |
No |
The maximum number of sessions to return in the query. |
1 |
| Order |
string |
No |
The sort order of the results. Valid values:
|
DESC |
| Token |
string |
No |
The token used to share the URL. |
eyJhbGciOiJSUzI1NiJ9.****.**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The lifecycle query results. |
||
| RequestId |
string |
The request ID. |
E7D55162-4489-1619-AAF5-3F97D5FC**** |
| Success |
boolean |
Indicates whether the request is successful. Valid values:
|
true |
| Message |
string |
The operation result message. |
"XXX" |
| Code |
string |
The status code. Valid values:
|
null |
| Lifecycle |
array<object> |
The retrieved instance epoch details. |
[[{"Status":"Creating","GmtCreateTime":"2022-09-19T22:38:00Z","Reason":"","ReasonCode":""}]] |
|
array<object> |
The list of lifecycle results. Each item represents the lifecycle of a session. |
||
|
object |
The lifecycle details of a session. |
||
| Status |
string |
The status of the instance. Valid values:
Valid values:
|
Starting |
| ReasonCode |
string |
The reason code for an event. |
“” |
| ReasonMessage |
string |
The description of the reason for an event. |
“” |
| GmtCreateTime |
string |
The time when the instance transitioned to this status in GMT. |
2022-10-21T07:27:44Z |
| GmtEndTime |
string |
The end time of the lifecycle record. |
2026-11-30T09:51:37Z |
| LifecycleId |
string |
The ID of the lifecycle record. |
2d5b2551-4a41-4a41-4a41-5b25515b2551 |
| TotalCount |
integer |
The total number of sessions returned by the query. |
35 |
Examples
Success response
JSON format
{
"RequestId": "E7D55162-4489-1619-AAF5-3F97D5FC****",
"Success": true,
"Message": "\"XXX\"",
"Code": "null",
"Lifecycle": [
[
{
"Status": "Starting",
"ReasonCode": "“”",
"ReasonMessage": "“”",
"GmtCreateTime": "2022-10-21T07:27:44Z",
"GmtEndTime": "2026-11-30T09:51:37Z",
"LifecycleId": "2d5b2551-4a41-4a41-4a41-5b25515b2551"
}
]
],
"TotalCount": 35
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.