7.3

Table Of Contents
Procedure
u
Use the following command to get a compute resource.
n
Command to get a compute resource for vSphere reservation.
curl --insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$vRA/reservation-service/api/data-
service/schema/Infrastructure.Reservation.Virtual.vSphere/default/computeResource/values -d
“{}”
n
Command to get a compute resource for an Amazon EC2 reservation.
curl --insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$vRA/reservation-service/api/data-
service/schema/Infrastructure.Reservation.Cloud.Amazon/default/computeResource/values -d “{}”
Example: curl Command for a vCloud reservation
n
Command to get a compute resource for a vCloud reservation.
curl --insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$vRA/reservation-service/api/data-
service/schema/Infrastructure.Reservation.Cloud.vCloud/default/computeResource/values -d “{}”
Example: Get a Compute Resource for the Reservation
The following sample displays 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",
"id": "a4349488-9a56-4906-83a5-7d8b33c9d435",
"label": "NSX61-RC-ManagementCluster"
},
"label": "NSX61-RC-ManagementCluster"
},
{
Programming Guide
VMware, Inc. 156