You can use the REST API reservation service to display a schema definition for a specific vRealize Automation reservation type, for example an Amazon 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 an Amazon reservation type.
curl --insecure -H "Accept:application/json" 
-H "Authorization: Bearer $token" 
https://$host/reservation-service/api/data-service/schema/Infrastructure.Reservation.Cloud.Amazon/default

The schema definition in this example includes 9 extension fields.

{
  "fields": [
    {
      "id": "securityGroups",
      "label": "Security groups",
      "description": "The security groups",
      "dataType": {
        "type": "ref",
        "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
        "componentId": null,
        "classId": "AmazonSecurityGroup",
        "typeFilter": null,
        "label": "Amazon Security Group"
      },
      "displayAdvice": null,
      "permissibleValues": {
        "type": "dynamic",
        "customAllowed": false,
        "dependencies": [
          "computeResource"
        ]
      },
      "state": {
        "dependencies": [
          
        ],
        "facets": [
          {
            "type": "visible",
            "value": {
              "type": "not",
              "subClause": {
                "type": "expression",
                "operator": {
                  "type": "isDefined"
                },
                "leftOperand": {
                  "type": "path",
                  "path": "VPC"
                }
              }
            }
          },
          {
            "type": "mandatory",
            "value": {
              "type": "not",
              "subClause": {
                "type": "expression",
                "operator": {
                  "type": "isDefined"
                },
                "leftOperand": {
                  "type": "path",
                  "path": "VPC"
                }
              }
            }
          }
        ]
      },
      "isMultiValued": true
    },
    {
      "id": "locations",
      "label": "Locations",
      "description": "The locations",
      "dataType": {
        "type": "ref",
        "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
        "componentId": null,
        "classId": "AvailabilityZone",
        "typeFilter": null,
        "label": "Availability Zone"
      },
      "displayAdvice": null,
      "permissibleValues": {
        "type": "dynamic",
        "customAllowed": false,
        "dependencies": [
          "computeResource"
        ]
      },
      "state": {
        "dependencies": [
          
        ],
        "facets": [
          {
            "type": "visible",
            "value": {
              "type": "not",
              "subClause": {
                "type": "expression",
                "operator": {
                  "type": "isDefined"
                },
                "leftOperand": {
                  "type": "path",
                  "path": "VPC"
                }
              }
            }
          },
          {
            "type": "mandatory",
            "value": {
              "type": "not",
              "subClause": {
                "type": "expression",
                "operator": {
                  "type": "isDefined"
                },
                "leftOperand": {
                  "type": "path",
                  "path": "VPC"
                }
              }
            }
          }
        ]
      },
      "isMultiValued": true
    },
    {
      "id": "loadBalancers",
      "label": "Load balancers",
      "description": "The load balancers",
      "dataType": {
        "type": "ref",
        "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
        "componentId": null,
        "classId": "ElasticLoadBalancer",
        "typeFilter": null,
        "label": "Elastic Load Balancer"
      },
      "displayAdvice": null,
      "permissibleValues": {
        "type": "dynamic",
        "customAllowed": false,
        "dependencies": [
          "locations",
          "computeResource"
        ]
      },
      "state": {
        "dependencies": [
          
        ],
        "facets": [
          {
            "type": "visible",
            "value": {
              "type": "not",
              "subClause": {
                "type": "expression",
                "operator": {
                  "type": "isDefined"
                },
                "leftOperand": {
                  "type": "path",
                  "path": "VPC"
                }
              }
            }
          }
        ]
      },
      "isMultiValued": true
    },
    {
      "id": "specificKeyPairs",
      "label": "Specific key pair",
      "description": "The specific key pair",
      "dataType": {
        "type": "ref",
        "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
        "componentId": null,
        "classId": "KeyPair",
        "typeFilter": null,
        "label": "Key Pair"
      },
      "displayAdvice": null,
      "permissibleValues": {
        "type": "dynamic",
        "customAllowed": false,
        "dependencies": [
          "computeResource",
          "keyPairs"
        ]
      },
      "state": {
        "dependencies": [
          
        ],
        "facets": [
          {
            "type": "visible",
            "value": {
              "type": "and",
              "subClauses": [
                {
                  "type": "expression",
                  "operator": {
                    "type": "isDefined"
                  },
                  "leftOperand": {
                    "type": "path",
                    "path": "keyPairs"
                  }
                },
                {
                  "type": "expression",
                  "operator": {
                    "type": "equals"
                  },
                  "leftOperand": {
                    "type": "constant",
                    "value": {
                      "type": "string",
                      "value": "Specific Key Pair"
                    }
                  },
                  "rightOperand": {
                    "type": "path",
                    "path": "keyPairs"
                  }
                }
              ]
            }
          },
          {
            "type": "mandatory",
            "value": {
              "type": "and",
              "subClauses": [
                {
                  "type": "expression",
                  "operator": {
                    "type": "isDefined"
                  },
                  "leftOperand": {
                    "type": "path",
                    "path": "keyPairs"
                  }
                },
                {
                  "type": "expression",
                  "operator": {
                    "type": "equals"
                  },
                  "leftOperand": {
                    "type": "constant",
                    "value": {
                      "type": "string",
                      "value": "Specific Key Pair"
                    }
                  },
                  "rightOperand": {
                    "type": "path",
                    "path": "keyPairs"
                  }
                }
              ]
            }
          }
        ]
      },
      "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": "VPC",
      "label": "VPC",
      "dataType": {
        "type": "complex",
        "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
        "componentId": null,
        "classId": "Infrastructure.Reservation.Cloud.Amazon.VPC",
        "typeFilter": null,
        "label": "VPC",
        "schema": {
          "fields": [
            {
              "id": "VPCSubnets",
              "label": "Subnets",
              "description": "The subnets.",
              "dataType": {
                "type": "ref",
                "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
                "componentId": null,
                "classId": "Subnet",
                "typeFilter": null,
                "label": "Subnet"
              },
              "displayAdvice": null,
              "permissibleValues": {
                "type": "dynamic",
                "customAllowed": false,
                "dependencies": [
                  
                ]
              },
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  {
                    "type": "minCardinality",
                    "value": {
                      "type": "constant",
                      "value": {
                        "type": "integer",
                        "value": 1
                      }
                    }
                  },
                  {
                    "type": "mandatory",
                    "value": {
                      "type": "constantClause",
                      "value": {
                        "type": "boolean",
                        "value": true
                      }
                    }
                  }
                ]
              },
              "isMultiValued": true
            },
            {
              "id": "VPCSecurityGroups",
              "label": "Security groups",
              "description": "The security groups",
              "dataType": {
                "type": "ref",
                "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
                "componentId": null,
                "classId": "AmazonSecurityGroup",
                "typeFilter": null,
                "label": "Amazon Security Group"
              },
              "displayAdvice": null,
              "permissibleValues": {
                "type": "dynamic",
                "customAllowed": false,
                "dependencies": [
                  
                ]
              },
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  {
                    "type": "minCardinality",
                    "value": {
                      "type": "constant",
                      "value": {
                        "type": "integer",
                        "value": 1
                      }
                    }
                  },
                  {
                    "type": "mandatory",
                    "value": {
                      "type": "constantClause",
                      "value": {
                        "type": "boolean",
                        "value": true
                      }
                    }
                  }
                ]
              },
              "isMultiValued": true
            },
            {
              "id": "VPCName",
              "label": "VPC Name",
              "description": "The virtual private cloud.",
              "dataType": {
                "type": "ref",
                "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
                "componentId": null,
                "classId": "VirtualPrivateCloud",
                "typeFilter": null,
                "label": "Virtual Private Cloud"
              },
              "displayAdvice": null,
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  {
                    "type": "readOnly",
                    "value": {
                      "type": "constantClause",
                      "value": {
                        "type": "boolean",
                        "value": true
                      }
                    }
                  }
                ]
              },
              "isMultiValued": false
            },
            {
              "id": "VPCLoadBalancers",
              "label": "Load balancers",
              "description": "The load balancers.",
              "dataType": {
                "type": "ref",
                "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
                "componentId": null,
                "classId": "ElasticLoadBalancer",
                "typeFilter": null,
                "label": "Elastic Load Balancer"
              },
              "displayAdvice": null,
              "permissibleValues": {
                "type": "dynamic",
                "customAllowed": false,
                "dependencies": [
                  "VPCSubnets"
                ]
              },
              "state": {
                "dependencies": [
                  
                ],
                "facets": [
                  
                ]
              },
              "isMultiValued": true
            }
          ]
        }
      },
      "displayAdvice": "DATA_TABLE",
      "permissibleValues": {
        "type": "dynamic",
        "customAllowed": false,
        "dependencies": [
          "computeResource"
        ]
      },
      "state": {
        "dependencies": [
          
        ],
        "facets": [
          {
            "type": "visible",
            "value": {
              "type": "or",
              "subClauses": [
                {
                  "type": "not",
                  "subClause": {
                    "type": "expression",
                    "operator": {
                      "type": "isDefined"
                    },
                    "leftOperand": {
                      "type": "path",
                      "path": "locations"
                    }
                  }
                },
                {
                  "type": "not",
                  "subClause": {
                    "type": "expression",
                    "operator": {
                      "type": "isDefined"
                    },
                    "leftOperand": {
                      "type": "path",
                      "path": "securityGroups"
                    }
                  }
                }
              ]
            }
          },
          {
            "type": "mandatory",
            "value": {
              "type": "or",
              "subClauses": [
                {
                  "type": "not",
                  "subClause": {
                    "type": "expression",
                    "operator": {
                      "type": "isDefined"
                    },
                    "leftOperand": {
                      "type": "path",
                      "path": "locations"
                    }
                  }
                },
                {
                  "type": "not",
                  "subClause": {
                    "type": "expression",
                    "operator": {
                      "type": "isDefined"
                    },
                    "leftOperand": {
                      "type": "path",
                      "path": "securityGroups"
                    }
                  }
                }
              ]
            }
          }
        ]
      },
      "isMultiValued": true
    },
    {
      "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": "keyPairs",
      "label": "Key pair",
      "description": "The key pair",
      "dataType": {
        "type": "primitive",
        "typeId": "STRING"
      },
      "displayAdvice": null,
      "permissibleValues": {
        "type": "static",
        "customAllowed": false,
        "values": [
          {
            "underlyingValue": {
              "type": "string",
              "value": "Not Specified"
            },
            "label": null
          },
          {
            "underlyingValue": {
              "type": "string",
              "value": "Per Provisioning Group"
            },
            "label": null
          },
          {
            "underlyingValue": {
              "type": "string",
              "value": "Per Machine"
            },
            "label": null
          },
          {
            "underlyingValue": {
              "type": "string",
              "value": "Specific Key Pair"
            },
            "label": null
          }
        ]
      },
      "state": {
        "dependencies": [
          
        ],
        "facets": [
          {
            "type": "mandatory",
            "value": {
              "type": "constantClause",
              "value": {
                "type": "boolean",
                "value": true
              }
            }
          }
        ]
      },
      "isMultiValued": false
    }
  ]