You can use the reservation service to update an existing vRealize Automation reservation.

Before you begin

In addition to the Prerequisites, perform the following tasks before updating a reservation.

  • Obtain the reservation ID of the reservation that you want to update. This information is required API command input. See Syntax for Displaying a List of Reservations.

  • Obtain the reservation field information for the reservation that you want to update. For example, if you want to change from one compute resource to another, you must obtain the new compute resource ID and its associated JSON section output. This information is required API command input. See Syntax for Getting a Compute Resource for a Reservation.

Procedure

Use the reservation service to update an existing reservation.

The following example command updates a reservation with an ID of 94d74105-831a-4598-8f42-efd590fea15c.

curl –X PUT --insecure -H "Accept:application/json" 
-H "Authorization: Bearer $token" 
https://$vRA/reservation-service/api/reservations/94d74105-831a-4598-8f42-efd590fea15c –d 
“
{
  "id": "94d74105-831a-4598-8f42-efd590fea15c",
  "name": "TestReservation",
  "reservationTypeId": "Infrastructure.Reservation.Virtual.vSphere",
  "tenantId": "qe",
  "subTenantId": "ef58f604-528d-4441-a219-4725bead629b",
  "enabled": true,
  "priority": 3,
  "reservationPolicyId": "b71c3a5f-087a-4d9e-9a56-fab785a3d128",
  "alertPolicy": {
    "enabled": true,
    "frequencyReminder": 20,
    "emailBgMgr": false,
    "recipients": ["user1@mycompany.com",
    "user2@mycompany.com"],
    "alerts": [{
      "alertPercentLevel": 10,
      "referenceResourceId": "storage",
      "id": "storage"
    },
    {
      "alertPercentLevel": 20,
      "referenceResourceId": "memory",
      "id": "memory"
    },
    {
      "alertPercentLevel": 30,
      "referenceResourceId": "cpu",
      "id": "cpu"
    },
    {
      "alertPercentLevel": 40,
      "referenceResourceId": "machine",
      "id": "machine"
    }]
  },
  "extensionData": {
    "entries": [{
      "key": "key4",
      "value": {
        "type": "string",
        "value": "custom-property-value4"
      }
    },
    {
      "key": "key3",
      "value": {
        "type": "string",
        "value": "custom-property-value3"
      }
    },
    {
      "key": "reservationNetworks",
      "value": {
        "type": "multiple",
        "elementTypeId": "COMPLEX",
        "items": [{
          "type": "complex",
          "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
          "componentId": null,
          "classId": "reservationNetwork",
          "typeFilter": null,
          "values": {
            "entries": [{
              "key": "reservationNetworkProfile",
              "value": {
                "type": "entityRef",
                "componentId": null,
                "classId": "NetworkProfile",
                "id": "ed5d1503-08ac-42ca-804d-9167834a63a5",
                "label": "TestNetworkProfile"
              }
            },
            {
              "key": "reservationNetworkPath",
              "value": {
                "type": "entityRef",
                "componentId": null,
                "classId": "Network",
                "id": "44cb65d5-b321-43dd-a2ab-8ecf387bff8f",
                "label": "VM Network SQA"
              }
            }]
          }
        }]
      }
    },
    {
      "key": "key0",
      "value": {
        "type": "string",
        "value": "custom-property-value0"
      }
    },
    {
      "key": "key2",
      "value": {
        "type": "string",
        "value": "custom-property-value2"
      }
    },
    {
      "key": "reservationMemory",
      "value": {
        "type": "complex",
        "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
        "componentId": null,
        "classId": "reservationMemory",

        "typeFilter": null,
        "values": {
          "entries": [{
            "key": "hostMemoryTotalSizeMB",
            "value": {
              "type": "integer",
              "value": 57187
            }
          },
          {
            "key": "reservationMemoryReservedSizeMb",
            "value": {
              "type": "integer",
              "value": 15888
            }
          }]
        }
      }
    },
    {
      "key": "key1",
      "value": {
        "type": "string",
        "value": "custom-property-value-Updated"
      }
    },
    {
      "key": "computeResource",
      "value": {
        "type": "entityRef",
        "componentId": null,
        "classId": "ComputeResource",
        "id": "047e00f5-5424-4ed2-a751-4a334aeaff54",
        "label": "VC51-Cluster"
      }
    },
    {
      "key": "machineQuota",
      "value": {
        "type": "integer",
        "value": 2
      }
    },
    {
      "key": "reservationStorages",
      "value": {
        "type": "multiple",
        "elementTypeId": "COMPLEX",
        "items": [{
          "type": "complex",
          "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
          "componentId": null,
          "classId": "reservationStorage",
          "typeFilter": null,
          "values": {
            "entries": [{
              "key": "storageTotalSizeGB",
              "value": {
                "type": "integer",
                "value": 394
              }
            },
            {
              "key": "reservationStorageReservedSizeGB",
              "value": {
                "type": "integer",
                "value": 31
              }
            },
            {
              "key": "reservationStorageEnabled",
              "value": {
                "type": "boolean",
                "value": true
              }
            },
            {
              "key": "reservationStoragePath",
              "value": {
                "type": "entityRef",
                "componentId": null,
                "classId": "StoragePath",
                "id": "f48a527b-30a6-4d54-8829-f549bc195b69",
                "label": "VNXe:qe-vnxe-nfs-1"
              }
            },
            {
              "key": "storageFreeSizeGB",
              "value": {
                "type": "integer",
                "value": 120
              }
            },
            {
              "key": "reservationStorageReservationPriority",
              "value": {
                "type": "integer",
                "value": 1
              }
            }]
          }
        }]
      }
    },
    {
      "key": "resourcePool",
      "value": {
        "type": "entityRef",
        "componentId": null,
        "classId": "ResourcePools",
        "id": "4e51fabc-19e8-4e79-b413-d52309b3bb62",
        "label": "CoreDev"
      }
    }]
  }
}
”

Update a Reservation

The following output is returned based on the command input.

If the command is successful, the HTTP response body is empty except for a 204 No Content status statement.