Syntax for Displaying a Schema Definition for a vCloud Air Reservation

GET /api/data-service/schema/{classId}/default with classId for vCloud Air, displays the schema definition for a vCloud Air reservation.

Overview

SomevRealize Automation reservation fields are common to all reservation types and some are type-specific. The list of type-specific fields is defined in a schema. You can 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.

Table 1. Fields Common To All Reservation Types
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 vCloud Air reservation types field IDs that appear in the output schema definitions.

Table 2. Extension Fields Supported in vCloud Reservations
Field ID Data Type Type Class Permissible Value Depends on Field
reservationNetworks Complex Type Infrastructure.Reservation.Network Yes computeResource
allocationModel Integer NA No NA
reservationMemory Complex Type Infrastructure.Reservation.Memory No NA
computeResource Entity Reference ComputeResource Yes NA
machineQuota Integer NA No NA
reservationStorages Complex Type Infrastructure.Reservation.Storage Yes computeResource
Note: The information in the table is subject to change. Call the data and schema service to retrieve the latest field information.

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 vCloud Air reservation is Infrastructure.Reservation.Cloud.vCloudAir.

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 vRealize Automation documentation.

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:
  • type: Specifies the field value type:
    • Self refers to the object that was returned or requested.
    • First, Previous, Next, and Last refer to corresponding pages of a pageable list.
    • Specifies the application or service that determines the other names.
  • componentTypeid: Specifies the type ID of the component.
  • component: Specifies the unique identifier of the component.
  • classId: Specifies the schema class of the field

    This property is valid for complex and ref field types only.

  • label: Specifies the label of the field data type.
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:
  • type: Specifies if the permissible value list is dynamic or static.
  • customAllowed: Specifies if a custom value is allowed during user input in this field.
  • dependencies: Specifies the list of fields that the current field depends on.
state

Provides a structure for defining the state of a content construct, for example {@link LayoutSection}. The element state identifies the field paths in the client data context upon which that element state depends. For example, the callback facet result indicates that facet evaluation must be delegated to the server of the object. This evaluation may be dependent on data collected in the client data context. For example, for a unique machine name, the evaluation requires the proposed name entered by the user.

dependencies Contains the set of field paths on which the server-side evaluation of the facets depends:
  • facets: Provides a higher level view of an {@link Constraint} collection and its current values. All rendering code should use this class to provide a common place to get the current state of the field.

    If a field is considered in need of server-side evaluation, its facets setting is callback.

    If a field is considered mandatory, its facets setting is mandatory.

  • isMultiValued: Specifies if the field is a multi-value field, such as a list field.

    The state provides a higher level view of an {@link Constraint} collection and its current values. Rendering code should use this class to provide a common place to get the current state of the field.

curl Command

The following example command retrieves schema definition information for a vCloud Air reservation.

curl --insecure -H "Accept:application/json" 
-H "Authorization: Bearer $token" 
https://$vRA/reservation-service/api/data-service/schema/Infrastructure.Reservation.Cloud.vCloudAir/default

JSON Output

The schema definition in this example includes 6 extension fields that are supported for the vCloud Air type reservation.

