Syntax for Displaying a Schema Definition for a vSphere Reservation
GET /api/data-service/schema/{classId}/default with classId for vSphere, displays the schema definition for a vSphere reservation.
Overview
Each reservation contains several fields. Some fields are common to all reservation types and some are type-specific. The list of type-specific fields is defined in a schema. Call a data and schema service to get schema definition information. The data and schema service combines fetch data and fetch schema REST API calls.
Parameter | Description | Parameter Type |
---|---|---|
Id | Specifies the reservation ID. | GUID |
name | Specifies the reservation name. | String |
reservationTypeId | Specifies the reservation type, for example Infrastructure.Reservation.Virtual.vSphere or Infrastructure.Reservation.Virtual.Amazon. | String |
tenantId | Specifies the tenant ID that contains the reservation. | String |
subTenantId | Specifies the subtenant ID that contains the reservation. | GUID |
enabled | Specifies whether the reservation is enabled. | Boolean |
priority | Specifies the priority of the reservation during VM provisioning. | Integer |
reservationPolicyId | Specifies the reservation policy ID to bind to this reservation. | GUID |
alertPolicy | Specifies the alert policy of the reservation. The detail schema of this field refers to the alert policy. | JSON |
extensionData | Contains type-specific fields. The detail schema of this field is retrieved by the data and schema service. | JSON |
The following table describes the vSphere reservation types field IDs that appear in the output schema definitions.
Field ID | Data Type | Type Class | Permissible Value | Depends on Field |
---|---|---|---|---|
reservationNetworks | Complex Type | reservationNetwork | Yes | computeResource |
reservationVCNSTransportZone | Entity Reference | NetworkScopes | Yes | computeResource |
reservationVCNSSecurityGroups | Entity Reference | SecurityGroups | Yes | computeResource |
reservationMemory | Complex Type | reservationMemory | Yes | computeResource |
computeResource | Entity Reference | ComputeResource | Yes | NA |
machineQuota | Integer | N/A | No | NA |
reservationStorages | Complex Type | reservationStorage | Yes | computeResource |
resourcePool | Entity Reference | ResourcePools | Yes | computeResource |
reservationVCNSRoutedGateways | Complex Type | reservationVCNSRoutedGateway | Yes | computeResource |
Input
Use the supported input parameters to control the command output.
Parameter | Description |
---|---|
URL | https://$vRA/reservation-service/api/data-service/schema/$schemaclassid/default |
Method |
Get |
$vRA |
Specifies the appliance name and fully qualified domain name, or IP address of the vRealize Automation server. |
$token |
Specifies a valid HTTP bearer token with necessary credentials. |
$schemaclassid | Specifies the schema class of the
reservation type.
The schema class ID for a vSphere reservation is Infrastructure.Reservation.Virtual.vSphere. Each supported reservation type contains specific fields. The supported fields are defined in the schema. For details, see the reservation service schema definitions in the vRealize Automation API Reference in the vRealize Automation documentation center. |
Output
The command output contains property names and values based on the command input parameters.
Each field contains an array of data rows. Each data row represents one of the fields defined in the schema.
Property | Description | |
---|---|---|
Id | Specifies the unique identifier of this resource. | |
label | Specifies the field label. | |
dataType | Specifies the dataType field value:
|
|
displayAdvice | Contains display advice for the field. This property is valid for a user interface element only. | |
permissibleValues | Optional field. If this field is a
permissible value list field, define the meta info for the permissible value by
using the following options:
|
|
state |
Provides a structure
for defining the state of a content construct, for example
|
|
dependencies | Contains the set of field paths on which
the server-side evaluation of the facets depends:
|
curl Command
curl --insecure -H "Accept:application/json" -H "Authorization: Bearer $token" https://$vRA/reservation-service/api/data-service/schema/Infrastructure.Reservation.Virtual.vSphere/default
JSON Output
The schema definition in this example includes 9 extension fields that are supported for the vSphere type reservation.
{ "fields": [{ "id": "reservationNetworks", "label": "Network", "dataType": { "type": "complex", "componentTypeId": "com.mycompany.csp.iaas.blueprint.service", "componentId": null, "classId": "reservationNetwork", "typeFilter": null, "label": "Network" }, "displayAdvice": "DATA_TABLE", "permissibleValues": { "type": "dynamic", "customAllowed": false, "dependencies": ["computeResource"] }, "state": { "dependencies": [], "facets": [{ "type": "mandatory", "value": { "type": "constantClause", "value": { "type": "boolean", "value": true } } }] }, "isMultiValued": true }, { "id": "reservationVCNSTransportZone", "label": "Transport Zone", "description": "Transport zone of the vCNS settings", "dataType": { "type": "ref", "componentTypeId": "com.mycompany.csp.iaas.blueprint.service", "componentId": null, "classId": "NetworkScopes", "typeFilter": null, "label": "Transport Zone" }, "displayAdvice": null, "permissibleValues": { "type": "dynamic", "customAllowed": false, "dependencies": ["computeResource"] }, "state": { "dependencies": [], "facets": [] }, "isMultiValued": false }, { "id": "reservationVCNSSecurityGroups", "label": "Security Groups", "description": "Security groups of the vCNS settings", "dataType": { "type": "ref", "componentTypeId": "com.mycompany.csp.iaas.blueprint.service", "componentId": null, "classId": "SecurityGroups", "typeFilter": null, "label": "Security Group" }, "displayAdvice": null, "permissibleValues": { "type": "dynamic", "customAllowed": false, "dependencies": ["computeResource"] }, "state": { "dependencies": [], "facets": [] }, "isMultiValued": true }, { "id": "reservationMemory", "label": "Memory", "dataType": { "type": "complex", "componentTypeId": "com.mycompany.csp.iaas.blueprint.service", "componentId": null, "classId": "reservationMemory", "typeFilter": null, "label": "Memory" }, "displayAdvice": "DATA_TABLE", "permissibleValues": { "type": "dynamic", "customAllowed": false, "dependencies": ["computeResource"] }, "state": { "dependencies": [], "facets": [{ "type": "mandatory", "value": { "type": "constantClause", "value": { "type": "boolean", "value": true } } }] }, "isMultiValued": false }, { "id": "computeResource", "label": "Compute Resource", "description": "The compute resource for the reservation", "dataType": { "type": "ref", "componentTypeId": "com.mycompany.csp.iaas.blueprint.service", "componentId": null, "classId": "ComputeResource", "typeFilter": "InterfaceTypeId", "label": "Compute Resource" }, "displayAdvice": null, "permissibleValues": { "type": "dynamic", "customAllowed": false, "dependencies": [] }, "state": { "dependencies": [], "facets": [{ "type": "mandatory", "value": { "type": "constantClause", "value": { "type": "boolean", "value": true } } }] }, "isMultiValued": false }, { "id": "machineQuota", "label": "Machine Quota", "description": "The machine quota for the reservation", "dataType": { "type": "primitive", "typeId": "INTEGER" }, "displayAdvice": null, "state": { "dependencies": [], "facets": [] }, "isMultiValued": false }, { "id": "reservationStorages", "label": "Storage", "dataType": { "type": "complex", "componentTypeId": "com.mycompany.csp.iaas.blueprint.service", "componentId": null, "classId": "reservationStorage", "typeFilter": null, "label": "Storage" }, "displayAdvice": "DATA_TABLE", "permissibleValues": { "type": "dynamic", "customAllowed": false, "dependencies": ["computeResource"] }, "state": { "dependencies": [], "facets": [{ "type": "mandatory", "value": { "type": "constantClause", "value": { "type": "boolean", "value": true } } }] }, "isMultiValued": true }, { "id": "resourcePool", "label": "Resource Pool", "description": "The resource pool for the reservation", "dataType": { "type": "ref", "componentTypeId": "com.mycompany.csp.iaas.blueprint.service", "componentId": null, "classId": "ResourcePools", "typeFilter": null, "label": "Resource Pool" }, "displayAdvice": null, "permissibleValues": { "type": "dynamic", "customAllowed": false, "dependencies": ["computeResource"] }, "state": { "dependencies": [], "facets": [] }, "isMultiValued": false }, { "id": "reservationVCNSRoutedGateways", "label": "Routed Gateways", "dataType": { "type": "complex", "componentTypeId": "com.mycompany.csp.iaas.blueprint.service", "componentId": null, "classId": "reservationVCNSRoutedGateway", "typeFilter": null, "label": "Routed Gateways" }, "displayAdvice": "DATA_TABLE", "permissibleValues": { "type": "dynamic", "customAllowed": false, "dependencies": ["computeResource"] }, "state": { "dependencies": [], "facets": [] }, "isMultiValued": true }] }