Creates a scheduled stop task for an instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paidsw:CreateInstanceShutdownTimer |
create |
*All Resource
|
None | None |
Request syntax
POST /api/v2/instances/{InstanceId}/shutdowntimer HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. You can call ListInstances to obtain the instance ID. |
dsw-730xxxxxxxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The property of the scheduled stop task. |
|
| DueTime |
string |
No |
The scheduled stop time. |
2021-01-12T14:36:01Z |
| RemainingTimeInMs |
integer |
No |
The time duration before the instance is stopped. Unit: milliseconds. |
3600000 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
E7D55162-4489-1619-AAF5-3F97D5FCA948 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| Message |
string |
The response message. |
"XXX" |
| Code |
string |
The status code. Valid values:
|
null |
| HttpStatusCode |
integer |
The HTTP status code. Valid values:
|
null |
| InstanceId |
string |
The instance ID. |
dsw-730xxxxxxxxxx |
Examples
Success response
JSON format
{
"RequestId": "E7D55162-4489-1619-AAF5-3F97D5FCA948",
"Success": true,
"Message": "\"XXX\"",
"Code": "null",
"HttpStatusCode": 0,
"InstanceId": "dsw-730xxxxxxxxxx"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.