Polling Results
Use cli-waiter to poll results, and ensure that its parameters are in JSON format and enclosed in double quotation marks. These parameters help you poll results:
hcloud ECS NovaShowServer --cli-region="ap-southeast-1" --server_id="e6b99563-xxxx-xxxx-xxxx-1820d4fd2a6" --cli-query="server.status" --cli-waiter="{\"expr\":\"server.status\",\"to\":\"ACTIVE\",\"timeout\":300}" Result polling ended. server.status is the expected ACTIVE. ACTIVE
In the value of cli-waiter, each field has a meaning as follows:
- expr: Required string, which is a JMESPath expression used to specify the field to poll for.
- to: Required string, which is the target value of the polled field.
- timeout: Optional int, which is the polling timeout in seconds. Range: 1 to 600. Default value: 180.
- interval: Optional int, which is the polling interval in seconds. Range: 2 to 10. Default value: 5.
Polling results with --cli-waiter may cause idempotence and cyclic API calls. Use this option for query APIs.
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