All messages that the vCloud Director AMQP service sends contain an AMQP routing key and a body formatted as a JSON object or an XML Notification element.

The XML Notification element is defined in the vCloud API schema. The routing key format is defined by the AMQP specification.

The routing key for a vCloud Director AMQP message has the following form:

operationSuccess.entity.org.user.subType1.subType2...subTypeN.[taskName]

Routing key components include:

operationSuccess

A Boolean value denoting whether the operation that triggered the notification succeeded or failed.

entity

The object identifier of the object on which an operation, an event of type com/vmware/vcloud/event/, triggered the notification. For more information about object identifiers, see Objects, References, and Representations.

org

The object identifier of the organization that owns the affected object.

user

The object identifier of the user who made the request.

subType1-subTypeN

Each subType is a single component of the event type name. See Notification Types.

taskName

If entity is a task or blocking task, the task name is appended to the routing key.

The following routing key, in which the object identifiers are truncated to save space, is an example of a routing key that might have been created for a successful com/vmware/vcloud/event/vapp/create event:

true.dc6a-xxx.0b8a-xxx.832c-xxx.com.vmware.vcloud.event.vapp.create

The vCloud API defines these AMQP notification headers.

Notification Headers

Header

Value

notification.type

See Notification Types.

notification.entityType

The type of vCloud entity is associated with this notification. For example, vm.

notification.entityUUID

The object identifier of the object on which an operation, an event of type com/vmware/vcloud/event/, triggered the notification.

notification.orgUUID

The object identifier of the organization that owns the affected object.

notification.userUUID

The object identifier of the user who made the request.

notification.operationSuccess

A Boolean value denoting whether the operation that triggered the notification succeeded or failed.

notification.taskUUID

The object identifier of the task that triggered the notification. This header is present only when a task is a child of another task. Use it to correlate events across a set of tasks.

notification.cellUUID

The object identifier of the vCloud Director cell executing the task that triggered the notification. Present only when the notification.taskUUID header is present.

Each notification message is delivered as both XML and JSON.

Important

XML NotificationType is deprecated in favor of the JSON format. vCloud Director AMQP notifications in XML format may be removed in a future release.

JSON notifications are published on an exchange created by vCloud Director with a name of the form prefix.notifications20 where prefix is the value of the AmqpPrefix element in the system AmqpSettings. XML notifications are published on the AMQP exchange specified in the system AMQP settings.

Here is an example of a message generated by a blocking task, formatted as a JSON object.

{
   "eventId" : "a1440dd8-60ae-46c7-b216-44693bc00c90",
   "type" : "com/vmware/vcloud/event/blockingtask/create",
   "timestamp" : "2011-06-18T14:33:27.787+03:00",
   "operationSuccess" : true,
   "user" : "urn:vcloud:user:44",
   "userName" : "Bob",
   "org" : "urn:vcloud:org:70",
   "orgName" : "Finance",
   "entity" : "urn:vcloud:blockingTask:25",
   "entityName" : "vdcComposeVapp",
   "entityType" : "com.vmware.vcloud.entity.blockingTask",
   "taskOwner" : "urn:vcloud:vapp:26"
}

To get more information about the blocking task that generated the notification, a system administrator use the value of the entity key in a request to the entityResolver URL. See Retrieve an Object as an Entity.

This request retrieves the blocking task that generated this notification.

GET https://vcloud.example.com/api/entity/urn:vcloud:blockingtask:25

The response to this request is identical to the one shown in the response portion of Example: Handling a Blocking Task.

The value of the type attribute of a vCloud Director notification is a string of the form com/vmware/vcloud/event/object-type/event-type. Notification types can be grouped based on the object type affected by the event.

User, Group, Role, and Session Events

Type (com/vmware/vcloud/event/)

Description

session/login

A login session was created.

user/import

A user was imported from LDAP.

user/remove

An imported user was removed from the organization.

user/modify

One or more properties of a user were modified.

user/lockout

An account was locked based on the organization's password policy settings.

user/unlock

A locked account was unlocked.

user/lock_expired

The lock on an account has expired.

user/create

A local user was created in an organization.

user/delete

A local user was removed from the organization.

group/import

A group was imported from LDAP.

group/remove

A group was removed from an organization.

role/create

A new role was created.

role/modify

An existing role was modified.

role/delete

A role was deleted.

Organization, Network, Catalog, and VDC Events

Type (com/vmware/vcloud/event/)

Description

org/create

An organization was created.

org/modify

An organization was modified.

org/delete

An organization was deleted.

network/create

A network was created.

network/modify

A network was modified.

network/delete

A network was deleted.

network/deploy

A network was deployed.

network/undeploy

A network was undeployed.

catalog/create

A catalog was created.

catalog/delete

A catalog was deleted.

catalog/modify

One or more properties of a catalog were modified

catalog/publish

A catalog was published.

catalogItem/create

