Wait API
The atomic action can be used to wait for the target object to reach the expected state. For example, after calling the StartServer API of the ECS using the Execute API atomic action, call the ShowServer API of the ECS using the Wait API atomic action. Wait until the status in the API response becomes ACTIVE, that is, the status is running, then you can confirm that the ECS instance has been started.
Procedure
- Log in to COC.
- In the navigation pane on the left, choose Resource O&M > Automated O&M. In the Routine O&M area, click Jobs.
Figure 1 Jobs
- Click the Custom Jobs tab and click Create Job.
Figure 2 Clicking Create Job
- Enter the basic job information. You can follow the steps in section Managing Tags to create a tag. After the required parameters are set, click Next.
Figure 3 Entering basic job information
- Select a job template. If no proper template is available, click Customize, and click Next.
Figure 4 Selecting a job template
- Perform job orchestration. Click + Add Task, and click + Operation Type. On the displayed dialog box, click Wait API.
Figure 5 Adding tasks
- Enter the task name and operation description.
Figure 6 Setting the basic information
- Click Input, select service (product short name), apiName (API name),
and propertySelector (check resource property), and specify the following parameters as response fields to be used as the judgment criteria as required:
- stopRetryValues (stop retry status): Stop the current atomic action waiting.
- desiredValues (success match status): Expected match value. When the value is the same as that of propertySelector, the current atomic action is successfully executed.
- notDesiredValues (success unMatch status): Expected unmatch value. When the value is the same as that of propertySelector, the current atomic action fails to be executed.
Figure 7 Adding input information
- Click Output and configure the output content as required. For example, you can add backup_policy in the API response as the parameter of the string type, and name it outputValue. If output parameters are not required, you do not need to add output parameters.
Figure 8 Adding output information
- Click Troubleshooting and configure the policy for the action upon an execution error: Terminate Job or Go to Next Step.
Figure 9 Adding troubleshooting policy
- Click OK.
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