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 Example: 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.

This operation is restricted to system administrators.

Retrieve the SystemSettings element. See Retrieve or Update System Settings.

1

Examine the response to locate the link that you can use to retrieve the system's BlockingTaskSettings element.

This link has a rel attribute value of down and a type attribute value of application/vnd.vmware.admin.blockingTaskSettings+xml, as shown here:

<Link href="https://vcloud.example.com/api/admin/extension/settings/blockingTask"
   rel="down"
   type="application/vnd.vmware.admin.blockingTaskSettings+xml"/>
2

Retrieve the element.

Make a GET request to the href value of the link.

3

(Optional) Modify the element as needed to change the settings it controls.

See the schema reference.

4

(Optional) Update the modified element with the new contents.

PUT the modified element to the href value of its rel="edit" link. See 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.

Request:

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.

Response:

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>