{
  "fields": [
    {
      "id": "reservationNetworks",
      "label": "Network",
      "dataType": {
        "type": "complex",
        "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
        "componentId": null,
        "classId": "Infrastructure.Reservation.Network",
        "typeFilter": null,
        "label": "Network",
        "schema": {
          "fields": [
            {
              "id": "networkPath",
              "label": "Network Path",
              "description": "Network path of the reservation",
              "dataType": {
                "type": "ref",
                "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
                "componentId": null,
                "classId": "Network",
                "typeFilter": null,
                "label": "Network"
              },
              "displayAdvice": null,
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  {
                    "type": "mandatory",
                    "value": {
                      "type": "constantClause",
                      "value": {
                        "type": "boolean",
                        "value": true
                      }
                    }
                  }
                ]
              },
              "isMultiValued": false
            },
            {
              "id": "networkProfile",
              "label": "Network Profile",
              "description": "The Network Profile",
              "dataType": {
                "type": "ref",
                "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
                "componentId": null,
                "classId": "NetworkProfile",
                "typeFilter": null,
                "label": "Network Profile"
              },
              "displayAdvice": null,
              "permissibleValues": {
                "type": "dynamic",
                "customAllowed": false,
                "dependencies": [
                  
                ]
              },
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  
                ]
              },
              "isMultiValued": false
            }
          ]
        }
      },
      "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": "allocationModel",
      "label": "Allocation Model",
      "description": "The allocation model for the reservation",
      "dataType": {
        "type": "primitive",
        "typeId": "INTEGER"
      },
      "displayAdvice": null,
      "state": {
        "dependencies": [
          
        ],
        "facets": [
          {
            "type": "readOnly",
            "value": {
              "type": "constantClause",
              "value": {
                "type": "boolean",
                "value": true
              }
            }
          }
        ]
      },
      "isMultiValued": false
    },
    {
      "id": "reservationMemory",
      "label": "Memory",
      "dataType": {
        "type": "complex",
        "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
        "componentId": null,
        "classId": "Infrastructure.Reservation.Memory",
        "typeFilter": null,
        "label": "Memory",
        "schema": {
          "fields": [
            {
              "id": "computeResourceMemoryTotalSizeMB",
              "label": "Physical Memory (MB)",
              "description": "The physical capacity (MB) for the memory",
              "dataType": {
                "type": "primitive",
                "typeId": "INTEGER"
              },
              "displayAdvice": null,
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  {
                    "type": "readOnly",
                    "value": {
                      "type": "constantClause",
                      "value": {
                        "type": "boolean",
                        "value": true
                      }
                    }
                  }
                ]
              },
              "isMultiValued": false
            },
            {
              "id": "memoryReservedSizeMb",
              "label": "Memory Reservation (MB)",
              "description": "The reserved capacity (MB) for the memory",
              "dataType": {
                "type": "primitive",
                "typeId": "INTEGER"
              },
              "displayAdvice": null,
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  
                ]
              },
              "isMultiValued": false
            }
          ]
        }
      },
      "displayAdvice": "DATA_TABLE",
      "state": {
        "dependencies": [
          
        ],
        "facets": [
          
        ]
      },
      "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": "ReservationTypeId",
        "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": "Infrastructure.Reservation.Storage",
        "typeFilter": null,
        "label": "Storage",
        "schema": {
          "fields": [
            {
              "id": "storagePath",
              "label": "Storage Path",
              "description": "The storage path of the storage",
              "dataType": {
                "type": "ref",
                "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
                "componentId": null,
                "classId": "Storage",
                "typeFilter": null,
                "label": "Storage Path"
              },
              "displayAdvice": null,
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  {
                    "type": "mandatory",
                    "value": {
                      "type": "constantClause",
                      "value": {
                        "type": "boolean",
                        "value": true
                      }
                    }
                  }
                ]
              },
              "isMultiValued": false
            },
            {
              "id": "storageReservationPriority",
              "label": "Priority",
              "description": "The reservation priority for the storage",
              "dataType": {
                "type": "primitive",
                "typeId": "INTEGER"
              },
              "displayAdvice": null,
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  {
                    "type": "mandatory",
                    "value": {
                      "type": "constantClause",
                      "value": {
                        "type": "boolean",
                        "value": true
                      }
                    }
                  }
                ]
              },
              "isMultiValued": false
            },
            {
              "id": "computeResourceStorageTotalSizeGB",
              "label": "Total (GB)",
              "description": "The total physical capacity (GB) for the storage",
              "dataType": {
                "type": "primitive",
                "typeId": "INTEGER"
              },
              "displayAdvice": null,
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  {
                    "type": "readOnly",
                    "value": {
                      "type": "constantClause",
                      "value": {
                        "type": "boolean",
                        "value": true
                      }
                    }
                  }
                ]
              },
              "isMultiValued": false
            },
            {
              "id": "storageReservedSizeGB",
              "label": "This reservation reserved (GB)",
              "description": "The reserved capacity size (GB) for the storage",
              "dataType": {
                "type": "primitive",
                "typeId": "INTEGER"
              },
              "displayAdvice": null,
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  
                ]
              },
              "isMultiValued": false
            },
            {
              "id": "storageEnabled",
              "label": "Enabled",
              "description": "Whether the storage is enabled to reserve",
              "dataType": {
                "type": "primitive",
                "typeId": "BOOLEAN"
              },
              "displayAdvice": null,
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  {
                    "type": "mandatory",
                    "value": {
                      "type": "constantClause",
                      "value": {
                        "type": "boolean",
                        "value": true
                      }
                    }
                  }
                ]
              },
              "isMultiValued": false
            },
            {
              "id": "computeResourceStorageFreeSizeGB",
              "label": "Free (GB)",
              "description": "The free capacity (GB) for the storage",
              "dataType": {
                "type": "primitive",
                "typeId": "INTEGER"
              },
              "displayAdvice": null,
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  {
                    "type": "readOnly",
                    "value": {
                      "type": "constantClause",
                      "value": {
                        "type": "boolean",
                        "value": true
                      }
                    }
                  }
                ]
              },
              "isMultiValued": false
            }
          ]
        }
      },
      "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
    }
  ]
}