Setting the Scheduled Deletion Time of ECSs
Function
This API is used to set the scheduled deletion time for pay-per-use ECSs. If the deletion time is set to an empty string, the scheduled deletion is canceled.
This API supports fine-grained permissions for enterprise projects. For details, see ecs:cloudServers:setAutoTerminateTime.
URI
POST /v1/{project_id}/cloudservers/{server_id}/actions/update-auto-terminate-time
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
server_id |
Yes |
Specifies the ECS ID. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
auto_terminate_time |
Yes |
String |
Definition Specifies the scheduled deletion time for pay-per-use ECSs. Constraints
Range The value is in the format of "yyyy-MM-ddTHH:mm:ssZ" in UTC+0 and complies with ISO8601. Example: 2020-09-25T12:05:00Z Default Value N/A |
Response
None
Example Request
- Set the scheduled deletion time for an ECS to 2020-09-25T12:05:00Z.
POST https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/actions/update-auto-terminate-time { "auto_terminate_time": "2020-09-25T12:05:00Z", }
- Cancel the scheduled deletion for an ECS.
POST https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/actions/update-auto-terminate-time { "auto_terminate_time": "", }
Example Response
None
Returned Values
For details, see Returned Values for General Requests.
Error Codes
For details, 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