Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Performing an operation on an asset (VMware virtual machine example)

You can perform operations on an asset that is based on a custom object. This sample session walks you through changing the status of a VMware virtual machine.

  1. Find out what operations are available for the custom object. To obtain the current list of operation names, contact BMC Server Automation support.
  2. Within your client, construct an HTTP POST request.

This POST request contains a URI that specifies the virtual machine and the operation.

  • Virtual machine: You can specify the virtual machine by using the /id prefix or by using the /group prefix.
  • Operation: You specify the operation by ending the URI with the string: Operations/operation_name

Example using /id prefix

The following example uses the /id prefix to stop a virtual machine called myVirtualMachine. Note the use of keyword Assets, and the trailing string Operations/Stop.


/id/SystemObject/Server/d2b3df54-e801-4348-a87d 9dc7c1b76b5d/
Assets/BMC_VMware_VirtualInfrastructureManager/Hosts/
10.20.90.10/myVirtualMachine/Operations/Stop
</Operations>

Example using /group prefix

The following example uses the /group prefix to start a virtual machine called myVirtualMachine. Note the use of keyword Assets, and the trailing string Operations/Start.


/group/Servers/myGroup/MyVirtualHostServer/Assets/
BMC_VMware_VirtualInfrastructureManager/Hosts/10.20.90.10/myVirtualMachine/Operations/Start
</Operations>

If the operation takes arguments, provide them as data in the POST request. For information about how to do this using the various argument formats, see Argument formats.

Was this page helpful? Yes No Submitting... Thank you

Comments