An item was added to a catalog.

catalogItem/delete

An item was removed from a catalog.

vdc/create_request

A request to create a VDC was blocked pending administrative action.

vdc/create

A VDC was created.

vdc/modify

One or more properties of a VDC was modified.

vdc/delete_request

A request to delete a VDC was blocked pending administrative action.

vdc/delete

A VDC was deleted.

vdc/fast_provisioning/modify

The UsesFastProvisioning value of a VDC was modified.

vdc/thin_provisioning/modify

The IsThinProvision value of a VDC was modified.

vApp, vApp Template, Vm, and Media Events

Type (com/vmware/vcloud/event/)

Description

vappTemplate/create

A vApp template was created.

vappTemplate/import

A virtual machine was imported from vSphere as a vApp template.

vappTemplate/modify

One or more properties of a vApp template were modified.

vappTemplate/delete

A vApp template was deleted.

vappTemplate/create_request

A request to create a vApp template was blocked pending administrative action.

vappTemplate/import_request

A request to import a vApp template was blocked pending administrative action.

vappTemplate/modify_request

A request to modify a vApp template was blocked pending administrative action.

vappTemplate/delete_request

A request to delete a vApp template was blocked pending administrative action.

vapp/create

A vApp was created (instantiated)

vapp/import

A virtual machine was imported from vSphere as a vApp.

vapp/modify

One or more properties of a vApp were modified.

vapp/delete

A vApp was deleted.

vapp/deploy

A vApp was deployed.

vapp/undeploy

A vApp was undeployed.

vapp/runtime_lease_expiry

The runtime lease of a vApp has expired.

vapp/create_request

A request to instantiate a vApp template was blocked pending administrative action.

vapp/import_request

A request to import a vApp was blocked pending administrative action.

vapp/modify_request

A request to modify a vApp was blocked pending administrative action.

vapp/delete_request

A request to delete a vApp was blocked pending administrative action.

vapp/deploy_request

A request to deploy a vApp was blocked pending administrative action.

vapp/undeploy_request

A request to undeploy a vApp was blocked pending administrative action.

vm/create_request

A request to create a virtual machine was blocked pending administrative action.

vapp/quarantine_reject

An uploaded OVF was rejected after quarantine.

vapp/upload_timeout

An OVF upload has timed out.

vapp/lease_expiration_changed

The lease expiration of a vApp has changed.

vm/ip_address_changed

The IP address of a virtual machine has changed.

vm/create

A virtual machine was created by instantiating a vApp.

vm/modify_request

A request to modify a virtual machine was blocked pending administrative action.

vm/modify

One or more properties of a virtual machine were modified.

vm/delete

A virtual machine was deleted.

vm/change_state

The power state of a virtual machine has changed.

vm/deploy_request

A request to deploy a virtual machine was blocked pending administrative action.

vm/deploy

A virtual machine was deployed.

vm/undeploy_request

A request to undeploy a virtual machine was blocked pending administrative action.

vm/undeploy

A virtual machine was undeployed.

vm/consolidate_request

A request to consolidate a virtual machine was blocked pending administrative action.

vm/consolidate

A virtual machine was consolidated.

vm/relocate_request

A request to relocate a virtual machine was blocked pending administrative action.

vm/relocate

A virtual machine was relocated.

media/create

A media object was created by upload or import.

media/import

A media object was imported.

media/modify

One or more properties of a media object were modified.

media/delete

A media object was deleted.

media/create_request

A request to create a media object was blocked pending administrative action.

media/import_request

A request to import a media object was blocked pending administrative action.

media/modify_request

A request to modify a media object was blocked pending administrative action.

media/delete_request

A request to delete a media object was blocked pending administrative action.

media/upload_timeout

A media upload has timed out.

media/quarantine_reject

An uploaded media object was rejected after quarantine.

Other System Events

Type (com/vmware/vcloud/event/)

Description

providerVdc/create_request

A request to create a provider VDC was blocked pending administrative action.

providerVdc/create

A provider VDC was created.

providerVdc/modify

One or more properties of a provider VDC were modified.

providerVdc/delete_request

A request to delete a provider VDC was blocked pending administrative action.

providerVdc/delete

A provider VDC was deleted.

vc/create

A vCenter server was registered.

vc/modify

One or more properties of a registered vCenter server were modified.

vc/delete

A registered vCenter server was registered.

task/create

A task was created.

task/start

A non-blocking task has started or a blocking task has resumed.

task/abort

A task was aborted.

task/complete

A task has completed.

task/fail

A task has failed.

task/update

Task progress was updated.

blockingtask/create

A task was blocked and a notification created.

blockingtask/resume

A blocking task was resumed.

blockingtask/abort

A blocking task was aborted.

blockingtask/fail

A blocking task was failed.

datastore/modify

One or more properties of a datastore object were modified.

datastore/delete

A datastore object was deleted.