Retrieves the lifecycle of an instance.
Operation description
Retrieves the lifecycle transition information for an instance. You can retrieve details about the state of an instance at a specific 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 an instance ID, see ListInstances. |
dsw-9698d842b6*** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SessionNumber |
integer |
No |
A session is the period from when an instance is started until it fails or is stopped. sessionNumber specifies the ordinal number offset of the 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 order in which to sort the results. Valid values:
|
DESC |
| Token |
string |
No |
A token used for sharing URLs. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The result of the lifecycle query. |
||
| RequestId |
string |
The request ID. |
E7D55162-4489-1619-AAF5-3F97D5FC**** |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| Message |
string |
The message returned for the operation. |
"XXX" |
| Code |
string |
The status code. Valid values:
|
null |
| Lifecycle |
array<object> |
The details of the instance lifecycle, organized by session. |
[[{"Status":"Creating","GmtCreateTime":"2022-09-19T22:38:00Z","Reason":"","ReasonCode":""}]] |
|
array<object> |
A list of lifecycles where each subkey represents the lifecycle of a Session. |
||
|
object |
A single lifecycle event. |
||
| Status |
string |
The status of the instance. Possible values:
Valid values:
|
Starting |
| ReasonCode |
string |
The code for the reason why an event occurred. |
“” |
| ReasonMessage |
string |
The description of the reason why an event occurred. |
“” |
| GmtCreateTime |
string |
The time when the instance transitioned to this state. The time is in GMT. |
2022-10-21T07:27:44Z |
| GmtEndTime |
string |
||
| LifecycleId |
string |
||
| TotalCount |
integer |
The total number of sessions returned. |
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": "",
"LifecycleId": ""
}
]
],
"TotalCount": 35
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.