Querying the Available Duration of a Running Notebook Instance
Function
This API is used to query the available duration of a running notebook instance.
Constraints
None
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v1/{project_id}/notebooks/{id}/lease
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
Yes |
String |
Notebook instance ID. |
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
create_at |
Long |
Time (UTC) when the instance is created, accurate to millisecond. |
duration |
Long |
Instance running duration, which is calculated based on the instance creation time. If the instance creation time plus the duration is greater than the current time, the system automatically stops the instance. |
enable |
Boolean |
Whether to enable auto stop of the instance. |
type |
String |
Indicates the automatic stop type. |
update_at |
Long |
Time (UTC) when the instance is last updated (excluding the keepalive heartbeat time), accurate to millisecond. |
Example Requests
GET https://{endpoint}/v1/{project_id}/notebooks/{id}/lease
Example Responses
Status code: 200
OK
{ "create_at" : 1638841744515, "duration" : 3600000, "enable" : true, "type" : "TIMING", "update_at" : 1638842905925 }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot