You can use the vRealize Automation REST API reservation service to display a schema definition for a specific reservation type, for example a vCloud Air reservation.

开始之前

  • Log in to vRealize Automation as a fabric group administrator.

  • Verify that the host name and fully qualified domain name of the vRealize Automation instance are available.

  • Verify that you have a valid HTTP bearer token that matches your login credentials. See REST API Authentication.

  • Obtain the schema class ID of the reservation type to create. See Display a List of Supported Reservation Types.

过程

Display a schema definition for a specific vCloud Air reservation.
curl --insecure -H "Accept:application/json" 
-H "Authorization: Bearer $token" 
https://$host/reservation-service/api/data-service/schema/Infrastructure.Reservation.Cloud.vCloudAir/default

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
    }
  ]
}