The following example outlines how to modify the attributes of a resource. In this example, the attribute to be modified is the description of the virtual machine with the name 'test', which is changed to 'java_sdk'.

Procedure
  1. Declare an instance of the resource whose attributes are to be modified:

    VM vm = api.getVMs().get("test");
  2. Set the new value of the attribute:

    vm.setDescription("java_sdk");
  3. Update the virtual machine to apply the change:

    VM newVM = vm.update();