Timeout settings, default actions, and related messages for blocking tasks are properties of a cloud. They apply to all organizations in the cloud. Only a system administrator can view or modify them.
When a user requests an operation that is configured to create a blocking task, the system creates a reference to the operation in the cloud's BlockingTaskReferences container. The system also sends a message about the task to the configured AMQP broker. A system administrator can retrieve the list of BlockingTaskReferences by making a GET request to the system's blockingTasks link. An AMQP client can use information in the message to construct a URL that it can use to retrieve the task. See Notification Message Format.
If no action is taken on the blocking task within a specified timeout interval, it is subject to a default action. You can specify the timeout interval and default action for all blocking tasks by modifying the system's BlockingTaskSettings element. To configure an operation as a blocking task, add the operation name to the BlockingTaskOperations element contained by BlockingTaskSettings. See Task Operations.
Prerequisites
-
This operation is restricted to system administrators.
- Retrieve the SystemSettings element. See Retrieve or Update System Settings.
Procedure
Example: Update Blocking Task Settings
This request modifies the blocking task settings for a cloud to set the time-out period to 24 hours and adds media upload as an operation that creates a blocking task. See Task Operations for a list of operation names.
PUT https://vcloud.example.com/api/admin/extension/settings/blockingTask Content-Type: application/vnd.vmware.admin.blockingTaskSettings+xml ... <?xml version="1.0" encoding="UTF-8"?> <BlockingTaskSettings xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" xmlns="http://www.vmware.com/vcloud/extension/v1.5"> <TimeoutAction>abort</TimeoutAction> <BlockingTaskOperations> <vcloud:Operation>vdcUploadMedia</vcloud:Operation> </BlockingTaskOperations> <TimeoutInMilliseconds>86400000</TimeoutInMilliseconds> </BlockingTaskSettings>
The response contains information extracted from the request, and adds the href attributes and edit links for the BlockingTaskSettings element and the BlockingTaskOperations element it contains.
200 OK Content-Type: application/vnd.vmware.admin.blockingTaskSettings+xml ... <BlockingTaskSettings xmlns="http://www.vmware.com/vcloud/v1.5" TimeoutInMilliseconds="86400000" type="application/vnd.vmware.admin.blockingTaskSettings+xmll" href="https://vcloud.example.com/api/admin/extension/settings/blockingTask" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ... > <Link rel="edit" type="application/vnd.vmware.admin.blockingTaskSettings+xml" href="https://vcloud.example.com/api/admin/extension/settings/blockingTask" /> <Link rel="down" type="application/vnd.vmware.admin.taskOperationList+xml" href="https://vcloud.example.com/api/admin/extension/settings/blockingTask/operations"/> <TimeoutAction>abort</TimeoutAction> <BlockingTaskOperations type="application/vnd.vmware.admin.taskOperationList+xml" href="https://vcloud.example.com/api/admin/extension/settings/blockingTask/operations"> <Link rel="edit" type="application/vnd.vmware.admin.taskOperationList+xml" href="https://vcloud.example.com/api/admin/extension/settings/blockingTask/operations"/> <Operation>vdcUploadMedia</Operation> </BlockingTaskOperations> </BlockingTaskSettings>