6.2

Table Of Contents
For example, for a vSphere, Amazon EC2, or vCloud reservation type schema definition, the following
permissibleValues field in the compute resource output indicates if the compute resource is available
and if it has any dependencies.
“permissibleValues": {"type": "dynamic","customAllowed": false, "dependencies": []}
Procedure
u
Use the following command to get a compute resource.
Command to get a compute resource for vSphere reservation.
curl --insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$host/reservation-service/api/data-
service/schema/Infrastructure.Reservation.Virtual.vSphere/default/computeResource/values -d “{}”
Command to get a compute resource for an Amazon EC2 reservation.
curl --insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$host/reservation-service/api/data-
service/schema/Infrastructure.Reservation.Cloud.Amazon/default/computeResource/values -d “{}”
Example: curl Command for a vCloud reservation
Command to get a compute resource for a vCloud reservation.
curl --insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$host/reservation-service/api/data-
service/schema/Infrastructure.Reservation.Cloud.vCloud/default/computeResource/values -d “{}”
The following JSON output is returned based on the command input.
JSON Output for a vSphere Reservation
{
"values": [{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "047e00f5-5424-4ed2-a751-4a334aeaff54",
"label": "VC51-Cluster"
},
"label": "VC51-Cluster"
},
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
Programming Guide
VMware, Inc. 221