Vrealize Automation 76 Programming Guide
Vrealize Automation 76 Programming Guide
19 DEC 2019
vRealize Automation 7.6
Programming Guide
You can find the most up-to-date technical documentation on the VMware website at:
https://docs.vmware.com/
VMware, Inc.
3401 Hillview Ave.
Palo Alto, CA 94304
www.vmware.com
©
Copyright 2008-2019 VMware, Inc. All rights reserved. Copyright and trademark information.
VMware, Inc. 2
Contents
Updated Information 9
3 Creating a Tenant 22
Prerequisites for Creating a Tenant 22
Create a Tenant With Parameters Inline 22
Create a Tenant With a JSON File 25
Identity Service Examples for Creating a Tenant 27
Syntax for Displaying Your Current Tenants 28
Syntax for Requesting a New Tenant 30
Syntax for Listing All Tenant Identity Stores 33
Syntax for Linking an Identity Store to the Tenant 35
Syntax for Searching LDAP or Active Directory for a User 39
Syntax for Assigning a User to a Role 41
Syntax for Displaying all Roles Assigned to a User 41
4 Requesting a Machine 45
Request a Machine 45
Catalog Service Examples for Requesting a Machine 47
Syntax for Listing Shared and Private Catalog Items 47
Syntax for Getting Information for a Catalog Item 51
Syntax for Getting a Template Request for a Catalog Item 55
Syntax for Requesting a Machine 59
Syntax for Viewing Details of a Machine Request 62
VMware, Inc. 3
Programming Guide
VMware, Inc. 4
Programming Guide
VMware, Inc. 5
Programming Guide
VMware, Inc. 6
Programming Guide
VMware, Inc. 7
vRealize Automation Programming Guide
The Programming Guide provides information about the vRealize Automation REST APIs,
including how to use the REST API services and resources, create HTTP bearer tokens for
authentication and authorization, and construct REST API service calls.
Intended Audience
This information is intended for administrators and programmers who want to configure and
manage vRealize Automation programmatically using the vRealize Automation REST API. The
guide focuses on common use cases. For related information about all available REST API
services, see the vRealize Automation API Reference at https://code.vmware.com/apis/vrealize-
automation.
VMware, Inc. 8
Updated Information
This Programming Guide is updated with each release of the product or when necessary.
Revision Description
19 DEC 2019 Added content regarding Machine States and Entitlements for Day 2 Actions.
24 APR 2019 Corrected syntax in command to obtain existing client secret in Creating the New OAuth2 Client .
VMware, Inc. 9
Overview of the vRealize
Automation REST API 1
The vRealize Automation REST API provides consumer, administrator, and provider-level access
to the service catalog with the same services that support the vRealize Automation console user
interface. You can perform vRealize Automation functions programmatically by using REST API
service calls.
Service Description
Advanced Designer Service The advanced designer service selection on the vRealize
Automation API Reference landing page selects the
documentation for the XaaS service.
Manages XaaS elements such as forms, endpoints, XaaS
blueprints, tenants, vRealize Orchestrator imports, workflows, and
work items.
Approval Service Retrieve, create, update, and delete approval policies, policy
types, policy instances, and policy requests.
Branding Service Change the background and text colors, company logo, company
name, product name, tenant name, and other resources in the
console.
Catalog Service Retrieve global and entitled catalog items, and entitlements for
a catalog item and its service that the current user can review.
A consumer can retrieve, edit, and submit a request form for a
catalog item. A provider can retrieve, register, update, and delete
catalog items. Provision and manage systems.
Component Registry Service Access and manage all services and serves as the central view for
all service lookups.
VMware, Inc. 10
Programming Guide
Service Description
Content Service Access and manage the content controller and package controller
for export and import processes. This includes export and import
for blueprints and software.
Endpoint Configuration Service Create, read, update and delete endpoint types, endpoint
categories, and endpoints.
Event Broker Service Provide a central location and a consistent way of recording
events and querying for events.
IaaS Proxy Provider Service Run a proxy service that acts as a bridge between the service
catalog and the IaaS provider to call other services, such as
the catalog service, composition service, reservation service, and
event broker service.
Identity Service Manage tenants, business groups, SSO and custom groups, users,
and identity stores.
Network Service Access and manage application network and security settings for
creating and configuring NAT and routed networks; creating load
balancers; and adding and configuring security groups, security
tags and security policies for application components.
Notification Service Configure and send notifications for several types of events such
as the successful completion of a catalog request or a required
approval.
Orchestration (o11n) Gateway Service Provides a gateway to VMware Realize Orchestrator (vRO) for
services running on vRealize Automation. By using the gateway,
consumers of the API can access a vRO instance, and initiate
workflows or script actions without having to deal directly with
the vRO APIs.
VMware, Inc. 11
Programming Guide
Service Description
Reclamation Service Retrieve work item forms, callbacks, and tasks. Manage endpoint
details including tenant, password, user name, and endpoint URL.
Retrieve performance metrics. Retrieve and cancel reclamation
requests.
Software Service Triggers the execution life cycle of software components using
the software agent, registers software agents, and manages
the creation, modification and deletion of software component,
software component types, software resource requests, and
nodes (machines).
vRA Orchestrator Service Manage vRealize Orchestrator actions, tasks, packages, and
workflows. Browse system and plug-in inventories.
Work Item Service Retrieve, create, update, complete, cancel, and delete a work
item. Also retrieve form data, metadata, detail forms, and
submission forms from service providers.
In addition, the vRealize Health Broker is used to execute integration level tests. It runs
application health checks and can be queried to provide the status of individual tests so that
health issues are identified early.
API References
API services are installed with the product. References are available with the following URLs.
https://$vRA/component-registry/services/docs#!/apis
https://$vRA:5480/config/
https://$vRA:8090/discovery/swagger
VMware, Inc. 12
Programming Guide
n cURL. http://curl.haxx.se
In the following example, the client running version 6.2 of the catalog service REST API is making
a call to a server running a later version of the API.
VMware, Inc. 13
Programming Guide
curl is used for example requests. Request headers required by the API are included in
example requests that are not fragments of a larger example. The variable $vRA represents
the appliance name.domain name of the vRealize Automation server in all URLs. The variable
$tenantId identifies a tenant for the endpoint. Many examples use a fictional tenant identified as
rainpole.
Most example responses show only those elements and attributes that are relevant to the
operation being discussed. Ellipses (...) indicate omitted content within response bodies.
Postman collections are not used in the API examples, but are available from the Code Samples
section for the vRealize Automation API at VMware{code} or, https://code.vmware.com/apis/
vrealize-automation.
VMware, Inc. 14
REST API Authentication
2
In the REST API, vRealize Automation requires HTTP bearer tokens in request headers for
authentication of consumer requests. A consumer request applies to tasks that you can perform
in the vRealize Automation console, such as requesting a machine.
To acquire an HTTP bearer token, you authenticate with an identity service that manages the
communication with the SSO server. The identity service returns an HTTP bearer token that you
include in all request headers until the token expires, or you delete it. An HTTP bearer token
expires in 24 hours by default, but you can configure the token with a different duration.
You use POST, HEAD, and DELETE methods to manage HTTP bearer tokens.
POST /tokens Authenticate the user with the identity service /tokens and
generate a new token.
Use the following root URL for HTTP bearer token calls:
https://$vRA/identity/api/tokens
VMware, Inc. 15
Programming Guide
The variable $vRA represents the appliance name.domain name of the vRealize Automation
server such as, vra-appliance-name.company.com.
The effective duration or lifetime of an HTTP bearer token depends on the duration of its
corresponding SAML token, which the SSO server creates at request time. An HTTP bearer
token expires when it reaches the end of its configured duration, or at the end of the configured
duration of the SAML token, whichever comes first. For example, if the configured duration is
three days for the HTTP bearer token and two days for the SAML token, the HTTP bearer token
expires in two days. A configuration setting on the SSO server determines the duration of SAML
tokens.
Prerequisites
n Log in to the vRealize Automation appliance with SSH as root. The password is the one you
specified when you deployed the appliance.
Procedure
2 Add the following lines to the file, where N is an integer specifying the duration of the token
in hours.
identity.basic.token.lifetime.hours=N
#The number is in hours.
Results
The new value applies the next time someone requests an HTTP bearer token.
A consumer request must specify the correct component registry service and resource. For
example, the URL to obtain an HTTP bearer token must specify the identity service and token
resource.
VMware, Inc. 16
Programming Guide
For details regarding input, output, and response codes, see Syntax for Requesting an HTTP
Bearer Token.
Prerequisites
n Secure a channel between the web browser and the vRealize Automation server. Open a
browser and enter the URL such as:
https://vra-appliance-name.company.com
The system warns that your connection is not private. Click through to confirm the security
exception and establish an SSL handshake.
n Log in to vRealize Automation using the applicable credentials. For example, to assign a user
to a role, log in as a tenant administrator.
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
Procedure
In this example, $vRA is an instance of vRealize Automation. The --insecure flag is included
so that the request will return a response even if the traffic is not secured with a trusted
certificate.
A successful request returns an HTTP bearer token that you include in subsequent API
requests.
export token="EXAMPLE-TOKEN-TEXT"
VMware, Inc. 17
Programming Guide
If the credentials supplied in the Authorization header are invalid, the response includes status
code 401 as in the following output.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/identity/api/tokens
tenantURLtoken Tenant URL token determined by the system administrator when creating the
tenant such as, support.
Output
The following information is displayed as a result of your HTTP bearer token request.
Parameter Description
expires Contains the ISO 8601 timestamp indicating when the token expires.
VMware, Inc. 18
Programming Guide
400 BAD REQUEST The data you provided in the POST failed validation.
Inspect the response body for details.
When your request succeeds, the system returns the expiration date and time of the token, and
the HTTP bearer token.
Prerequisites
Procedure
VMware, Inc. 19
Programming Guide
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Content-Type: application/json;charset=UTF-8
Date: Thu, 13 Apr 2017 21:56:02 GMT
X-Frame-Options: SAMEORIGIN
401 UNAUTHORIZED You must have authentication credentials to access the resource. All requests must
be authenticated.
403 FORBIDDEN Your authentication credentials do not provide sufficient access to the resource.
404 NOT FOUND Could not locate the resource based on the specified URI.
405 METHOD NOT ALLOWED The HEAD method is not supported for the resource.
500 SERVER ERROR Could not create or update the resource because of an internal server error.
Prerequisites
Procedure
1 Enter the command to delete the HTTP bearer token, as in the following example.
VMware, Inc. 20
Programming Guide
204 NO CONTENT The request succeeded. The resource has been deleted.
401 UNAUTHORIZED You must have authentication credentials to access the resource. All requests must
be authenticated.
403 FORBIDDEN Your authentication credentials do not provide sufficient access to the resource.
404 NOT FOUND Could not locate the resource based on the specified URI.
405 METHOD NOT ALLOWED The DELETE method is not supported for the resource.
500 SERVER ERROR Could not create or update the resource because of an internal server error.
VMware, Inc. 21
Creating a Tenant
3
You use the identity service to create a tenant.
The identity service is comprised of two components: authentication and authorization. The
authentication component manages tenants, groups, users, and identity stores. Creating a tenant
is an authentication example.
Two use cases show how to create a tenant, either with parameters inline or with input values
in a JSON file. After creating a tenant, you can use other service examples to perform additional
authentication and authorization functions.
For general information about creating and working with tenants, see Configuring vRealize
Automation in the vRealize Automation information center.
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
VMware, Inc. 22
Programming Guide
Prerequisites
In addition to the Prerequisites for Creating a Tenant, verify that you have parameter values for
the new tenant.
Procedure
For details regarding input and output of this sample, see Syntax for Displaying Your Current
Tenants .
2 Examine the response to verify that the tenant you plan to create is not listed.
See the output of the request to display all tenants Create a Tenant With Parameters Inline.
For details regarding input and output of this sample, see Syntax for Requesting a New
Tenant
4 Use the identity service to display all the available tenants again.
5 Examine the response to verify that the tenant you requested is listed.
See the output of the request to verify the new tenant is created Create a Tenant With
Parameters Inline.
VMware, Inc. 23
Programming Guide
"defaultTenant":true},
{"@type":"Tenant",
"id":"qe",
...},
{"@type":"Tenant",
"id":"management",
...}
],
"metadata":{"size":20,"totalElements":3,"totalPages":1,"number":1,"offset":0}
}
The following sample output for Step 3 shows that the tenant named rainpole has been created.
The following sample output for Step 4 lists four tenants including rainpole.
VMware, Inc. 24
Programming Guide
Prerequisites
In addition to the Prerequisites for Creating a Tenant, verify that you have parameter values for
the new tenant required for the JSON file input.
Procedure
For details regarding input and output of this sample, see Syntax for Displaying Your Current
Tenants .
2 Examine the response to verify that the tenant you plan to create is not listed.
See the output of the request to display all tenants Create a Tenant With a JSON File.
{
"@type":"Tenant",
"id":"rainpole",
"urlName":"rainpole",
"name":"rainpoleTenant",
"description":"New Custom Tenant",
"contactEmail":"[email protected]",
"defaultTenant":false
}
4 Submit a request for a new tenant that calls the JSON file.
For details regarding input and output of this sample, see Syntax for Requesting a New
Tenant
5 Use the identity service to display all the available tenants again.
VMware, Inc. 25
Programming Guide
6 Examine the response to verify that the tenant you requested is listed.
See the output of the request to verify the new tenant is created Create a Tenant With a
JSON File.
The following sample output for Step 4, shows that the tenant named rainpole has been created.
The following sample output for Step 5 lists four tenants including rainpole.
VMware, Inc. 26
Programming Guide
{"@type":"Tenant",
"id":"vsphere.local",
...},
{"@type":"Tenant",
"id":"qe",
...},
{"@type":"Tenant",
"id":"management",
...},
{"@type":"Tenant",
"id":"rainpole",
...}
],
"metadata":{"size":20,"totalElements":4,"totalPages":1,"number":1,"offset":0}
}
VMware, Inc. 27
Programming Guide
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/identity/api/tenants
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
VMware, Inc. 28
Programming Guide
Parameter Description
Links Specifies an array of link objects, each of which contains the following parts:
n rel: Specifies the name of the link.
n Self refers to the object that was returned or requested. This parameter does
not appear when you query a single profile.
n First, Previous, Next, and Last refer to corresponding pages of pageable
lists.
n Specifies the application or service that determines the other names.
n href: Specifies the URL that produces the result.
Content Specifies an array of data rows, each of which represents one of the tenant objects
returned in a pageable list. Each tenant object can contain the following information:
n Id: Specifies the unique tenant identifier.
n urlName: Specifies the name of the tenant as it appears in URLs.
n Name: Specifies the name of the tenant for display purposes.
n description: Specifies the long description of the tenant.
n contactEmail: Specifies the primary contact email address.
n Password: Unused
n defaultTenant: Is set to True if the corresponding tenant is the default tenant
(vsphere.local).
VMware, Inc. 29
Programming Guide
The response in JSON lists the current tenants. Format the output to improve its readability.
For information about formatting output, see Chapter 19 Filtering and Formatting REST API
Information.
{
"links":[],
"content"[
{
"@type":"Tenant",
"id":"vsphere.local",
"urlName":"vsphere.local",
"name":"vsphere.local",
"description":null,
"contactEmail":null,
"password":"",
"defaultTenant":true
},
{
"@type":"Tenant",
"id":"qe",
"urlName":"qe",
"name":"QETenant",
"description":"Precreated test tenant",
"contactEmail":null,
"password":"",
"defaultTenant":false
}
{
"@type":"Tenant",
"id":"management",
"urlName":"management",
"name":"Management-ITTenant",
"description":"Precreated test tenant",
"contactEmail":null,
"password":"",
"defaultTenant":false
}
],
"metadata":{
"size":20,
"totalElements":3,
"totalPages":1,
"number":1,
"offset":0
}
}
VMware, Inc. 30
Programming Guide
Input
Use the supported input parameters to control the command output.
Parameter Description
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
$password Optional password for the new tenant. If blank, no password is required.
{
"@type" : "Tenant",
"id" : "$tenantId",
"urlName" : "$tenantURL",
"name" : "$tenantName",
"description" : "$description",
"contactEmail" : "$emailAddress",
"password": "$password",
"defaultTenant" : false
}
Output
The command output contains property names and values based on the command input
parameters.
VMware, Inc. 31
Programming Guide
Parameter Description
Links Specifies an array of link objects, each of which contains the following parts:
n rel: Specifies the name of the link.
n Self refers to the object that was returned or requested. This parameter does
not appear when you query a single profile.
n First, Previous, Next, and Last refer to corresponding pages of pageable
lists.
n Specifies the application or service that determines the other names.
n href: Specifies the URL that produces the result.
Content Specifies an array of data rows, each of which represents one of the tenant objects
returned in a pageable list. Each tenant object can contain the following information:
n Id: Specifies the unique tenant identifier.
n urlName: Specifies the name of the tenant as it appears in URLs.
n Name: Specifies the name of the tenant for display purposes.
n description: Specifies the long description of the tenant.
n contactEmail: Specifies the primary contact email address.
n Password: Unused
n defaultTenant: Is set to True if the corresponding tenant is the default tenant
(vsphere.local).
{
"@type" : "Tenant",
"id" : "rainpole",
"urlName" : "rainpole",
"name" : "rainpoleTenant",
"description" : "New Custom Tenant",
"contactEmail" : null,
"password": "",
"defaultTenant" : true
}
The following example command requests a new tenant by calling the newTenant.json file.
VMware, Inc. 32
Programming Guide
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/identity/api/tenants/$tenantId/directories
$vRA Specifies the appliance name and fully qualified domain name, or IP address of
the vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
VMware, Inc. 33
Programming Guide
Parameter Description
Links Specifies an array of link objects, each of which contains the following parts:
n rel: Specifies the name of the link.
n Self refers to the object that was returned or requested. This parameter
does not appear when you query a single profile.
n First, Previous, Next, and Last refer to corresponding pages of
pageable lists.
n Specifies the application or service that determines the other names.
n href: Specifies the URL that produces the result.
Content Specifies an array of data rows, each of which represents one of the tenant
objects returned in a pageable list. Each tenant object can contain the following
information:
n Id: Specifies the unique tenant identifier.
n urlName: Specifies the name of the tenant as it appears in URLs.
n Name: Specifies the name of the tenant for display purposes.
n description: Specifies the long description of the tenant.
n contactEmail: Specifies the primary contact email address.
n Password: Unused
n defaultTenant: Is set to True if the corresponding tenant is the default tenant
(vsphere.local).
Example: curl Command to List All Identity Stores for the Tenant
The following example command lists the identity stores.
{
"links":[],
VMware, Inc. 34
Programming Guide
"content":[
{
"@type":"IdentityStore",
"domain":"vcac.mycompany.com",
"name":"openLDAPPromocom",
"description":null,
"alias":"promocom.com",
"type":"LDAP",
"userNameDn":"cn=promocomadmin,ou=promocom,dc=vcac,dc=mycompany,dc=com",
"password":null,
"url":"ldap://10.000.00.000:389",
"groupBaseSearchDn":"ou=promocom,dc=vcac,dc=mycompany,dc=com",
"userBaseSearchDn":"ou=promocom,dc=vcac,dc=mycompany,dc=com"
},
{
"@type":"IdentityStore",
"domain":"example.mycompany.com",
"name":"openLDAPDemo",
"description":null,
"alias":"example.com",
"type":"LDAP",
"userNameDn":"cn=demoadmin,ou=demo,dc=example,dc=mycompany,dc=com",
"password":null,
"url":"ldap://10.000.00.000:389",
"groupBaseSearchDn":"ou=demo,dc=example,dc=mycompany,dc=com",
"userBaseSearchDn":"ou=demo,dc=example,dc=mycompany,dc=com"
}
],
"metadata":{
"size":20,
"totalElements":2,
"totalPages":1,
"number":1,
"offset":0
}
}
Input
Use the supported input parameters to control the command output.
Parameter Description
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
VMware, Inc. 35
Programming Guide
Parameter Description
$identityStoreType Specifies the identity store type for the tenant. The following values are supported:
n LDAP
n AD
n NATIVE_AD
{
"alias": "$domainAlias",
"domain": "$domainName",
"groupBaseSearchDn": "$grpBaseSearchDn",
"name": "$identityStoreName",
"password": "$password",
"type": "$identityStoreType",
"url": "$identityServerUrl",
"userBaseSearchDn": "$usrBaseSearchDn",
"userNameDn": "$usrNameDn"
}
Output
The command output contains property names and values based on the command input
parameters.
VMware, Inc. 36
Programming Guide
Parameter Description
Links Specifies an array of link objects, each of which contains the following parts:
n rel: Specifies the name of the link.
n Self refers to the object that was returned or requested. This parameter
does not appear when you query a single profile.
n First, Previous, Next, and Last refer to corresponding pages of
pageable lists.
n Specifies the application or service that determines the other names.
n href: Specifies the URL that produces the result.
Content Specifies an array of data rows, each of which represents one of the tenant
objects returned in a pageable list. Each tenant object can contain the following
information:
n Id: Specifies the unique tenant identifier.
n urlName: Specifies the name of the tenant as it appears in URLs.
n Name: Specifies the name of the tenant for display purposes.
n description: Specifies the long description of the tenant.
n contactEmail: Specifies the primary contact email address.
n Password: Unused
n defaultTenant: Is set to True if the corresponding tenant is the default tenant
(vsphere.local).
{
"alias": "example.com",
"domain": "example.mycompany.com",
"groupBaseSearchDn": "ou=demo,dc=example,dc=mycompany,dc=com",
"name": "openLDAPDemo",
"password": "password",
"type": "LDAP",
"url": "ldap://10.000.00.000:389",
"userBaseSearchDn": "ou=demo,dc=example,dc=mycompany,dc=com",
VMware, Inc. 37
Programming Guide
"userNameDn": "cn=demoadmin,ou=demo,dc=example,dc=mycompany,dc=com"
}
The following example command links an identity store to a tenant by calling the example JSON
text file.
The command also tests that vRealize Automation can connect to the identity store successfully.
If the command finishes successfully,vRealize Automation succeeded in connecting to the identity
store.
This response in JSON indicates that an identity store is successfully linked to the specified
tenant.
Request Headers
{
Content-Type = application/json
Accept = application/json
Content-Length = 413
Accept-Charset = big5, big5-hkscs, euc-jp, euc-kr, gb18030, gb2312, gbk,
ibm-thai, ibm00858, ibm01140, ibm01141, ibm01142, ibm01143, ibm01144, ibm01145,
ibm01146, ibm01147, ibm01148, ibm01149, ibm037, ibm1026, ibm1047, ibm273, ibm277,
ibm278, ibm280, ibm284, ibm285, ibm290, ibm297, ibm420, ibm424, ibm437, ibm500,
ibm775, ibm850, ibm852, ibm855, ibm857, ibm860, ibm861, ibm862, ibm863, ibm864,
ibm865, ibm866, ibm868, ibm869, ibm870, ibm871, ibm918, iso-2022-cn, iso-2022-jp,
iso-2022-jp-2, iso-2022-kr, iso-8859-1, iso-8859-13, iso-8859-15, iso-8859-2,
iso-8859-3, iso-8859-4, iso-8859-5, iso-8859-6, iso-8859-7, iso-8859-8, iso-8859-9,
jis_x0201, jis_x0212-1990, koi8-r, koi8-u, shift_jis, tis-620, us-ascii, utf-16,
utf-16be, utf-16le, utf-32, utf-32be, utf-32le, utf-8, windows-1250, windows-1251,
windows-1252, windows-1253, windows-1254, windows-1255, windows-1256, windows-1257,
windows-1258, windows-31j, x-big5-hkscs-2001, x-big5-solaris, x-compound_text,
x-euc-jp-linux, x-euc-tw, x-eucjp-open, x-ibm1006, x-ibm1025, x-ibm1046, x-ibm1097,
x-ibm1098, x-ibm1112, x-ibm1122, x-ibm1123, x-ibm1124, x-ibm1364, x-ibm1381,
x-ibm1383, x-ibm300, x-ibm33722, x-ibm737, x-ibm833, x-ibm834, x-ibm856, x-ibm874,
x-ibm875, x-ibm921, x-ibm922, x-ibm930, x-ibm933, x-ibm935, x-ibm937, x-ibm939,
x-ibm942, x-ibm942c, x-ibm943, x-ibm943c, x-ibm948, x-ibm949, x-ibm949c, x-ibm950,
x-ibm964, x-ibm970, x-iscii91, x-iso-2022-cn-cns, x-iso-2022-cn-gb, x-iso-8859-11,
x-jis0208, x-jisautodetect, x-johab, x-macarabic, x-maccentraleurope, x-maccroatian,
x-maccyrillic, x-macdingbat, x-macgreek, x-machebrew, x-maciceland, x-macroman,
x-macromania, x-macsymbol, x-macthai, x-macturkish, x-macukraine, x-ms932_0213,
x-ms950-hkscs, x-ms950-hkscs-xp, x-mswin-936, x-pck, x-sjis_0213, x-utf-16le-bom,
x-utf-32be-bom, x-utf-32le-bom, x-windows-50220, x-windows-50221, x-windows-874,
x-windows-949, x-windows-950, x-windows-iso2022jp
}
Response Headers
{
Date = Wed, 29 Oct 2014 22:41:57 GMT
Content-Type = application/json;charset=UTF-8
Content-Length = 0
Vary = Accept-Encoding,User-Agent
VMware, Inc. 38
Programming Guide
Command failed [Rest Error]: {Status code: 400}, {Error code: 90027} , {Error
Source: null}, {Error Msg: Cannot connect to the directory service.}, {System
Msg: 90027-Connection to directory service can’t be established}
To resolve the problem, correct the identity store and connection details in the JSON input file
and rerun the command.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/identity/api/tenants/$tenantId/principals/$userId
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
VMware, Inc. 39
Programming Guide
Parameter Description
Links Specifies an array of link objects, each of which contains the following parts:
n rel: Specifies the name of the link.
n Self refers to the object that was returned or requested. This parameter does
not appear when you query a single profile.
n First, Previous, Next, and Last refer to corresponding pages of pageable
lists.
n Specifies the application or service that determines the other names.
n href: Specifies the URL that produces the result.
locked Specifies the Boolean flag indicating if the user is locked out.
{
"links" : [ ],
"content" : [
{
"@type" : "User",
"firstName" : "Tony",
"lastName" : "Anteater",
"emailAddress" : "[email protected]",
"locked" : false,
"disabled" : false,
"principalId" :
{
"domain" : "example.mycompany.com",
VMware, Inc. 40
Programming Guide
"name" : "susan"
},
"tenantName" : "MYCOMPANY1",
"name" : "Tony Anteater"
}
]
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/identity/api/authorization/tenants/$tenantId/principals/$principalId/roles/
roleId
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the vRealize
Automation server.
If the command is successful, the HTTP response body is empty except for a 204 No Content
status statement.
VMware, Inc. 41
Programming Guide
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/identity/api/authorization/tenants/$tenantId/principals/$principalId/roles
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
assignedPermissions Specifies the set of permissions that are implied by this role assignment.
{
"links" : [ ],
"content" : [
{
"@type" : "SystemRole",
"id" : "ABX_TENANT_ADMIN",
"name" : "Tenant Administrator",
"description" : "ABX Tenant Administrator",
VMware, Inc. 42
Programming Guide
"assignedPermissions" : [ {
"id" : "CATALOG_CONSUME_TENANT_MGMT",
"name" : "Catalog Consume Tenant Management",
"description" : "Consume services, resources and manage requests ... within a
Tenant",
"prereqAdminPermissions" : null
},
{
"id" : "MY_TENANT_MANAGEMENT",
"name" : "My Tenant Management",
"description" : "Manage my tenant.",
"prereqAdminPermissions" : null
},
{
"id" : "CATALOG_AUTHOR_TENANT",
"name" : "Catalog Tenant-level Author",
"description" : "Create, update and publish services, catalog ... across a Tenant.",
"prereqAdminPermissions" : null
},
{
"id" : "GUI_MY_TENANT_MANAGEMENT",
"name" : "My Tenant Administration User Interface",
"description" : "Access my tenant administration GUI.",
"prereqAdminPermissions" : null
},
{
"id" : "CATALOG_ENTITLE_TENANT",
"name" : "Catalog Tenant-level Entitlement Management",
"description" : "Entitle services, catalog items and actions ... users within a
tenant.",
"prereqAdminPermissions" : null
},
{
"id" : "FILE_EDIT_TENANT",
"name" : "Manage Tenant Files",
"description" : "Upload and delete files belonging to this tenant.",
"prereqAdminPermissions" : null
},
{
"id" : "TENANT_USER_DATA_MANAGEMENT",
"name" : "Manage user data (requests, items, tasks etc) within a tenant.",
"description" : "Manage user created objects belonging to the tenant.",
"prereqAdminPermissions" : null
},
{
"id" : "TENANT_ADMIN_ROLE_ASSIGNMENT",
"name" : "Tenant Administrator Role Assignment",
"description" : "Assign the tenant administrator role to other users.",
"prereqAdminPermissions" : null
},
{
"id" : "GUI_MY_TENANT_TUG_MANAGEMENT",
"name" : "My Tenant Identity Stores, Groups and Users Administration User
Interfaces",
"description" : "Access my tenant identity stores, groups ... users administration
VMware, Inc. 43
Programming Guide
GUIs.",
"prereqAdminPermissions" : null
}
],
"metadata" : {
"size" : 20,
"totalElements" : 1,
"totalPages" : 1,
"number" : 1,
"offset" : 0
}
}
VMware, Inc. 44
Requesting a Machine
4
You use the catalog service to perform tasks related to requesting a machine.
The catalog service is comprised APIs for the consumer, service providers, and service
administrators. It is designed to be used by consumers and providers of the service catalog.
For example, a consumer would request a catalog item such as a machine. The service provider
would fulfill the request.
The catalog service includes Hypermedia as the Engine of Application State (HATEOAS) links.
The links function as templates that you can use to complete common tasks supported by the
API.
n Request a Machine
Request a Machine
To request a machine, you first list all shared catalog items to find the machine, then make the
request for that item using a template.
Prerequisites
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
VMware, Inc. 45
Programming Guide
Procedure
For details regarding input and output for this request, see Syntax for Listing Shared and
Private Catalog Items .
Use the catalogItemId to submit the template request for this catalog item. In this example,
the catalogItemId is dc808d12-3786-4f7c-b5a1-d5f997c8ad66.
For details regarding input and output for this request, see Syntax for Getting a Template
Request for a Catalog Item.
A template request for the catalog item is created. The fields and default values
are populated based on the configuration of the underlying blueprint. By default,
requestMachine.json is the name of the template request.
Review the contents of the template request and edit the values if you want to change
them from the default prior to submitting the request for a machine. For example, you can
specify a value for the description field or change the values for the machine resources if the
blueprint allows for a range.
For details regarding input and output for this request see Syntax for Requesting a Machine .
VMware, Inc. 46
Programming Guide
You can perform a GET on the URI in the Location header to retrieve the updated
request details. In this example, the URI-in-Location-header is 7aaf9baf-aa4e-47c4-997b-
edd7c7983a5b.
For details regarding input and output for this request, see Syntax for Viewing Details of a
Machine Request .
VMware, Inc. 47
Programming Guide
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/catalog-service/api/consumer/entitledCatalogItemViews
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
$top Sets the number of returned entries from the top of the response
VMware, Inc. 48
Programming Guide
Parameter Description
$filter Boolean expression for whether a particular entry should be included in the response.
Valid OData properties include the following:
n name - filter based on catalog item name.
n status - filter based on catalog item status.
n service/id - filter based on catalog item service id.
n service/name - filter based on catalog item service name.
n organization/subTenant/id - filter based on catalog item business group ID, which
you can find in the catalogItem payload under organization > subtenantRef
n organization/subTenant/name - filter based on catalog item business group
name, which you can find in catalogItem payload under organization
>subtenantLabel
n outputResourceType/id - filter based on catalog item output resource type ID, for
example : Infrastructure.Virtual
n outputResourceType/name - Filter based on catalog item output resource type
name, for example: "VirtualMachine".
n catalogItemType/id - filter based on catalog item type ID, for example:
"Infrastructure.Virtual".
n catalogItemType/name - filter based on catalog item type name, for example:
"VirtualMachine".
n icon/id - filter based on catalog item icon ID.
serviceId (Optional) Query parameter to filter the returned catalog items by one specific service.
onBehalfOf (Optional) Query parameter that provides the value of the user ID when making a
request on behalf of another user.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
outputResourceTypeRef Specifies the type of the resource that results from requesting the catalog item.
name Specifies the user friendly name of the catalog item. Specifies the property type is
string.
description Specifies a short description of the catalog item. Specifies the property type is string.
serviceRef Specifies the catalog service that contains the catalog item.
isNoteworthy Specifies if the catalog item should be highlighted to users for a period of time.
dateCreated Specifies the date that this item was created in the catalog.
VMware, Inc. 49
Programming Guide
Property Description
lastUpdatedDate Specifies the date that this item was last updated in the catalog.
entitledOrganizations Specifies the organizations in which the catalog item can be consumed by the current
user.
{
"links": [],
"content": [
{
"@type": "ConsumerEntitledCatalogItemView",
"links": [
{
"@type": "link",
"rel": "GET: Request Template",
"href": "https://$vRA/catalog-service/api/consumer/entitledCatalogItems/
7c8275d6-1bd6-452a-97c4-d6c053e4baa4/requests/template"
},
{
"@type": "link",
"rel": "POST: Submit Request",
"href": "https://$vRA/catalog-service/api/consumer/entitledCatalogItems/
7c8275d6-1bd6-452a-97c4-d6c053e4baa4/requests"
}
],
"entitledOrganizations": [
{
"tenantRef": "mycompany",
"tenantLabel": "mycompany",
"subtenantRef": "c0683388-6db2-4cb5-9033-b24d15ad3766",
"subtenantLabel": "Demo Group"
}
],
"catalogItemId": "dc808d12-3786-4f7c-b5a1-d5f997c8ad66",
"name": "Linux",
"description": "Linux blueprint for API demo",
VMware, Inc. 50
Programming Guide
"isNoteworthy": false,
"dateCreated": "2015-07-29T03:54:28.141Z",
"lastUpdatedDate": "2015-07-29T12:46:56.405Z",
"iconId": "cafe_default_icon_genericCatalogItem",
"catalogItemTypeRef": {
"id": "com.vmware.csp.component.cafe.composition.blueprint",
"label": "Composite Blueprint"
},
"serviceRef": {
"id": "057d4095-95f1-47da-b14b-641ac9010c97",
"label": "Infrastructure Services"
},
"outputResourceTypeRef": {
"id": "composition.resource.type.deployment",
"label": "Deployment"
}
}
],
"metadata": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Input
Use the supported input parameters to control the command output.
VMware, Inc. 51
Programming Guide
Parameter Description
URL https://$vRA/catalog-service/api/consumer/entitledCatalogItemViews/{id}
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
$top Sets the number of returned entries from the top of the response
VMware, Inc. 52
Programming Guide
Parameter Description
$filter Boolean expression for whether a particular entry should be included in the response.
Valid OData properties include the following:
n name - filter based on catalog item name.
n status - filter based on catalog item status.
n service/id - filter based on catalog item service id.
n service/name - filter based on catalog item service name.
n organization/subTenant/id - filter based on catalog item business group ID, which
you can find in the catalogItem payload under organization > subtenantRef
n organization/subTenant/name - filter based on catalog item business group
name, which you can find in catalogItem payload under organization
>subtenantLabel
n outputResourceType/id - filter based on catalog item output resource type ID, for
example : Infrastructure.Virtual
n outputResourceType/name - Filter based on catalog item output resource type
name, for example: "VirtualMachine".
n catalogItemType/id - filter based on catalog item type ID, for example:
"Infrastructure.Virtual".
n catalogItemType/name - filter based on catalog item type name, for example:
"VirtualMachine".
n icon/id - filter based on catalog item icon ID.
serviceId (Optional) Query parameter to filter the returned catalog items by one specific service.
onBehalfOf (Optional) Query parameter that provides the value of the user ID when making a
request on behalf of another user.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
outputResourceTypeRef Specifies the type of the resource that results from requesting the catalog item.
name Specifies the user friendly name of the catalog item. Specifies the property type is
string.
description Specifies a short description of the catalog item. Specifies the property type is string.
serviceRef Specifies the catalog service that contains the catalog item.
isNoteworthy Specifies if the catalog item should be highlighted to users for a period of time.
dateCreated Specifies the date that this item was created in the catalog.
VMware, Inc. 53
Programming Guide
Property Description
lastUpdatedDate Specifies the date that this item was last updated in the catalog.
entitledOrganizations The list of organizations in which the current user can consume the catalog item.
{
"links": [],
"content": [
{
"@type": "ConsumerEntitledCatalogItemView",
"links": [
{
"@type": "link",
"rel": "GET: Request Template",
"href": "https://$vRA/catalog-service/api/consumer/entitledCatalogItems/
7c8275d6-1bd6-452a-97c4-d6c053e4baa4/requests/template"
},
{
"@type": "link",
"rel": "POST: Submit Request",
"href": "https://$vRA/catalog-service/api/consumer/entitledCatalogItems/
7c8275d6-1bd6-452a-97c4-d6c053e4baa4/requests"
}
],
"entitledOrganizations": [
{
"tenantRef": "mycompany",
"tenantLabel": "mycompany",
"subtenantRef": "c0683388-6db2-4cb5-9033-b24d15ad3766",
"subtenantLabel": "Demo Group"
}
],
"catalogItemId": "7c8275d6-1bd6-452a-97c4-d6c053e4baa4",
"name": "Linux",
"description": "Linux blueprint for API demo",
"isNoteworthy": false,
"dateCreated": "2015-07-29T03:54:28.141Z",
"lastUpdatedDate": "2015-07-29T12:46:56.405Z",
"iconId": "cafe_default_icon_genericCatalogItem",
"catalogItemTypeRef": {
"id": "com.vmware.csp.component.cafe.composition.blueprint",
"label": "Composite Blueprint"
VMware, Inc. 54
Programming Guide
},
"serviceRef": {
"id": "057d4095-95f1-47da-b14b-641ac9010c97",
"label": "Infrastructure Services"
},
"outputResourceTypeRef": {
"id": "composition.resource.type.deployment",
"label": "Deployment"
}
}
],
"metadata": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Overview
In the entitledCatalogItemViews response, a link field contains a value similar to the following.
{
"@type":"link",
"href":"https://$vRA/catalog-service/api/consumer/entitledCatalogItems/
dc808d12-3786-4f7c-b5a1-d5f997c8ad66/requests/template",
"rel":"GET: Request Template"
}
This URL is a HATEOAS link for a template request for this catalog item. The rel field provides
a description of the link (request template) and indicates the HTTP method to use with the
URI in the href field (GET). By using these HATEOAS links, you can make follow-on API calls
without having to consult the API documentation for the URI syntax or construct the links
programmatically.
VMware, Inc. 55
Programming Guide
You can review the contents of the template and optionally edit the values if you want to change
them from the default prior to submitting the request. For example, you can specify a value for
the description field or change the values for the machine resources if the blueprint allows for a
range.
Input
Use the supported input parameters to control the command output.
Parameter Description
Output
The command output contains property names and values based on the command input
parameters.
Property Description
entitledOrganizations The list of organizations in which the current user can consume the catalog item.
{
"type": "com.vmware.vcac.catalog.domain.request.CatalogItemProvisioningRequest",
"catalogItemId": "7c8275d6-1bd6-452a-97c4-d6c053e4baa4",
"requestedFor": "[email protected]",
"businessGroupId": "c0683388-6db2-4cb5-9033-b24d15ad3766",
"description": null,
"reasons": null,
"data": {
"Existing_Network_1": {
"componentTypeId": "com.vmware.csp.component.cafe.composition",
"componentId": null,
"classId": "Blueprint.Component.Declaration",
"typeFilter": "LinuxDemo*Existing_Network_1",
"data": {
"_cluster": 1,
VMware, Inc. 56
Programming Guide
"_hasChildren": false,
"description": null,
"name": "Existing Network",
"networkname": "Existing Network",
"subnetmask": "255.255.255.0"
}
},
"vSphere-Linux": {
"componentTypeId": "com.vmware.csp.component.cafe.composition",
"componentId": null,
"classId": "Blueprint.Component.Declaration",
"typeFilter": "LinuxDemo*vSphere-Linux",
"data": {
"Cafe.Shim.VirtualMachine.MaxCost": 0,
"Cafe.Shim.VirtualMachine.MinCost": 0,
"_cluster": 1,
"_hasChildren": false,
"action": "FullClone",
"allow_storage_policies": false,
"archive_days": 0,
"blueprint_type": "1",
"cpu": 1,
"custom_properties": [],
"daily_cost": 0,
"datacenter_location": null,
"description": null,
"disks": [
{
"componentTypeId": "com.vmware.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Compute.Machine.MachineDisk",
"typeFilter": null,
"data": {
"capacity": 6,
"id": 0,
"initial_location": "",
"is_clone": false,
"label": "",
"storage_reservation_policy": "",
"userCreated": true,
"volumeId": 0
}
}
],
"display_location": false,
"guest_customization_specification": null,
"lease_days": 0,
"machine_actions": [
"DESTROY",
"POWER_ON",
"CONNECT_RDP_SSH",
"REPROVISION",
"POWER_CYCLE",
"EXPIRE",
"SUSPEND",
VMware, Inc. 57
Programming Guide
"CONNECT_REMOTE_CONSOLE",
"CONNECT_USING_VDI"
],
"machine_prefix": {
"componentId": null,
"classId": "Infrastructure.Compute.MachinePrefix",
"id": "Use group default"
},
"max_network_adapters": 0,
"max_per_user": 0,
"max_volumes": 60,
"memory": 4096,
"nics": [
{
"componentTypeId": "com.vmware.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Compute.Machine.Nic",
"typeFilter": null,
"data": {
"address": "",
"assignment_type": "DHCP",
"custom_properties": null,
"id": 0,
"load_balancing": "",
"network_profile": "Existing Network"
}
}
],
"number_of_instances": 1,
"os_arch": "x86_64",
"os_distribution": null,
"os_type": "Linux",
"os_version": null,
"platform_name": "vsphere",
"platform_type": "virtual",
"property_groups": [
null
],
"provisioning_workflow": {
"componentId": null,
"classId": "Infrastructure.Compute.ProvisioningWorkflow",
"id": "CloneWorkflow"
},
"reservation_policy": {
"componentId": null,
"classId": "Infrastructure.Reservation.Policy.ComputeResource",
"id": "None"
},
"security_groups": [],
"security_tags": [],
"source_machine": null,
"source_machine_external_snapshot": null,
"source_machine_name": "cbpcentos_63_x86",
"source_machine_vmsnapshot": null,
"storage": 6
VMware, Inc. 58
Programming Guide
}
}
}
}
{
"@type":"link",
"href":"https://$vRA/catalog-service/api/consumer/entitledCatalogItems/
dc808d12-3786-4f7c-b5a1-d5f997c8ad66/requests",
"rel":"POST: Submit Request"
}
Use the information in this response to edit the template construct the URI to request the desired
catalog item using a POST command.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/catalog-service/api/consumer/entitledCatalogItems/
$catalogId/requests
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
catalogItemId The identifier of a catalog item. Typically, this is provided by users via the
REST URI when making an entitledCatalogItem provisioning request.
requestedFor The user for whom this request is being made. Must be the fully qualified
user ID. Typically this is provided by the REST URI when making an
entitledCatalogItem provisioning request.
businessGroupId The business group identifier associated with the request. Typically this is
provided via the REST URI when making the request.
reasons
VMware, Inc. 59
Programming Guide
Output
The command output contains property names and values based on the command input
parameters.
Property Description
approvalStatus Specifies a status indicating whether this request has been approved, rejected, or is still
pending some form of approval.
waitingStatus Specifies a status indicating whether this request is waiting on any external users or services
before it is able to progress.
phase Specifies the current phase of the request, which is more coarse grained and easier for users to
understand.
iconId Specifies an icon for this request based on the requested object type.
reasons Specifies the business reasons entered by the requestor or owner of this request.
requestedFor Specifies the ID of the user for whom this request is logged.
requestedBy Specifies the ID of the user who actually submitted the request
postApprovalId Specifies the ID of the approval generated for the post-provisioning workflow step.
dateCreated Specifies the date when this request was sent to the catalog.
lastUpdated Specifies the date when this request was last updated.
dateSubmitted Specifies the date when this request was first submitted.
quote Contains a quote made by the provider defining the estimated price(es) associated with the
request and/or any resources provisioned as a result of the request.
VMware, Inc. 60
Programming Guide
Property Description
requestData Contains a map of the provider-specific field-value pairs collected for this request.
retriesRemaning Specifies the number of attempts remaining to move this request from its current state to the
next state in the request workflow.
Some state transitions require calls to external services. These calls may fail due to transient
errors such as momentary network errors. In these cases, the catalog will retry the call a
number of times before failing.
This property defines the number of retries remaining for the current state transition. When it
reaches 0, the catalog will stop retrying and mark the request as failed. This property is reset
to the default number of retries for every new operation that is triggered.
components Returns the list of components associated with the request. The provider supplies this list of
components after request initialization.
{
"@type":"link",
"href":"https://$vRA/catalog-service/api/consumer/entitledCatalogItems/
f89fcbbf-7716-4a61-addd-a822dd4206f6/requests",
"rel":"POST: Submit Request"
}
The following example command submits a machine request using appropriately edited template
content from the entitledCatalogItemViews response.
VMware, Inc. 61
Programming Guide
{
Accept = application/json
Content-Type = application/json
Content-Length = 2806
}
Response Headers
{
Date = Wed, 03 Dec 2014 20:58:34 GMT
ETag = "0"
Location = https://$vRA/catalog-service/api/consumer/requests/7aaf9baf-aa4e-47c4-997b-
edd7c7983a5b
{
$requestObjectDetails
}
Content-Type = application/json;charset=UTF-8
Content-Length = 0
Vary = Accept-Encoding,User-Agent
Keep-Alive = timeout=15, max=100
Connection = Keep-Alive
}
null
Request Status
Typically, the request status information is the most important part of request details. The phase
field corresponds to the status displayed in the Requests tab in the interface. You can rerun this
command multiple times to monitor the state of a machine request.
VMware, Inc. 62
Programming Guide
REJECTED Request approval was rejected and will not complete. Yes
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/catalog-service/api/consumer/requests/$requestId
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
$requestId Specifies the request ID. See Display Your Provisioned Resources Example to view all
of your requests and search for a request ID.
The required request ID is located at the end of the Location URL in the response
header.
The request ID is located in the Location field of the response header if you
submitted the request with the –headers flag.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
approvalStatus Specifies a status indicating whether this request has been approved, rejected, or is still
pending some form of approval.
waitingStatus Specifies a status indicating whether this request is waiting on any external users or services
before it is able to progress.
phase Specifies the current phase of the request, which is more coarse grained and easier for users to
understand.
VMware, Inc. 63
Programming Guide
Property Description
iconId Specifies an icon for this request based on the requested object type.
reasons Specifies the business reasons entered by the requestor or owner of this request.
requestedFor Specifies the ID of the user for whom this request is logged.
requestedBy Specifies the ID of the user who actually submitted the request
postApprovalId Specifies the ID of the approval generated for the post-provisioning workflow step.
dateCreated Specifies the date when this request was sent to the catalog.
lastUpdated Specifies the date when this request was last updated.
dateSubmitted Specifies the date when this request was first submitted.
quote Contains a quote made by the provider defining the estimated price(es) associated with the
request and/or any resources provisioned as a result of the request.
requestData Contains a map of the provider-specific field-value pairs collected for this request.
retriesRemaning Specifies the number of attempts remaining to move this request from its current state to the
next state in the request workflow.
Some state transitions require calls to external services. These calls may fail due to transient
errors such as momentary network errors. In these cases, the catalog will retry the call a
number of times before failing.
This property defines the number of retries remaining for the current state transition. When it
reaches 0, the catalog will stop retrying and mark the request as failed. This property is reset
to the default number of retries for every new operation that is triggered.
components Returns the list of components associated with the request. The provider supplies this list of
components after request initialization.
VMware, Inc. 64
Programming Guide
The following sample output contains information about the catalog item request 7aaf9baf-
aa4e-47c4-997b-edd7c7983a5b.
{
"@type": "CatalogItemRequest",
"id": "7aaf9baf-aa4e-47c4-997b-edd7c7983a5b",
"iconId": "cafe_default_icon_genericCatalogItem",
"version": 6,
"requestNumber": 8,
"state": "SUCCESSFUL",
"description": "API test",
"reasons": null,
"requestedFor": "[email protected]",
"requestedBy": "[email protected]",
"organization": {
"tenantRef": "mycompany",
"tenantLabel": "mycompany",
"subtenantRef": "c0683388-6db2-4cb5-9033-b24d15ad3766",
"subtenantLabel": "Demo Group"
},
"requestorEntitlementId": "1b409157-152c-43c4-b4cc-1cdef7f6adf8",
"preApprovalId": null,
"postApprovalId": null,
"dateCreated": "2015-07-29T13:50:33.689Z",
"lastUpdated": "2015-07-29T13:55:35.951Z",
"dateSubmitted": "2015-07-29T13:50:33.689Z",
"dateApproved": null,
"dateCompleted": "2015-07-29T13:55:35.949Z",
"quote": {},
"requestCompletion": {
"requestCompletionState": "SUCCESSFUL",
"completionDetails": null
},
"requestData": {
$detailsOfSubmittedRequest
},
"retriesRemaining": 3,
"requestedItemName": "Linux",
"requestedItemDescription": "Linux blueprint for API demo",
"stateName": "Successful",
"approvalStatus": "POST_APPROVED",
"executionStatus": "STOPPED",
"waitingStatus": "NOT_WAITING",
"phase": "SUCCESSFUL",
"catalogItemRef": {
"id": "7c8275d6-1bd6-452a-97c4-d6c053e4baa4",
VMware, Inc. 65
Programming Guide
"label": "Linux"
}
}
Note In the request details, the phase field corresponds to the status that is displayed in the
Requests tab in the user interface.
VMware, Inc. 66
Approving a Machine Request
5
You use a series of work item service commands to approve a machine request.
Basic components of the work item service are the work item and the assignment. The work item
service provides a standard way to present work items to users. For example, a user can view all
work items and select the item to perform such as approving a machine request.
Prerequisites
n Log in to vRealize Automation as an approver with at least one of the following qualifications:
n You belong to a group which has been designated as an approval group in an approval
policy.
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
Procedure
For details regarding input and output for this request, see Syntax for Listing Work Items.
VMware, Inc. 67
Programming Guide
Use the workItemId to get the details for this work item. In this example, the workItemId is
5e3e9519-78ea-4409-a52c-e4aa3bc56511.
For details regarding input and output for this request, see Syntax for Getting Work Item
Details.
4 Construct a JSON file that contains the work item ID information that you need to approve a
machine request.
a Copy the appropriate JSON input file template to a new file in an XML editor that
maintains formatting.
b Substitute the input variables in the template with the values you obtained for your
specific work item ID, for example 5e3e9519-78ea-4409-a52c-e4aa3bc56511.
5 Approve the submitted machine request by specifying the work item ID and including the
JSON file as part of the command line.
For details regarding input and output for this request, see Syntax for Approving a Submitted
Machine Request.
Results
If the command is successful, the HTTP status is 201 Created. If the command is not successful,
the HTTP status is 204 No Content.
VMware, Inc. 68
Programming Guide
Inputs
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/workitem-service/api/workitems
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
VMware, Inc. 69
Programming Guide
Property Description
Links Specifies an array of link objects, each of which contains the following parts:
n rel: Specifies the name of the link.
n Self refers to the object that was returned or requested. This property does not exist
when you query for a single profile.
n First, Previous, Next, and Last refer to corresponding pages of pageable lists.
n Specifies the application or service that determines the other names.
n href: Specifies the URL that produces the result.
subTenantId Optionally associates the work item with a specific business group granting users with
management responsibilities over that business group permission to see the approval.
work itemType Specifies the work item type for the work item.
completedDate Specifies the date when the work item was completed.
assignedDate Specifies the date when the work item was assigned.
formUrl Specifies the URL from which the layout for this work item can be retrieved.
serviceId Specifies the service ID that generated this work item instance.
completedBy Specifies the principal ID of user who completed the work item.
VMware, Inc. 70
Programming Guide
{
"links" : [ ],
"content" : [ {
"@type" : "WorkItem",
"id" : "1755ef1a-d6f0-4901-9ecd-d03352ae4a05",
"version" : 1,
"workItemNumber" : 1,
"assignees" : [ {
"principalId" : "[email protected]",
"principalType" : "USER"
} ],
"tenantId" : "MYCOMPANY",
"callbackEntityId" : "1",
"workItemType" : {
"id" : "com.mycompany.cafe.samples.travel.workItem",
"name" : "Workspace Assignment",
"pluralizedName" : "Workspace Assignments",
"description" : "Location Specific Workspace Assignment",
"serviceTypeId" : "com.mycompany.cafe.samples.travel.api",
"actions" : [ {
"id" : "com.mycompany.cafe.samples.travel.workItem.complete",
"name" : "Reserve Workspace",
"stateName" : "Completed",
"icon" : {
"id" : "baa623db-0ca0-4db7-af41-9a301bc9e152",
"name" : "Complete Action Icon",
"contentType" : "image/png",
"image" : null
}
}, {
"id" : "com.mycompany.cafe.samples.travel.workItem.cancel",
"name" : "Workspace Unavailable",
"stateName" : "Cancelled",
"icon" : {
"id" : "b03f994a-e1ec-4aae-8fae-e747ed680a5e",
"name" : "Cancel Action Icon",
"contentType" : "image/png",
"image" : null
}
VMware, Inc. 71
Programming Guide
} ],
"completeByEmail" : true,
"commentsField" : null,
"listView" : {
"columns" : [ {
"id" : "duration",
"label" : "Duration",
"description" : "The length of stay, measured in days.",
"dataType" : {
"type" : "primitive",
"typeId" : "INTEGER"
},
"displayAdvice" : null,
"state" : {
"dependencies" : [ ],
"facets" : [ ]
},
"filterable" : false,
"sortable" : false,
"isMultiValued" : false
}, {
"id" : "location",
"label" : "Destination",
"description" : "The destination to which travel is being requested.",
"dataType" : {
"type" : "ref",
"componentTypeId" : null,
"componentId" : null,
"classId" : "location",
"typeFilter" : null,
"label" : null
},
"displayAdvice" : null,
"state" : {
"dependencies" : [ ],
"facets" : [ ]
},
"filterable" : false,
"sortable" : false,
"isMultiValued" : false
}, {
"id" : "arrivalDate",
"label" : "Arrival Date",
"description" : "The date of arrival at the destination",
"dataType" : {
"type" : "primitive",
"typeId" : "DATE_TIME"
},
"displayAdvice" : null,
"state" : {
"dependencies" : [ ],
"facets" : [ ]
},
"filterable" : false,
"sortable" : false,
VMware, Inc. 72
Programming Guide
"isMultiValued" : false
} ],
"defaultSequence" : [ "location", "arrivalDate", "duration" ]
},
"version" : 3,
"forms" : {
"workItemDetails" : {
"type" : "external",
"formId" : "travel.seating.task"
},
"workItemSubmission" : {
"type" : "external",
"formId" : "travel.seating.task"
},
"workItemNotification" : {
"type" : "external",
"formId" : "travel.itinerary.details"
}
}
},
.
.
.
"completedDate" : null,
"assignedDate" : "2014-02-20T23:55:31.600Z",
"createdDate" : "2014-02-20T23:55:31.600Z",
"assignedOrCompletedDate" : "2014-02-20T23:55:31.600Z",
"serviceId" : "2af18227-6a00-49e9-a76b-96de3ee767d2",
"workItemRequest" : {
"itemId" : "531660fd-b540-4946-9917-38c023b61c02",
"itemName" : "test travel 1",
"itemDescription" : "test travel 1",
"itemRequestor" : "[email protected]",
"itemCost" : 0.0,
"itemData" : {
"entries" : [ {
"key" : "requestLeaseTotal",
"value" : {
"type" : "money",
"currencyCode" : null,
"amount" : 1065.0
}
}, {
"key" : "approvalId",
"value" : {
"type" : "string",
"value" : "7a8b6054-1922-4f82-9266-245dffaa957c"
}
}, {
"key" : "requestClassId",
"value" : {
"type" : "string",
VMware, Inc. 73
Programming Guide
"value" : "request"
}
}, {
"key" : "requestedFor",
"value" : {
"type" : "string",
"value" : "[email protected]"
}
}, {
"key" : "requestReasons"
}, {
"key" : "requestedItemName",
"value" : {
"type" : "string",
"value" : "test travel 1"
}
}, {
"key" : "requestInstanceId",
"value" : {
"type" : "string",
"value" : "1cfe7177-74e3-4d68-a559-ea17587022ca"
}
}, {
"key" : "requestRef",
"value" : {
"type" : "string",
"value" : "15"
}
}, {
"key" : "requestedItemDescription",
"value" : {
"type" : "string",
"value" : "test travel 1"
}
}, {
"key" : "requestLeaseRate",
"value" : {
"type" : "moneyTimeRate",
"cost" : {
"type" : "money",
"currencyCode" : null,
"amount" : 213.0
},
"basis" : {
"type" : "timeSpan",
"unit" : "DAYS",
"amount" : 1
}
}
}, {
"key" : "requestingServiceId",
"value" : {
"type" : "string",
"value" : "f91d044a-04f9-4b96-8542-375e3e4e1dc1"
}
VMware, Inc. 74
Programming Guide
}, {
"key" : "policy",
"value" : {
"type" : "string",
"value" : "test travel approval policy"
}
}, {
"key" : "phase",
"value" : {
"type" : "string",
"value" : "Pre Approval"
}
}, {
"key" : "requestDescription",
"value" : {
"type" : "string",
"value" : "t"
}
}, {
"key" : "requestLease",
"value" : {
"type" : "timeSpan",
"unit" : "DAYS",
"amount" : 5
}
}, {
"key" : "requestedBy",
"value" : {
"type" : "string",
"value" : "[email protected]"
}
} ]
}
},
"status" : "Active",
"availableActions" : [ ]
} ],
"metadata" : {
"size" : 20,
"totalElements" : 7,
"totalPages" : 1,
"number" : 1,
"offset" : 0
}
}
VMware, Inc. 75
Programming Guide
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/workitem-service/api/workitems/workitem_ID
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
workitem_ID Specifies the unique identifier of a work item. See Syntax for Listing Work
Items.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
Links Specifies an array of link objects, each of which contains the following parts:
n rel: Specifies the name of the link.
n Self refers to the object that was returned or requested. This property does not exist
when you query for a single profile.
n First, Previous, Next, and Last refer to corresponding pages of pageable lists.
n Specifies the application or service that determines the other names.
n href: Specifies the URL that produces the result.
subTenantId Optionally associates the work item with a specific business group granting users with
management responsibilities over that business group permission to see the approval.
work itemType Specifies the work item type for the work item.
completedDate Specifies the date when the work item was completed.
assignedDate Specifies the date when the work item was assigned.
VMware, Inc. 76
Programming Guide
Property Description
formUrl Specifies the URL from which the layout for this work item can be retrieved.
serviceId Specifies the service ID that generated this work item instance.
completedBy Specifies the principal ID of user who completed the work item.
To view the contents of a JSON output file, for example workItemDetails.json, use the !
command with more in UNIX or type in Windows.
VMware, Inc. 77
Programming Guide
"callbackEntityId" : "069dc3ce-a260-4d6a-b191-683141c994c0",
"workItemType" : {
"id" : "com.mycompany.csp.core.approval.workitem.request",
"name" : "Approval",
"pluralizedName" : "Approvals",
"description" : "",
"serviceTypeId" : "com.mycompany.csp.core.cafe.approvals",
"actions" : [ {
"id" : "com.mycompany.csp.core.approval.action.approve",
"name" : "Approve",
"stateName" : "Approved",
"icon" : {
"id" : "c192b6a7-5b35-4a3b-8593-107ffcf8c3a8",
"name" : "approved.png",
"contentType" : "image/png",
"image" : null
}
}, {
"id" : "com.mycompany.csp.core.approval.action.reject",
"name" : "Reject",
"stateName" : "Rejected",
"icon" : {
"id" : "61c6da67-1164-421d-b575-10a245c89e10",
"name" : "rejected.png",
"contentType" : "image/png",
"image" : null
}
} ],
"completeByEmail" : true,
"commentsField" : "businessJustification",
"listView" : {
"columns" : [ {
"id" : "requestedItemName",
"label" : "Requested Item",
"description" : "",
"dataType" : {
"type" : "primitive",
"typeId" : "STRING"
},
"displayAdvice" : null,
"state" : {
"dependencies" : [ ],
"facets" : [ ]
},
"filterable" : false,
"sortable" : false,
"isMultiValued" : false
},
.
.
.
{
"id" : "requestLease",
VMware, Inc. 78
Programming Guide
"label" : "Lease",
"description" : "",
"dataType" : {
"type" : "primitive",
"typeId" : "TIME_SPAN"
},
"displayAdvice" : null,
"state" : {
"dependencies" : [ ],
"facets" : [ ]
},
"filterable" : false,
"sortable" : false,
"isMultiValued" : false
} ],
"defaultSequence" : [ "requestRef", "requestedItemName", "requestedFor",
"requestLease", "requestLeaseRate", "requestLeaseTotal" ]
},
"version" : 1,
"forms" : {
"workItemDetails" : {
"type" : "external",
"formId" : "approval.details"
},
"workItemSubmission" : {
"type" : "external",
"formId" : "approval.submission"
},
"workItemNotification" : {
"type" : "external",
"formId" : "approval.notification"
}
}
},
"completedDate" : null,
"assignedDate" : "2014-02-25T01:26:07.153Z",
"createdDate" : "2014-02-25T01:26:07.153Z",
"assignedOrCompletedDate" : "2014-02-25T01:26:07.153Z",
"serviceId" : "2af18227-6a00-49e9-a76b-96de3ee767d2",
"workItemRequest" : {
"itemId" : "069dc3ce-a260-4d6a-b191-683141c994c0",
"itemName" : "test-blueprint",
"itemDescription" : "",
"itemRequestor" : "[email protected]",
"itemCost" : 0.0,
"itemData" : {
"entries" : [ {
"key" : "requestLeaseTotal"
}, {
"key" : "approvalId",
"value" : {
"type" : "string",
"value" : "469c11ae-ed27-4790-baf1-c6839f35d474"
}
}, {
VMware, Inc. 79
Programming Guide
"key" : "requestClassId",
"value" : {
"type" : "string",
"value" : "request"
}
}, {
"key" : "requestedFor",
"value" : {
"type" : "string",
"value" : "[email protected]"
}
}, {
"key" : "requestReasons",
"value" : {
"type" : "string",
"value" : ""
}
}, {
"key" : "requestedItemName",
"value" : {
"type" : "string",
"value" : "test-blueprint"
}
.
.
.
}, {
"key" : "requestLease"
}, {
"key" : "requestedBy",
"value" : {
"type" : "string",
"value" : "[email protected]"
}
} ]
}
},
"status" : "Active",
"availableActions" : [ ]
}
VMware, Inc. 80
Programming Guide
{
"formData": {
"entries": [
{
"key": "source-source-provider-Cafe.Shim.VirtualMachine.NumberOfInstances",
"value": {
"type": "integer",
"value": 1
}
},
{
"key": "source-source-provider-VirtualMachine.Memory.Size",
"value": {
"type": "integer",
"value": 512
}
},
{
"key": "source-source-provider-VirtualMachine.CPU.Count",
"value": {
"type": "integer",
"value": 1
}
},
{
"key": "source-businessJustification",
"value": {
"type": "string",
"value": "solves abx request"
}
},
{
"key": "source-source-provider-VirtualMachine.LeaseDays",
"value": {
"type": "integer",
"value": 0
}
}
]
},
"workItemId": "5e3e9519-78ea-4409-a52c-e4aa3bc56511",
"workItemActionId": "com.mycompany.csp.core.approval.action.approve"
}
VMware, Inc. 81
Programming Guide
{
"@type": "CatalogItemRequest",
"catalogItemRef": {
"id": "65fbca06-a28e-46f3-bced-c6e5fb3a66f9"
},
"organization": {
"tenantRef": "MYCOMPANY",
"subtenantRef": "cccd7a7e-5283-416b-beb0-45eb4e924dcb"
},
"requestedFor": "[email protected]",
"state": "SUBMITTED",
"requestNumber": 0,
"requestData": {
"entries": [{
"key": "provider-blueprintId",
"value": {
"type": "string",
"value": "e16edcf9-6a10-4bc7-98e2-a33361aeb857"
}
},
{
"key": "provider-provisioningGroupId",
"value": {
"type": "string",
"value": "cccd7a7e-5283-416b-beb0-45eb4e924dcb"
}
VMware, Inc. 82
Programming Guide
},
{
"key": "requestedFor",
"value": {
"type": "string",
"value": "[email protected]"
}
},
{
"key": "provider-VirtualMachine.CPU.Count",
"value": {
"type": "integer",
"value": 1
}
},
{
"key": "provider-VirtualMachine.Memory.Size",
"value": {
"type": "integer",
"value": 1024
}
},
{
"key": "provider-VirtualMachine.LeaseDays",
"value": {
"type": "integer",
"value": 30
}
},
{
"key": "provider-__Notes",
"value": {
"type": "string",
"value": "MYCOMPANY machine"
}
},
{
"key": "provider-VirtualMachine.Disk0.Size",
"value": {
"type": "string",
"value": "1"
}
},
{
"key": "provider-VirtualMachine.Disk0.Letter",
"value": {
"type": "string",
"value": "C"
}
},
{
"key": "provider-VirtualMachine.Disk0.Label",
"value": {
"type": "string",
"value": "main"
VMware, Inc. 83
Programming Guide
}
}]
}
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/workitem-service/api/workitems/workitem_ID
workitem_ID Specifies the unique identifier of a work item. See Syntax for
Listing Work Items.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
Links Specifies an array of link objects, each of which contains the following parts:
n rel: Specifies the name of the link.
n Self refers to the object that was returned or requested. This property does not exist
when you query for a single profile.
n First, Previous, Next, and Last refer to corresponding pages of pageable lists.
n Specifies the application or service that determines the other names.
n href: Specifies the URL that produces the result.
subTenantId Optionally associates the work item with a specific business group granting users with
management responsibilities over that business group permission to see the approval.
VMware, Inc. 84
Programming Guide
Property Description
work itemType Specifies the work item type for the work item.
completedDate Specifies the date when the work item was completed.
assignedDate Specifies the date when the work item was assigned.
formUrl Specifies the URL from which the layout for this work item can be retrieved.
serviceId Specifies the service ID that generated this work item instance.
completedBy Specifies the principal ID of user who completed the work item.
Error Conditions
If the same request is submitted a second time, the following error response is received:
Command failed [Rest Error]: {Status code: 400}, {Error code: 12005} ,
{Error Source: null}, {Error Msg: Work item 5e3e9519-78ea-4409-a52c-e4aa3bc56511
is in COMPLETED state. Requested operation cannot be performed.}, {System Msg:
VMware, Inc. 85
Programming Guide
If a user who is not authorized to approve the request submits the request, the following error
response is received:
Command failed [Rest Error]: {Status code: 400}, {Error code: 12017} ,
{Error Source: null}, {Error Msg: User [email protected] not authorized to
complete work item with ID 5e3e9519-78ea-4409-a52c-e4aa3bc56511.}, {System Msg:
User [email protected] not authorized to complete Work item with id
5e3e9519-78ea-4409-a52c-e4aa3bc56511.}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/composition-service/api/blueprints/
$BlueprintId/costs/upfront
Method Post
VMware, Inc. 86
Programming Guide
Parameter Description
HTTP Body Specifies the blueprint ID for the blueprint for which you are
requesting price information and other information.
n Blueprint ID: Specifies the blueprint ID.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
setupFee Specifies the one time setup fee associated with the
component.
totalEstimatedLeasePriceInfo Specifies the minimum price and maximum price for the
lease period.
VMware, Inc. 87
Programming Guide
Property Description
{
"blueprintId": "myblueprintId",
"requestedFor": "[email protected]",
"subTenantId": "7a961949-13c4-4f3d-9010-66db8da6c51e",
"requestData": {
"entries": [
{
"key": "vSphere_Machine_1",
"value": {
"type": "complex",
"componentTypeId": "com.vmware.csp.iaas.blueprint.service",
"classId": "Blueprint.Node",
"typeFilter": "phanisimple*vSphere_Machine_1",
"values": {
"entries": [
{
"key": "_cluster",
"value": {
"type": "integer",
"value": 3
}
},
{
"key": "cpu",
"value": {
"type": "integer",
"value": 2
}
},
{
"key": "memory",
"value": {
"type": "integer",
"value": 2048
}
VMware, Inc. 88
Programming Guide
}
]
}
}
}
]
}
}
VMware, Inc. 89
Listing Provisioned Resources
6
You use the catalog service to list provisioned resources.
The catalog service is designed to be used by consumers and providers of the service catalog.
For example, a consumer might want to list resources provisioned by a provider. The consumer
can also list the resources in multiple ways.
Each example for this use case lists a curl command with respective JSON response, plus input
and output parameters. The same set of prerequisites applies to each example.
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
VMware, Inc. 90
Programming Guide
curl Command
The following example displays all applicable provisioned resources.
JSON Output
The following JSON output is returned based on the command input.
{
"links" : [ {
"@type" : "link",
"rel" : "next",
"href" : "https://vra152-009-067.mycompany.com/catalog-service/api/consumer/resources/?
page=2&limit=1"
} ],
"content" : [ {
"@type" : "ConsumerResource",
"id" : "c24e8c75-c201-489c-b51c-8d7009c23563",
"iconId" : "Travel_100.png",
"resourceTypeRef" : {
"id" : "com.mycompany.mystuff.samples.travel.packageType",
"label" : "Reservation"
},
"name" : "example",
"description" : "asd",
"status" : "ACTIVE",
"catalogResource" : {
"id" : "6fddafcd-bc3d-4753-8a2a-5fa3f78a5a90",
"label" : "example"
},
"requestId" : "55e7fcf3-4c77-4b11-a442-1f282333ac91",
"providerBinding" : {
"bindingId" : "1",
"providerRef" : {
"id" : "f60f5d1e-d6e9-4d98-9c48-f70a3e405346",
"label" : "travel-service"
}
},
…
}
Input
Use the supported input parameters to control the command output.
VMware, Inc. 91
Programming Guide
Parameter Description
URL https://$vRA/catalog-service/api/consumer/resources/
Output
The command output contains property names and values based on the command input
parameters.
Property Description
iconId Specifies an icon for this request based on the requested object type.
catalogItem Specifies the catalog item that defines the service this resource is based on.
VMware, Inc. 92
Programming Guide
Property Description
dateCreated Specifies the data and time at which the resource was created.
lastUpdated Specifies the date and time at which the resource was most recently modified.
lease Displays the resource's current lease as start and end time stamps.
leaseForDisplay Specifies the resource's current lease, #getLease, with time units synchronized with #getCosts.
costs Displays an optional rate of the price charges for the resource. This parameter is deprecated.
costToDate Displays an optional rate of the current price charges for the resource. This parameter is
deprecated.
totalCost Displays an optional rate of the price charges for the entire lease period. This parameter is
deprecated.
expenseMonthToD The expense of the resource from the beginning of the month to the current date. This value is
ate updated daily by vRealize Business for Cloud.
operations Specifies the sequence of available operations that can be performed on this resource.
Specifying page and limit values, you make the following two calls.
VMware, Inc. 93
Programming Guide
Specifying skip and top values, you make the following two calls.
If both page and limit values and skip and top values are specified, the skip and top values take
priority.
curl Command
The following example displays the provisioned resources by resource type.
JSON Output
The following JSON output is returned based on the command input.
{
"links" : [ ],
"content" : [ {
"@type" : "ConsumerResource",
"id" : "3bfde906-81b9-44c3-8c2d-07d2c9768168",
"iconId" : "cafe_default_icon_genericCatalogResource",
"resourceTypeRef" : {
"id" : "Infrastructure.Virtual",
"label" : "Virtual Machine"
},
"name" : "test2",
"description" : null,
"status" : "ACTIVE",
"catalogResource" : {
"id" : "e2f397be-72ad-4ec4-a688-c017560fa1a3",
"label" : "test-blueprint"
},
"requestId" : "b013d2fa-4ba4-416c-b46b-98bb8cc7b076",
"providerBinding" : {
"bindingId" : "8a4581a0-84f9-4e80-9af6-75d79633e382",
"providerRef" : {
"id" : "6918cd49-b737-467f-94bf-d14d52c78fba",
VMware, Inc. 94
Programming Guide
"label" : "iaas-service"
}
},
"owners" : [ {
"tenantName" : "MYCOMPANY",
"ref" : "[email protected]",
"type" : "USER",
"value" : "Fritz Arbeiter"
} ],
"organization" : {
"tenantRef" : "MYCOMPANY",
"tenantLabel" : "QETenant",
"subtenantRef" : "eab762cb-6e75-4379-83ef-171a71c9f00e",
"subtenantLabel" : "MyTestAgentBusinessGroup"
},
…
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/catalog-service/api/consumer/resourceTypes
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
limit Specifies the number of entries to display on a page. Maximum value is 5000. If not
specified, defaults to 20.
For information regarding limits to the number of elements displayed, see Retrieve
10,000 Resources Ordered By Name.
VMware, Inc. 95
Programming Guide
Parameter Description
top Specifies the number of returned entries from the top of the response (total number
per page in relation to skip).
n Infrastructure.Machine
n Infrastructure.AppServic
n Infrastructure.Cloud
n Infrastructure.Physical
n Infrastructure.vApp
n Infrastructure.Virtual
Output
The command output contains property names and values based on the command input
parameters.
Property Description
iconId Specifies an icon for this request based on the requested object type.
catalogItem Specifies the catalog item that defines the service this resource is based on.
VMware, Inc. 96
Programming Guide
Property Description
dateCreated Specifies the data and time at which the resource was created.
lastUpdated Specifies the date and time at which the resource was most recently modified.
lease Displays the resource's current lease as start and end time stamps.
leaseForDisplay Specifies the resource's current lease, #getLease, with time units synchronized with #getCosts.
costs Displays an optional rate of the price charges for the resource. This parameter is deprecated.
costToDate Displays an optional rate of the current price charges for the resource. This parameter is
deprecated.
totalCost Displays an optional rate of the price charges for the entire lease period. This parameter is
deprecated.
expenseMonthToD The expense of the resource from the beginning of the month to the current date. This value is
ate updated daily by vRealize Business for Cloud.
operations Specifies the sequence of available operations that can be performed on this resource.
curl Command
The following example displays all available resource types.
JSON Output
The following JSON output is returned based on the command input.
{
"links" : [ ],
VMware, Inc. 97
Programming Guide
"content" : [ {
"@type" : "ResourceType",
"id" : "Infrastructure.Machine",
"name" : "Machine",
"pluralizedName" : "Machines",
"description" : "The common parent type for all types of machines",
"primary" : true,
"schema" : {
"classId" : "Infrastructure.Machine.Schema",
"typeFilter" : null
},
"forms" : {
"catalogResourceInfoHidden" : true,
"details" : {
"type" : "extension",
"extensionId" : "csp.places.iaas.resource.details",
"extensionPointId" : null
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/catalog-service/api/consumer/resourceTypes
$vRA Specifies the appliance name and fully qualified domain name, or IP address of
the vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
iconId Specifies an icon for this request based on the requested object type.
catalogItem Specifies the catalog item that defines the service this resource is based on.
VMware, Inc. 98
Programming Guide
Property Description
dateCreated Specifies the data and time at which the resource was created.
lastUpdated Specifies the date and time at which the resource was most recently modified.
lease Displays the resource's current lease as start and end time stamps.
leaseForDisplay Specifies the resource's current lease, #getLease, with time units synchronized with #getCosts.
costs Displays an optional rate of the price charges for the resource. This parameter is deprecated.
costToDate Displays an optional rate of the current price charges for the resource. This parameter is
deprecated.
totalCost Displays an optional rate of the price charges for the entire lease period. This parameter is
deprecated.
expenseMonthToD The expense of the resource from the beginning of the month to the current date. This value is
ate updated daily by vRealize Business for Cloud.
operations Specifies the sequence of available operations that can be performed on this resource.
{
"links" : [ ],
"content" : [ {
"@type" : "ResourceType",
VMware, Inc. 99
Programming Guide
"id" : "Infrastructure.Machine",
"name" : "Machine",
"pluralizedName" : "Machines",
"description" : "The common parent type for all types of machines",
"primary" : true,
"schema" : {
"classId" : "Infrastructure.Machine.Schema",
"typeFilter" : null
},
"forms" : {
"catalogResourceInfoHidden" : true,
"details" : {
"type" : "extension",
"extensionId" : "csp.places.iaas.resource.details",
"extensionPointId" : null
}
curl Command
The following example displays the provisioned resources of one or more business groups.
JSON Output
In the following command input, the subtenant IDs correspond to business groups that are
managed by the user who is logged-in.
{
"links" : [ ],
"content" : [ {
"@type" : "ConsumerResource",
"id" : "3bfde906-81b9-44c3-8c2d-07d2c9768168",
"iconId" : "cafe_default_icon_genericCatalogResource",
"resourceTypeRef" : {
"id" : "Infrastructure.Virtual",
"label" : "Virtual Machine"
},
"name" : "test2",
"description" : null,
"status" : "ACTIVE",
"catalogResource" : {
"id" : "e2f397be-72ad-4ec4-a688-c017560fa1a3",
"label" : "test-blueprint"
},
"requestId" : "b013d2fa-4ba4-416c-b46b-98bb8cc7b076",
"providerBinding" : {
"bindingId" : "8a4581a0-84f9-4e80-9af6-75d79633e382",
"providerRef" : {
"id" : "6918cd49-b737-467f-94bf-d14d52c78fba",
"label" : "iaas-service"
}
},
"owners" : [ {
"tenantName" : "MYCOMPANY",
"ref" : "[email protected]",
"type" : "USER",
"value" : "Fritz Arbeiter"
} ],
"organization" : {
"tenantRef" : "MYCOMPANY",
"tenantLabel" : "QETenant",
"subtenantRef" : "eab762cb-6e75-4379-83ef-171a71c9f00e",
"subtenantLabel" : "MyTestAgentBusinessGroup"
},
"dateCreated" : "2014-09-19T21:19:37.541Z",
"lastUpdated" : "2014-09-19T21:19:40.888Z",
"hasLease" : true,
"lease" : {
"start" : "2014-09-19T21:18:57.000Z"
},
"leaseForDisplay" : null,
"hasCosts" : true,
"costs" : {
"leaseRate" : {
"type" : "moneyTimeRate",
"cost" : {
"type" : "money",
"currencyCode" : "USD",
"amount" : 0.0
},
"basis" : {
"type" : "timeSpan",
"unit" : "DAYS",
"amount" : 1
}
}
},
"costToDate" : {
"type" : "money",
"currencyCode" : "USD",
"amount" : 0.0
},
"totalCost" : null,
"childResources" : [ ],
"operations" : [ {
"name" : "Reprovision",
"description" : "Reprovision a machine.",
"iconId" : "machineReprovision.png",
"type" : "ACTION",
"id" : "a1caee9b-d67f-41e8-a7b3-131616a0f6ac",
"extensionId" : null,
"providerTypeId" : "com.mycompany.csp.iaas.blueprint.service",
"bindingId" : "Infrastructure.Machine.Action.Reprovision",
"hasForm" : false,
"formScale" : null
} ],
"forms" : {
"catalogResourceInfoHidden" : true,
"details" : {
"type" : "extension",
"extensionId" : "csp.places.iaas.resource.details",
"extensionPointId" : null
}
},
"resourceData" : {
"entries" : [ {
"key" : "Expire",
"value" : {
"type" : "boolean",
"value" : true
}
}, {
"key" : "MachineGroupName",
"value" : {
"type" : "string",
"value" : "MyTestAgentBusinessGroup"
}
}, {
"key" : "NETWORK_LIST",
"value" : {
"type" : "multiple",
"elementTypeId" : "COMPLEX",
"resources" : [ {
"type" : "complex",
"componentTypeId" : "com.mycompany.csp.component.iaas.proxy.provider",
"componentId" : null,
"classId" : "vra.api.model.NetworkViewModel",
"typeFilter" : null,
"values" : {
"entries" : [ {
"key" : "NETWORK_MAC_ADDRESS",
"value" : {
"type" : "string",
"value" : "56:52:4d:e7:46:d4"
}
}, {
"key" : "NETWORK_NAME",
"value" : {
"type" : "string",
"value" : "Test Agent-network-1"
}
} ]
}
} ]
}
}, {
"key" : "SNAPSHOT_LIST",
"value" : {
"type" : "multiple",
"elementTypeId" : "COMPLEX",
"resources" : [ ]
}
}, {
"key" : "ConnectViaRdp",
"value" : {
"type" : "boolean",
"value" : true
}
}, {
"key" : "MachineStatus",
"value" : {
"type" : "string",
"value" : "On"
}
}, {
"key" : "PowerOff",
"value" : {
"type" : "boolean",
"value" : true
}
}, {
"key" : "DISK_VOLUMES",
"value" : {
"type" : "multiple",
"elementTypeId" : "COMPLEX",
"resources" : [ {
"type" : "complex",
"componentTypeId" : "com.mycompany.csp.component.iaas.proxy.provider",
"componentId" : null,
"classId" : "vra.api.model.DiskInputModel",
"typeFilter" : null,
"values" : {
"entries" : [ {
"key" : "DISK_CAPACITY",
"value" : {
"type" : "integer",
"value" : 1
}
}, {
"key" : "DISK_DRIVE",
"value" : {
"type" : "string",
"value" : "c"
}
}, {
"key" : "DISK_INPUT_ID",
"value" : {
"type" : "string",
"value" : "DISK_INPUT_ID1"
}
} ]
}
} ]
}
}, {
"key" : "MachineBlueprintName",
"value" : {
"type" : "string",
"value" : "test-blueprint"
}
}, {
"key" : "Suspend",
"value" : {
"type" : "boolean",
"value" : true
}
}, {
"key" : "Reboot",
"value" : {
"type" : "boolean",
"value" : true
}
}, {
"key" : "Reprovision",
"value" : {
"type" : "boolean",
"value" : true
}
}, {
"key" : "MachineStorage",
"value" : {
"type" : "integer",
"value" : 1
}
}, {
"key" : "MachineDailyCost",
"value" : {
"type" : "decimal",
"value" : 0.0
}
}, {
"key" : "Destroy",
"value" : {
"type" : "boolean",
"value" : true
}
}, {
"key" : "MachineType",
"value" : {
"type" : "string",
"value" : "Virtual"
}
}, {
"key" : "InstallTools",
"value" : {
"type" : "boolean",
"value" : true
}
}, {
"key" : "Shutdown",
"value" : {
"type" : "boolean",
"value" : true
}
}, {
"key" : "ChangeLease",
"value" : {
"type" : "boolean",
"value" : true
}
}, {
"key" : "machineId",
"value" : {
"type" : "string",
"value" : "8a4581a0-84f9-4e80-9af6-75d79633e382"
}
}, {
"key" : "MachineMemory",
"value" : {
"type" : "integer",
"value" : 0
}
}, {
"key" : "MachineGuestOperatingSystem"
}, {
"key" : "MachineName",
"value" : {
"type" : "string",
"value" : "test2"
}
}, {
"key" : "MachineDestructionDate"
}, {
"key" : "MachineCPU",
"value" : {
"type" : "integer",
"value" : 1
}
}, {
"key" : "MachineInterfaceType",
"value" : {
"type" : "string",
"value" : "Test"
}
}, {
"key" : "MachineReservationName",
"value" : {
"type" : "string",
"value" : "Test Agent-Res-1"
}
}, {
"key" : "Reconfigure",
"value" : {
"type" : "boolean",
"value" : true
}
}, {
"key" : "EXTERNAL_REFERENCE_ID"
}, {
"key" : "MachineExpirationDate"
}, {
"key" : "Reset",
"value" : {
"type" : "boolean",
"value" : true
}
} ]
}
} ],
"metadata" : {
"size" : 2,
"totalElements" : 1,
"totalPages" : 1,
"number" : 1,
"offset" : 0
}
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/catalog-service/api/consumer/resources/type
$vRA Specifies the appliance name and fully qualified domain name, or IP address
of the vRealize Automation server.
Parameter Description
$resourceID Specifies a resource ID. See Display Your Provisioned Resources Example to
view all of your requests and search for a request ID.
managedOnly If true, the returned requests are from the user's managed subtenants.
limit Specifies the number of entries to display on a page. Maximum value is 5000.
If not specified, defaults to 20.
For information regarding limits to the number of elements displayed, see
Retrieve 10,000 Resources Ordered By Name.
top Specifies the number of returned entries from the top of the response (total
number per page in relation to skip).
Output
The command output contains property names and values based on the command input
parameters.
Property Description
iconId Specifies an icon for this request based on the requested object type.
catalogItem Specifies the catalog item that defines the service this resource is based on.
Property Description
dateCreated Specifies the data and time at which the resource was created.
lastUpdated Specifies the date and time at which the resource was most recently modified.
lease Displays the resource's current lease as start and end time stamps.
leaseForDisplay Specifies the resource's current lease, #getLease, with time units synchronized with #getCosts.
costs Displays an optional rate of the price charges for the resource. This parameter is deprecated.
costToDate Displays an optional rate of the current price charges for the resource. This parameter is
deprecated.
totalCost Displays an optional rate of the price charges for the entire lease period. This parameter is
deprecated.
expenseMonthToD The expense of the resource from the beginning of the month to the current date. This value is
ate updated daily by vRealize Business for Cloud.
operations Specifies the sequence of available operations that can be performed on this resource.
curl Command
The following example displays machine details for a provisioned machine with
resourceID=7aaf9baf-aa4e-47c4-997b-edd7c7983a5b.
JSON Output
The following JSON output is returned based on the command input.
{
"links": [],
"content": [
{
"@type": "CatalogResourceView",
"links": [
{
"@type": "link",
"rel": "GET: Catalog Item",
"href": "https://$vRA/catalog-service/api/consumer/
entitledCatalogItemViews/7c8275d6-1bd6-452a-97c4-d6c053e4baa4"
},
{
"@type": "link",
"rel": "GET: Request",
"href": "https://$vRA/catalog-service/api/consumer/requests/7aaf9baf-
aa4e-47c4-997b-edd7c7983a5b"
},
{
"@type": "link",
"rel": "GET Template:
{com.vmware.csp.component.cafe.composition@resource.action.deployment.destroy.name}",
"href": "https://$vRA/catalog-service/api/consumer/resources/c4d3db3e-
e397-44ff-a1c9-0ecebdba12f4/actions/416e6bb1-3357-448b-8396-e268d5f7343b/requests/template"
},
{
"@type": "link",
"rel": "POST:
{com.vmware.csp.component.cafe.composition@resource.action.deployment.destroy.name}",
"href": "https://$vRA/catalog-service/api/consumer/resources/c4d3db3e-
e397-44ff-a1c9-0ecebdba12f4/actions/416e6bb1-3357-448b-8396-e268d5f7343b/requests"
},
{
"@type": "link",
"rel": "GET: Child Resources",
"href": "https://$vRA/catalog-service/api/consumer/resourceViews?
managedOnly=false&withExtendedData=true&withOperations=true&%24filter=parentResource%20eq%20%2
7c4d3db3e-e397-44ff-a1c9-0ecebdba12f4%27"
}
],
"resourceId": "c4d3db3e-e397-44ff-a1c9-0ecebdba12f4",
"iconId": "cafe_default_icon_genericCatalogItem",
"name": "Linux-80813151",
"description": null,
"status": null,
"catalogItemId": "7c8275d6-1bd6-452a-97c4-d6c053e4baa4",
"catalogItemLabel": "Linux",
"requestId": "7aaf9baf-aa4e-47c4-997b-edd7c7983a5b",
"resourceType":
"{com.vmware.csp.component.cafe.composition@resource.type.deployment.name}",
"owners": [
"Connie Summers"
],
"businessGroupId": "c0683388-6db2-4cb5-9033-b24d15ad3766",
"tenantId": "mycompany",
"dateCreated": "2015-07-29T13:51:36.368Z",
"lastUpdated": "2015-07-29T13:55:35.963Z",
"lease": null,
"costs": null,
"costToDate": null,
"totalCost": null,
"parentResourceId": null,
"hasChildren": true,
"data": {}
}
],
"metadata": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
http://$vRA/catalog-service/api/consumer/requests/$requestId/resourceViews
In addition to general information about the provisioned deployment such as its name,
description, and ID, the response contains additional HATEOAS links that enable you to obtain
additional details and information.
Link Description
GET: Catalog Item URI to get the catalog item details (as described in sections 3.2.1
and 3.2.2) from which this catalog item was provisioned.
GET: Request URI to get the request details that provisioned this item.
GET:Template URI to get a template request for a specific action that you can
{com.vmware.csp.component.cafe.composition perform on this resource. Typically, on a deployment the action will
@resource.action.deployment.$actionName be Delete.
Link Description
POST: URI to which to post the request to perform an action, based on the
{com.vmware.csp.component.cafe.composition corresponding template.
@resource.action.deployment.$actionName
GET: Child Resources If the deployment contains child resources (nodes specified in
the composite blueprint), this is the URI to get a list of the
resourceViews for the children of this deployment.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/catalog-service/api/consumer/resources/$resourceId
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
$resourceID Specifies a resource ID. See Display Your Provisioned Resources Example to view all of
your requests and search for a request ID.
managedOnly If true, the returned requests are from the user's managed subtenants.
$top Specifies the number of returned entries from the top of the response (total number
per page in relation to skip).
Output
The command output contains property names and values based on the command input
parameters.
Property Description
iconId Specifies an icon for this request based on the requested object type.
Property Description
catalogItem Specifies the catalog item that defines the service this resource is based on.
dateCreated Specifies the data and time at which the resource was created.
lastUpdated Specifies the date and time at which the resource was most recently modified.
lease Displays the resource's current lease as start and end time stamps.
leaseForDisplay Specifies the resource's current lease, #getLease, with time units synchronized with #getCosts.
costs Displays an optional rate of the price charges for the resource. This parameter is deprecated.
costToDate Displays an optional rate of the current price charges for the resource. This parameter is
deprecated.
totalCost Displays an optional rate of the price charges for the entire lease period. This parameter is
deprecated.
expenseMonthToD The expense of the resource from the beginning of the month to the current date. This value is
ate updated daily by vRealize Business for Cloud.
operations Specifies the sequence of available operations that can be performed on this resource.
The catalog service is designed to be used by consumers of the service catalog. For example,
a consumer might want to list all provisioned resources then submit a request to power off a
resource.
n Power Off
n Change Lease
Prerequisites
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
Procedure
For details regarding input and output of this sample, see Syntax for Getting Deployment
Details.
2 Examine the response for the HATEOAS links that you need to obtain additional information
about specific deployed resources.
3 Use the GET: Child Resources HATEOAS link to retrieve a list of child nodes of a
deployment.
For details regarding input and output of this sample, see Syntax for Navigating to the
Children of a Deployed Resource.
What to do next
Use the HATEOS links obtained from retrieving the list of child nodes to perform actions.
Note The vRealize Automation REST API does not support custom resource actions template
API calls. However, you can perform custom resource actions programmatically by using the
vRealize CloudClient.
For additional posts and articles that illustrate methods for performing actions by using the
vRealize Automation REST API or vRealize CloudClient tool, see the Executing Day 2 Actions with
the vRA 7 REST API blog post.
When a Day 2 Operation is requested on a machine, the set of actions or operations allowed on
the machine changes once the machine reaches its destination lifecycle state as a result of the
Day 2 Operation. For example, for a Power Off operation request, the machine state will start at
On. The state of the machine will move to Turning Off and then finally to Off. At that time, and
not before, the Day 2 Operations for the machine will be those which are allowed on a machine
that is in state Off.
In addition to the machine state, you must consider the account used to run the Day 2 actions.
User accounts must be entitled to run the individual actions. Verify that the account you use to
run the actions is entitled to run the requested Day 2 operation.
Note that polling vRealize Automation to obtain the status of the initial Day 2 operation using the
requestId of the operation, can return success even when the machine has not yet reached the
destination state for that Day 2 operation. Attempts to perform a Day 2 operation that is only
available when the machine is in the destination state will fail in those circumstances. To avoid
this scenario, you should:
n Call the catalog service API that returns the set of Day 2 operations available on a machine.
https://$vRA/catalog-service/api/consumer/resources/{{resource-guid}}/actions
n This call should be made in a loop and for a maximum of 10 invocations, starting with a
wait of 2 seconds between successive invocations of this API, with exponential backoff
between each subsequent invocation.
n The execution loop should continue until such time as either the set of allowed operations
on the machine contains the desired Day 2 operation, or the maximum number of
invocations is reached.
n Once the API returns the desired operation as an allowed operation on the machine, the
operation should be invoked.
For more information regarding the vRealize Automation catalog service API see https://
code.vmware.com/apis/417/vra-catalog.
Power Off
You use the catalog service to perform a power off action. For simple actions that require no
user input, the process is straightforward.
This command leverages the links for the power off action from the command used in the Syntax
for Navigating to the Children of a Deployed Resource example.
{
"@type": "link",
"rel": "GET Template: {[email protected]}",
"href": "https://$vRA/api/consumer/resources/dd3...a4a/actions/02ba...e38/requests/
template"
},
{
"@type": "link",
"rel": "POST: {com.vmware..iaas.proxy.provider@resource.action.name.machine.PowerOff}",
"href": "https://$vRA/api/consumer/resources/dd3...a4a/actions/02b...e38/requests"
}
Procedure
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: no-cache, no-store
Pragma: no-cache
Expires: Sat, 01 August 2015 23:04:50 GMT
Content-Type: application/json;charset=UTF-8
Date: Sat, 01 August 2015 13:04:50 GMT
{
"type": "com.vmware.vcac.catalog.domain.request.CatalogResourceRequest",
"resourceId": "dd37b7a1-829c-4773-b5be-b229453eca4a",
"actionId": "02bad06d-f92b-4cf8-b964-37bb5d57be38",
"description": null,
"data": {
"description": null,
"reasons": null
}
}
3 Edit the template as desired. The template is populated with default values. For example, you
may want to provide custom values for the description and reasons.
4 Use a POST command to send the template without modification to the corresponding URI.
Results
This POST command returns a response indicating success or failure. HTTP/1.1 201 CREATED
indicates that the request was submitted successfully.
Change Lease
You use the catalog service to change a lease. For actions that require user input, you may need
to edit the template prior to submitting the request.
This command leverages the links for the change lease action from the command used in the
Syntax for Navigating to the Children of a Deployed Resource example.
{
"@type": "link",
"rel": "GET Template: {[email protected]}",
"href": "https://$vRA/api/consumer/resources/dd3...a4a/actions/b5739e30-.../requests/
template"
},
{
"@type": "link",
"rel": "POST: {com.vmware...iaas.proxy.provider@resource.action.name.machine.ChangeLease}",
"href": "https://$vRA/api/consumer/resources/dd3...a4a/actions/b5739e30-.../requests"
},
Procedure
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: no-cache, no-store
Pragma: no-cache
Expires: Sat, 01 August 2015 23:04:50 GMT
Content-Type: application/json;charset=UTF-8
Date: Sat, 01 August 2015 13:04:50 GMT
{
"type": "com.vmware.vcac.catalog.domain.request.CatalogResourceRequest",
"resourceId": "dd37b7a1-829c-4773-b5be-b229453eca4a",
"actionId": "b5739e30-871d-48c7-9012-f2a7cf431dc1",
"description": null,
"data": {"provider-ExpirationDate": "2015-07-29T16:44:13.846Z"}
}
3 Edit the template as desired. The template is populated with default values. In this example,
the value of provider-ExpirationDate is set to the time at which the template was requested
in UTC. Edit this value (for example, to change the expiration to a month from now). You may
also want to provide a custom value for the description.
Results
This POST command returns a response indicating success or failure. HTTP/1.1 201 CREATED
indicates that the request was submitted successfully.
http://$vRA/catalog-service/api/consumer/requests/$requestId/resourceViews
In addition to the general information about the provisioned deployment returned in the
response, such as its name, description and ID, the response contains additional HATEOAS links.
Link Description
GET: Catalog Item URI to get the catalog item details from which this catalog item
was provisioned. See Syntax for Viewing Details of a Machine
Request .
GET: Request URI to get the request details that provisioned this item.
GET:Template URI to get a template request for a specific action that you can
{com.vmware.csp.component.cafe.composition@r perform on this resource. Typically, on a deployment, the action
esource.action.deployment.$actionName will be Delete.
GET: Child Resources If the deployment contains child resources, such as nodes
specified in the composite blueprint, this is the URI to get a list
of the resourceViews for the children of this deployment.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/catalog-service/api/consumer/resources/$resourceId
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
id UUID of a request.
$top Specifies the number of returned entries from the top of the response (total number
per page in relation to skip).
Output
The command output contains property names and values based on the command input
parameters.
Property Description
iconId Specifies an icon for this request based on the requested object type.
status The status of the resource. For example, On, Off, etc.
catalogItemId The identifier of the catalog item associated with this provisioned resource.
catalogItemLabel The label of the catalog item associated with this provisioned resource.
requestId The unique identifier of the request that created this provisioned resource.
businessGroupId The unique identifier of the business group that owns this resource.
tenantId The unique identifier of the tenant that owns this resource.
resourceType The type identifier of this resource. For example, Virtual Machine.
parentResourceId The unique identifier of the parent resource. Used for child resources of a multi-
machine resource.
hasChildren Returns trun if this resource has child resources. Used if this is a multi-machine
resource.
dateCreated The date and time at which the resource was created.
lastUpdated The date and time at which the resource was most recently modified.
costs An optional rate card of the prices and charges levied against the resource. This
parameter is deprecated.
costToDate An optional rate card of the existing prices and charges levied against the resource.
This parameter is deprecated
totalCost An optional rate card of the pricess and charges levied for the entire lease period.
This parameter is deprecated.
expenseMonthToDate The expense of the resource from the beginning of the month to the current date.
"description": null,
"status": null,
"catalogItemId": "7c8275d6-1bd6-452a-97c4-d6c053e4baa4",
"catalogItemLabel": "Linux",
"requestId": "7aaf9baf-aa4e-47c4-997b-edd7c7983a5b",
"resourceType":
"{com.vmware.csp.component.cafe.composition@resource.type.deployment.name}",
"owners": [
"Connie Summers"
],
"businessGroupId": "c0683388-6db2-4cb5-9033-b24d15ad3766",
"tenantId": "mycompany",
"dateCreated": "2015-07-29T13:51:36.368Z",
"lastUpdated": "2015-07-29T13:55:35.963Z",
"lease": null,
"costs": null,
"costToDate": null,
"totalCost": null,
"parentResourceId": null,
"hasChildren": true,
"data": {}
}
],
"metadata": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Link Description
GET: Parent Resource URI to get the resourceView for the parent item. See Syntax for
Getting Deployment Details.
GET:Template URI to get a template request for a specific action that you can
{com.vmware.csp.component.cafe.composition@r perform on this resource.
esource.action.deployment.$actionName
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/catalog-service/api/consumer/resources/$resourceId
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
$resourceID Specifies a resource ID. See Syntax for Getting Deployment Details to view all of your
requests and search for a request ID.
managedOnly If true, the returned requests are from the user's managed subtenants.
$top Specifies the number of returned entries from the top of the response (total number
per page in relation to skip).
Output
The command output contains property names and values based on the command input
parameters.
Property Description
iconId Specifies an icon for this request based on the requested object type.
status The status of the resource. For example, On, Off, etc.
catalogItemId The identifier of the catalog item associated with this provisioned resource.
catalogItemLabel The label of the catalog item associated with this provisioned resource.
requestId The unique identifier of the request that created this provisioned resource.
businessGroupId The unique identifier of the business group that owns this resource.
tenantId The unique identifier of the tenant that owns this resource.
resourceType The type identifier of this resource. For example, Virtual Machine.
parentResourceId The unique identifier of the parent resource. Used for child resources of a multi-
machine resource.
hasChildren Returns trun if this resource has child resources. Used if this is a multi-machine
resource.
dateCreated The date and time at which the resource was created.
lastUpdated The date and time at which the resource was most recently modified.
costs An optional rate card of the prices and charges levied against the resource. This
parameter is deprecated.
costToDate An optional rate card of the existing prices and charges levied against the resource.
This parameter is deprecated.
totalCost An optional rate card of the prices and charges levied for the entire lease period. This
parameter is deprecated.
expenseMonthToDate The expense of the resource from the beginning of the month until the current date.
This value is updated daily by vRealize Business for Cloud.
{
"links": [],
"content": [
{
"@type": "CatalogResourceView",
"links": [
{
"@type": "link",
"rel": "GET: Parent Resource",
"href": "https://$vRA/catalog-service/api/consumer/resourceViews/c4d3db3e-
e397-44ff-a1c9-0ecebdba12f4"
},
{
"@type": "link",
"rel": "GET Template:
{com.vmware.csp.component.iaas.proxy.provider@resource.action.name.machine.ChangeLease}",
"href": "https://$vRA/catalog-service/api/consumer/resources/
dd37b7a1-829c-4773-b5be-b229453eca4a/actions/b5739e30-871d-48c7-9012-f2a7cf431dc1/requests/
template"
},
{
"@type": "link",
"rel": "POST:
{com.vmware.csp.component.iaas.proxy.provider@resource.action.name.machine.ChangeLease}",
"href": "https://$vRA/catalog-service/api/consumer/resources/
dd37b7a1-829c-4773-b5be-b229453eca4a/actions/b5739e30-871d-48c7-9012-f2a7cf431dc1/requests"
},
{
"@type": "link",
"rel": "GET Template:
{com.vmware.csp.component.iaas.proxy.provider@resource.action.name.machine.PowerOff}",
"href": "https://$vRA/catalog-service/api/consumer/resources/
dd37b7a1-829c-4773-b5be-b229453eca4a/actions/02bad06d-f92b-4cf8-b964-37bb5d57be38/requests/
template"
},
{
"@type": "link",
"rel": "POST:
{com.vmware.csp.component.iaas.proxy.provider@resource.action.name.machine.PowerOff}",
"href": "https://$vRA/catalog-service/api/consumer/resources/
dd37b7a1-829c-4773-b5be-b229453eca4a/actions/02bad06d-f92b-4cf8-b964-37bb5d57be38/requests"
}
],
"resourceId": "dd37b7a1-829c-4773-b5be-b229453eca4a",
"iconId": "cafe_default_icon_genericCatalogItem",
"name": "DEMO-002",
"description": null,
"status": "On",
"catalogItemId": null,
"catalogItemLabel": null,
"requestId": null,
"resourceType":
"{com.vmware.csp.component.iaas.proxy.provider@resource.type.registration.name.Infrastructure.
Virtual}",
"owners": [
"Connie Summers"
],
"businessGroupId": "c0683388-6db2-4cb5-9033-b24d15ad3766",
"tenantId": "mycompany",
"dateCreated": "2015-07-29T13:54:58.804Z",
"lastUpdated": "2015-07-29T13:55:01.371Z",
"lease": {
"start": "2015-07-29T13:51:33.000Z"
},
"costs": {
"leaseRate": {
"type": "moneyTimeRate",
"cost": {
"type": "money",
"currencyCode": "USD",
"amount": 0
},
"basis": {
"type": "timeSpan",
"unit": "DAYS",
"amount": 1
}
}
},
"costToDate": {
"type": "money",
"currencyCode": "USD",
"amount": 0
},
"totalCost": null,
"parentResourceId": "c4d3db3e-e397-44ff-a1c9-0ecebdba12f4",
"hasChildren": false,
"data": {
"ChangeLease": true,
"ConnectViaRdp": true,
"ConnectViaVmrc": true,
"DISK_VOLUMES": [
{
"componentTypeId": "com.vmware.csp.component.iaas.proxy.provider",
"componentId": null,
"classId": "dynamicops.api.model.DiskInputModel",
"typeFilter": null,
"data": {
"DISK_CAPACITY": 6,
"DISK_INPUT_ID": "DISK_INPUT_ID1"
}
},
{
"componentTypeId": "com.vmware.csp.component.iaas.proxy.provider",
"componentId": null,
"classId": "dynamicops.api.model.DiskInputModel",
"typeFilter": null,
"data": {
"DISK_CAPACITY": 6,
"DISK_INPUT_ID": "DISK_INPUT_ID2"
}
}
],
"Destroy": true,
"EXTERNAL_REFERENCE_ID": "vm-38153",
"Expire": true,
"IS_COMPONENT_MACHINE": false,
"MachineBlueprintName": "system_blueprint_vsphere",
"MachineCPU": 1,
"MachineDailyCost": 0,
"MachineDestructionDate": null,
"MachineExpirationDate": null,
"MachineGroupName": "Demo Group",
"MachineGuestOperatingSystem": null,
"MachineInterfaceDisplayName": "vSphere (vCenter)",
"MachineInterfaceType": "vSphere",
"MachineMemory": 4096,
"MachineName": "DEMO-002",
"MachineReservationName": "vCenter55",
"MachineStorage": 12,
"MachineType": "Virtual",
"NETWORK_LIST": [
{
"componentTypeId": "com.vmware.csp.component.iaas.proxy.provider",
"componentId": null,
"classId": "dynamicops.api.model.NetworkViewModel",
"typeFilter": null,
"data": {
"NETWORK_MAC_ADDRESS": "00:50:56:ba:6b:85",
"NETWORK_NAME": "VM Network SQA"
}
}
],
"PowerOff": true,
"Reboot": true,
"Reconfigure": true,
"Reprovision": true,
"Reset": true,
"SNAPSHOT_LIST": [],
"Shutdown": true,
"Suspend": true,
"ip_address": "10.118.194.213",
"machineId": "f3579990-a3c4-4e17-9593-1f8893636876"
}
},
{
"@type": "CatalogResourceView",
"links": [
{
"@type": "link",
"rel": "GET: Parent Resource",
"href": "https://$vRA/catalog-service/api/consumer/resourceViews/c4d3db3e-
e397-44ff-a1c9-0ecebdba12f4"
},
{
"@type": "link",
"rel": "GET Template:
{com.vmware.csp.component.network.service@resource.action.destroy.name,
[{{com.vmware.csp.component.iaas.proxy.provider@network.network.type.registration.name.Infrast
ructure.Network.Network.Existing}}]}",
"href": "https://$vRA/catalog-service/api/consumer/resources/f735b57a-
fe6f-4108-876f-1c1055ca2cec/actions/ec5c522d-7b5b-4d0b-b9f2-1aedf01a2f0c/requests/template"
},
{
"@type": "link",
"rel": "POST:
{com.vmware.csp.component.network.service@resource.action.destroy.name,
[{{com.vmware.csp.component.iaas.proxy.provider@network.network.type.registration.name.Infrast
ructure.Network.Network.Existing}}]}",
"href": "https://$vRA/catalog-service/api/consumer/resources/f735b57a-
fe6f-4108-876f-1c1055ca2cec/actions/ec5c522d-7b5b-4d0b-b9f2-1aedf01a2f0c/requests"
}
],
"resourceId": "f735b57a-fe6f-4108-876f-1c1055ca2cec",
"iconId": "cafe_default_icon_genericCatalogItem",
"name": "Existing Network",
"description": null,
"status": null,
"catalogItemId": null,
"catalogItemLabel": null,
"requestId": null,
"resourceType":
"{com.vmware.csp.component.iaas.proxy.provider@network.network.type.registration.name.Infrastr
ucture.Network.Network.Existing}",
"owners": [
"Connie Summers"
],
"businessGroupId": "c0683388-6db2-4cb5-9033-b24d15ad3766",
"tenantId": "mycompany",
"dateCreated": "2015-07-29T13:55:14.095Z",
"lastUpdated": "2015-07-29T13:55:17.315Z",
"lease": null,
"costs": null,
"costToDate": null,
"totalCost": null,
"parentResourceId": "c4d3db3e-e397-44ff-a1c9-0ecebdba12f4",
"hasChildren": false,
"data": {
"Description": " ",
"Name": "Existing Network"
}
}
],
"metadata": {
"size": 20,
"totalElements": 2,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
The vRealize Automation REST API reservation service supports the following reservation types:
n vCloud Air
n vCloud Director
n Amazon
n Hyper-V
n KVM
n Xen
n OpenStack
n Physical reservation
The reservation service is extensible, which allows you to add new reservation types.
A reservation must belong to a business group, also referred to as a subtenant. A business group
can have multiple reservations on the same resources or on different resources.
Note The Reservation API now returns compute resource endpoint names within parentheses.
You may need to update any client code which contains logic that uses compute resource names
to account for this change.
n Create a Reservation
n Update a Reservation
n Delete a Reservation
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
Create a Reservation
You use the reservation service REST API to create a vSphere, Amazon, or vCloud Air
reservation.
Some of the steps required to create a reservation include commands that vary by reservation
type. When performing the step, select the command for your vSphere, Amazon, or vCloud Air
reservation.
Procedure
Procedure
{
"links": [],
"content": [{
"@type": "ReservationType",
"createdDate": "2015-10-13T04:44:32.008Z",
"lastUpdated": "2015-10-13T04:44:32.009Z",
"version": 1,
"id": "Infrastructure.Reservation.Virtual.vSphere",
"name": "vSphere",
"description": "vSphere Reservation",
"category": "Virtual",
"serviceTypeId": "com.mycompany.csp.iaas.blueprint.service",
"tenantId": null,
"formReference": {
"type": "external",
"formId": "Infrastructure.Reservation.Virtual.vSphere.form.new"
},
"schemaClassId": "Infrastructure.Reservation.Virtual.vSphere",
"alertTypes": [{
"createdDate": "2015-10-13T04:44:32.008Z",
"lastUpdated": "2015-10-13T04:44:32.008Z",
"version": 0,
"id": "d248eeee-238c-4e87-9e95-f263b04d113f",
"name": "storage",
"description": null,
"referenceResourceId": "storage"
},//Omit 7 reservation types here
],
"metadata": {
"size": 20,
"totalElements": 8,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
{
"links": [],
"content": [{
{
"@type": "ReservationType",
"createdDate": "2015-10-13T04:44:32.074Z",
"lastUpdated": "2015-10-13T04:44:32.075Z",
"version": 1,
"id": "Infrastructure.Cloud.Amazon",
"name": "Amazon",
"description": "Amazon Reservation",
"category": "Cloud",
"serviceTypeId": "com.mycompany.csp.iaas.blueprint.service",
"tenantId": null,
"formReference": {
"type": "external",
"formId": "Infrastructure.Cloud.Amazon.form.new"
},
"schemaClassId": "Infrastructure.Cloud.Amazon",
"alertTypes": [{
"createdDate": "2015-10-13T04:44:32.075Z",
"lastUpdated": "2015-10-13T04:44:32.075Z",
"version": 0,
"id": "2ef8f47c-045c-4ee4-821d-7b1543ea5f11",
"name": "machine",
"description": null,
"referenceResourceId": "machine"
}]
},//Omit 7 reservation types here
],
"metadata": {
"size": 20,
"totalElements": 8,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
The following sample displays JSON output for a vCloud Air reservation.
{
"links": [],
"content": [{
{
"@type": "ReservationType",
"createdDate": "2015-11-06T10:21:06.010Z",
"lastUpdated": "2015-11-06T10:21:06.011Z",
"version": 1,
"id": "Infrastructure.Reservation.Cloud.vCloudAir",
"name": "vCloud",
"description": "vCloud Air Reservation",
"category": "Cloud",
"serviceTypeId": "com.mycompany.csp.iaas.blueprint.service",
"tenantId": null,
"formReference": {
"type": "external",
"formId": "Infrastructure.Reservation.Cloud.vCloudAir.form.new"
},
"schemaClassId": "Infrastructure.Reservation.Cloud.vCloudAir",
"alertTypes": [
{
"createdDate": "2015-11-06T10:21:06.010Z",
"lastUpdated": "2015-11-06T10:21:06.010Z",
"version": 0,
"id": "cd707ad2-d504-43e2-8002-11ee670dcf41",
"name": "storage",
"description": null,
"referenceResourceId": "storage"
},
{
"createdDate": "2015-11-06T10:21:06.010Z",
"lastUpdated": "2015-11-06T10:21:06.010Z",
"version": 0,
"id": "ef96fec4-a607-4944-a0af-fbe7df862ee2",
"name": "memory",
"description": null,
"referenceResourceId": "memory"
},
{
"createdDate": "2015-11-06T10:21:06.011Z",
"lastUpdated": "2015-11-06T10:21:06.011Z",
"version": 0,
"id": "043e0815-9f02-4876-b5ce-ddbedabb8ff6",
"name": "cpu",
"description": null,
"referenceResourceId": "cpu"
},
{
"createdDate": "2015-11-06T10:21:06.011Z",
"lastUpdated": "2015-11-06T10:21:06.011Z",
"version": 0,
"id": "77e90acd-93ab-4bbe-853a-b74923dae70a",
"name": "machine",
"description": null,
"referenceResourceId": "machine"
}
]
}, //Omit 7 reservation types here
],
"metadata": {
"size": 20,
"totalElements": 8,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Prerequisites
In addition to the Prerequisites for Working With Reservations, obtain the schema class ID of the
reservation type to create. See Display a List of Supported Reservation Types.
Procedure
u Display a schema definition for a specific vRealize Automation vSphere reservation type.
{
"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
}]
}
Prerequisites
In addition to the Prerequisites for Working With Reservations, obtain the schema class ID of the
reservation type to create. See Display a List of Supported Reservation Types.
Procedure
{
"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
}
]
Prerequisites
In addition to the Prerequisites for Working With Reservations, obtain the schema class ID of the
reservation type to create. See Display a List of Supported Reservation Types.
Procedure
{
"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
}
]
}
When you create a reservation, you must supply the business group ID, also referred to as the
subtenant ID, in the REST command line. Use this procedure to obtain the subTenantId value.
Procedure
u Get business group ID for a vRealize Automation reservation with the reservation service.
{
"links": [],
"content": [{
"@type": "Subtenant",
"id": "7d7dbb19-d2dc-44a3-9fc2-7435552c8a05",
"name": "Development",
"description": " Development ",
"subtenantRoles": null,
"extensionData": {
"entries": [{
"key": "iaas-manager-emails",
"value": {
"type": "string",
"value": "[email protected]"
}
}]
},
"tenant": "qe"
},
{
"@type": "Subtenant",
"id": "ade5b8d3-decf-405e-bd0b-297f976ef721",
"name": "Finance",
"description": "Finance",
"subtenantRoles": null,
"extensionData": {
"entries": [{
"key": "iaas-manager-emails",
"value": {
"type": "string",
"value": " [email protected] "
}
}]
},
"tenant": "qe"
},
{
"@type": "Subtenant",
"id": "ef58f604-528d-4441-a219-4725bead629b",
"name": "Test Sub Tenant",
"description": "VMPS",
"subtenantRoles": null,
"extensionData": {
"entries": []
},
"tenant": "qe"
},
{
"@type": "Subtenant",
"id": "92926c91-37de-4647-9aee-70b8d557ce8d",
"name": "Quality Engineering",
"description": "created by demo content",
"subtenantRoles": null,
"extensionData": {
"entries": [{
"key": "iaas-manager-emails",
"value": {
"type": "string",
"value": " [email protected] "
}
}]
},
"tenant": "qe"
}],
"metadata": {
"size": 20,
"totalElements": 4,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Prerequisites
When you create a reservation, you must provide compute resource information that
corresponds to the computeResource parameter.
For example, for a vSphere, Amazon EC2, or vCloud Air reservation type schema definition, the
following permissibleValues field in the compute resource output indicates if the compute
resource is available and if it has any dependencies.
Procedure
{
"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"
},
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "40b151ce-e409-4d2a-8dae-bb456139a660",
"label": "NSX61-RC-ComputeClusterB"
},
"label": "NSX61-RC-ComputeClusterB"
},
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "cc254a84-95b8-434a-874d-bdfef8e8ad2c",
"label": "NSX61-RC-ComputeClusterA"
},
"label": "NSX61-RC-ComputeClusterA"
}]
}
{
"values": [
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "fdfa4b95-9476-4c18-81c5-1c0e5cb1131f",
"label": "EC2 841 Endpoint-us-west-1"
},
"label": "EC2 841 Endpoint-us-west-1"
},
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "4e362590-b634-4269-9da4-548260148fa3",
"label": "EC2 841 Endpoint-us-west-2"
},
"label": "EC2 841 Endpoint-us-west-2"
},
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "9d1a3b5a-7162-4a5a-85b7-ec1b2824f554",
"label": "EC2 841 Endpoint-us-east-1"
},
"label": "EC2 841 Endpoint-us-east-1"
}
]
}
The following sample displays JSON output for a vCloud Air reservation.
{
"values": [
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "c527a0f5-b1ae-4b61-8145-ad9d5c434dc7",
"label": "Engineering Allocation VDC"
},
"label": "Engineering Allocation VDC"
}
]
}
Procedure
The following example command queries resource pool information for the compute resource
cc254a84-95b8-434a-874d-bdfef8e8ad2c.
{
"values": [{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ResourcePools",
"id": " 4e51fabc-19e8-4e79-b413-d52309b3bb62",
"label": " CoreDev"
},
"label": " CoreDev"
},
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ResourcePools",
"id": "1186b5cc-cdef-4afb-8653-0ad41a36c194",
"label": "Documentation"
},
"label": "Documentation"
},
//Omit other resource pool list
]
}
Procedure
u Use the reservation service to display resource schema information for an Amazon
reservation.
The following example command displays storage and network information for the compute
resource with an ID of 9d1a3b5a-7162-4a5a-85b7-ec1b2824f554.
{
"values": [
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "AmazonSecurityGroup",
"id": "9",
"label": "test1"
},
"label": "test1"
},
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "AmazonSecurityGroup",
"id": "10",
"label": "default"
},
"label": "default"
}
]
}
Procedure
{
"values": [
{
"underlyingValue": {
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Storage",
"typeFilter": null,
"values": {
"entries": [
{
"key": "computeResourceStorageTotalSizeGB",
"value": {
"type": "integer",
"value": 1000
}
},
{
"key": "storagePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Storage",
"id": "f4df029b-d475-4f85-ab42-05bddde3f667",
"label": "Low Performance Storage"
}
},
{
"key": "computeResourceStorageFreeSizeGB",
"value": {
"type": "integer",
"value": 954
}
}
]
}
},
"label": "Low Performance Storage"
},
{
"underlyingValue": {
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Storage",
"typeFilter": null,
"values": {
"entries": [
{
"key": "computeResourceStorageTotalSizeGB",
"value": {
"type": "integer",
"value": 1000
}
},
{
"key": "storagePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Storage",
"id": "e655aa78-e5fb-4722-9e8a-0cd4139248cf",
"label": "High Performance Storage"
}
},
{
"key": "computeResourceStorageFreeSizeGB",
"value": {
"type": "integer",
"value": 691
}
}
]
}
},
Prerequisites
In addition to the Prerequisites for Working With Reservations, perform the following tasks
before creating a reservation.
n Display a list of the reservation types that are supported in the vRealize Automation server.
See Display a List of Supported Reservation Types.
n Obtain the permissible value field information required to create a new reservation. After you
retrieve all permissible value field information, you have the input information required to
create a reservation. See Get Resources Schema for a vSphere Reservation.
Procedure
{
"alertPercentLevel": 20,
"referenceResourceId": "memory",
"id": "memory"
},
{
"alertPercentLevel": 30,
"referenceResourceId": "cpu",
"id": "cpu"
},
{
"alertPercentLevel": 40,
"referenceResourceId": "machine",
"id": "machine"
}]
},
"extensionData": {
"entries": [{
"key": "reservationNetworks",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationNetwork",
"typeFilter": null,
"values": {
"entries": [{
"key": "reservationNetworkPath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Network",
"id": "44cb65d5-b321-43dd-a2ab-8ecf387bff8f",
"label": "VM Network SQA"
}
}]
}
}]
}
},
{
"key": "custom-Properties-key0",
"value": {
"type": "string",
"value": "custom-property-value0"
}
},
{
"key": "custom-Properties-key2",
"value": {
"type": "string",
"value": "custom-property-value2"
}
},
{
"key": "reservationMemory",
"value": {
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationMemory",
"typeFilter": null,
"values": {
"entries": [{
"key": "hostMemoryTotalSizeMB",
"value": {
"type": "integer",
"value": 57187
}
},
{
"key": "memoryReservedSizeMb",
"value": {
"type": "integer",
"value": 15872
}
}]
}
}
},
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "cc254a84-95b8-434a-874d-bdfef8e8ad2c",
"label": "NSX61-RC-ComputeClusterA"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 2
}
},
{
"key": "reservationStorages",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationStorage",
"typeFilter": null,
"values": {
"entries": [{
"key": "storageTotalSizeGB",
"value": {
"type": "integer",
"value": 394
}
},
{
"key": "storageReservedSizeGB",
"value": {
"type": "integer",
"value": 32
}
},
{
"key": "storageEnabled",
"value": {
"type": "boolean",
"value": true
}
},
{
"key": "reservationStoragePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "StoragePath",
"id": "f48a527b-30a6-4d54-8829-f549bc195b69",
"label": "VNXe:qe-vnxe-nfs-1"
}
},
{
"key": "storageFreeSizeGB",
"value": {
"type": "integer",
"value": 120
}
},
{
"key": "storagePriority",
"value": {
"type": "integer",
"value": 1
}
}]
}
}]
}
},
{
"key": "resourcePool",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ResourcePools",
"id": "4e51fabc-19e8-4e79-b413-d52309b3bb62",
"label": "CoreDev"
}
}]
}
}
”
Prerequisites
In addition to the Prerequisites for Working With Reservations, perform the following tasks
before creating a reservation.
n Display a list of the reservation types that are supported in the vRealize Automation server.
See Display a List of Supported Reservation Types.
n Obtain the permissible value field information required to create a new reservation. See Get
Resources Schema for an Amazon Reservation.
Procedure
],
"alerts": [
{
"alertPercentLevel": 80,
"referenceResourceId": "machine",
"id": "machine"
}
]
},
"extensionData": {
"entries": [
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "9d1a3b5a-7162-4a5a-85b7-ec1b2824f554",
"label": "EC2 841 Endpoint-us-east-1"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 0
}
},
{
"key": "securityGroups",
"value": {
"type": "multiple",
"elementTypeId": "ENTITY_REFERENCE",
"items": [
{
"type": "entityRef",
"componentId": null,
"classId": "AmazonSecurityGroup",
"id": "10",
"label": "default"
}
]
}
},
{
"key": "loadBalancers",
"value": {
"type": "multiple",
"elementTypeId": "ENTITY_REFERENCE",
"items": [
{
"type": "entityRef",
"componentId": null,
"classId": "ElasticLoadBalancer",
"id": "3",
"label": "test1"
}
]
}
},
{
"key": "locations",
"value": {
"type": "multiple",
"elementTypeId": "ENTITY_REFERENCE",
"items": [
{
"type": "entityRef",
"componentId": null,
"classId": "AvailabilityZone",
"id": "10",
"label": "us-east-1a"
}
]
}
},
{
"key": "keyPairs",
"value": {
"type": "string",
"value": "Per Provisioning Group"
}
}
]
}
}”
Location: https://$vRA/reservation-service/api/reservations/3289b039-2a11-4ab4-a0bc-
b583e4c6d085
Prerequisites
In addition to the Prerequisites for Working With Reservations, perform the following tasks
before creating a reservation.
n Display a list of the reservation types that are supported in the vRealize Automation server.
See Display a List of Supported Reservation Types.
n Obtain the permissible value field information required to create a new reservation. See Get
Resources Schema for a vCloud Air Reservation.
Procedure
],
"alerts": [
{
"alertPercentLevel": 80,
"referenceResourceId": "storage",
"id": "storage"
},
{
"alertPercentLevel": 80,
"referenceResourceId": "memory",
"id": "memory"
},
{
"alertPercentLevel": 80,
"referenceResourceId": "cpu",
"id": "cpu"
},
{
"alertPercentLevel": 80,
"referenceResourceId": "machine",
"id": "machine"
}
]
},
"extensionData": {
"entries": [
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "c527a0f5-b1ae-4b61-8145-ad9d5c434dc7",
"label": "Engineering Allocation VDC"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 0
}
},
{
"key": "allocationModel",
"value": {
"type": "integer",
"value": 0
}
},
{
"key": "reservationNetworks",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [
{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Network",
"typeFilter": null,
"values": {
"entries": [
{
"key": "networkPath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Network",
"id": "42c5063c-5422-448f-aac7-22ebe941ac8e",
"label": "VM Network SQA"
}
}
]
}
}
]
}
},
{
"key": "reservationStorages",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [
{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Storage",
"typeFilter": null,
"values": {
"entries": [
{
"key": "computeResourceStorageTotalSizeGB",
"value": {
"type": "integer",
"value": 1000
}
},
{
"key": "storagePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Storage",
"id": "e655aa78-e5fb-4722-9e8a-0cd4139248cf",
"label": "High Performance Storage"
}
},
{
"key": "storagePriority",
"value": {
"type": "integer",
"value": 1
}
},
{
"key": "storageReservedSizeGB",
"value": {
"type": "integer",
"value": 100
}
},
{
"key": "storageEnabled",
"value": {
"type": "boolean",
"value": true
}
},
{
"key": "computeResourceStorageFreeSizeGB",
"value": {
"type": "integer",
"value": 691
}
}
]
}
}
]
}
},
{
"key": "reservationMemory",
"value": {
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Memory",
"typeFilter": null,
"values": {
"entries": [
{
"key": "computeResourceMemoryTotalSizeMB",
"value": {
"type": "integer",
"value": 13312
}
},
{
"key": "memoryReservedSizeMb",
"value": {
"type": "integer",
"value": 4096
}
}
]
}
}
}
]
}
}
“
Location:
https://$vRA/reservation-service/api/reservations/3289b039-2a11-4ab4-a0bc-b583e4c6d085
Prerequisites
In addition to the Prerequisites for Working With Reservations, perform the following tasks
before creating a reservation.
n Finish creating a new reservation. Obtain the reservation ID from the output URL. See Syntax
for Creating a vSphere Reservation .
n Get the reservation ID if you do not already know it. See Display a List of Reservations.
Procedure
u Use the reservation service to verify that a reservation exists by using the verification ID.
{
"id": "94d74105-831a-4598-8f42-efd590fea15c ",
"name": "TestReservation",
"reservationTypeId": "Infrastructure.Reservation.Virtual.vSphere",
"tenantId": "qe",
"subTenantId": "ef58f604-528d-4441-a219-4725bead629b",
"enabled": true,
"priority": 3,
"reservationPolicyId": "b71c3a5f-087a-4d9e-9a56-fab785a3d128",
"alertPolicy": {
"enabled": true,
"frequencyReminder": 20,
"emailBgMgr": false,
"recipients": ["[email protected]",
"[email protected]"],
"alerts": [{
"alertPercentLevel": 10,
"referenceResourceId": "storage",
"id": "storage"
},
{
"alertPercentLevel": 20,
"referenceResourceId": "memory",
"id": "memory"
},
{
"alertPercentLevel": 30,
"referenceResourceId": "cpu",
"id": "cpu"
},
{
"alertPercentLevel": 40,
"referenceResourceId": "machine",
"id": "machine"
}]
},
"extensionData": {
"entries": [{
"key": "key4",
"value": {
"type": "string",
"value": "custom-property-value4"
}
},
{
"key": "key3",
"value": {
"type": "string",
"value": "custom-property-value3"
}
},
{
"key": "reservationNetworks",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationNetwork",
"typeFilter": null,
"values": {
"entries": [{
"key": "reservationNetworkProfile",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "NetworkProfile",
"id": "ed5d1503-08ac-42ca-804d-9167834a63a5",
"label": "ETEDoNotDelete2014-10-13 13:10:56"
}
},
{
"key": "reservationNetworkPath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Network",
"id": "44cb65d5-b321-43dd-a2ab-8ecf387bff8f",
"label": "VM Network SQA"
}
}]
}
}]
}
},
{
"key": "key0",
"value": {
"type": "string",
"value": "custom-property-value0"
}
},
{
"key": "key2",
"value": {
"type": "string",
"value": "custom-property-value2"
}
},
{
"key": "reservationMemory",
"value": {
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationMemory",
"typeFilter": null,
"values": {
"entries": [{
"key": "hostMemoryTotalSizeMB",
"value": {
"type": "integer",
"value": 57187
}
},
{
"key": "reservationMemoryReservedSizeMb",
"value": {
"type": "integer",
"value": 15888
}
}]
}
}
},
{
"key": "key1",
"value": {
"type": "string",
"value": "custom-property-value-Updated"
}
},
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "047e00f5-5424-4ed2-a751-4a334aeaff54",
"label": "VC51-Cluster"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 2
}
},
{
"key": "reservationStorages",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationStorage",
"typeFilter": null,
"values": {
"entries": [{
"key": "storageTotalSizeGB",
"value": {
"type": "integer",
"value": 394
}
},
{
"key": "reservationStorageReservedSizeGB",
"value": {
"type": "integer",
"value": 31
}
},
{
"key": "reservationStorageEnabled",
"value": {
"type": "boolean",
"value": true
}
},
{
"key": "reservationStoragePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "StoragePath",
"id": "f48a527b-30a6-4d54-8829-f549bc195b69",
"label": "VNXe:qe-vnxe-nfs-1"
}
},
{
"key": "storageFreeSizeGB",
"value": {
"type": "integer",
"value": 120
}
},
{
"key": "reservationStorageReservationPriority",
"value": {
"type": "integer",
"value": 1
}
}]
}
}]
}
},
{
"key": "resourcePool",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ResourcePools",
"id": "4e51fabc-19e8-4e79-b413-d52309b3bb62",
"label": "CoreDev"
}
}]
}
}
Example Output for a vCloud Reservation
{
"id": "bf922450-d495-460d-9dbf-1c09b0692db2",
"name": "TestvAppReservation",
"reservationTypeId": "Infrastructure.Reservation.Cloud.vCloud",
"tenantId": "qe",
"subTenantId": "a5d056be-3aa2-4fdd-ba1e-a3805f26f0e0",
"enabled": true,
"priority": 1,
"reservationPolicyId": null,
"alertPolicy": {
"enabled": false,
"frequencyReminder": 0,
"emailBgMgr": true,
"recipients": [
],
"alerts": [
{
"alertPercentLevel": 80,
"referenceResourceId": "storage",
"id": "storage"
},
{
"alertPercentLevel": 80,
"referenceResourceId": "memory",
"id": "memory"
},
{
"alertPercentLevel": 80,
"referenceResourceId": "cpu",
"id": "cpu"
},
{
"alertPercentLevel": 80,
"referenceResourceId": "machine",
"id": "machine"
}
]
},
"extensionData": {
"entries": [
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "c527a0f5-b1ae-4b61-8145-ad9d5c434dc7",
"label": "Engineering Allocation VDC"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 0
}
},
{
"key": "allocationModel",
"value": {
"type": "integer",
"value": 0
}
},
{
"key": "reservationNetworks",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [
{
"type": "complex",
"componentTypeId": "com.vmware.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Network",
"typeFilter": null,
"values": {
"entries": [
{
"key": "networkPath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Network",
"id": "42c5063c-5422-448f-aac7-22ebe941ac8e",
"label": "VM Network SQA"
}
}
]
}
}
]
}
},
{
"key": "reservationStorages",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [
{
"type": "complex",
"componentTypeId": "com.vmware.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Storage",
"typeFilter": null,
"values": {
"entries": [
{
"key": "computeResourceStorageTotalSizeGB",
"value": {
"type": "integer",
"value": 1000
}
},
{
"key": "storagePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Storage",
"id": "e655aa78-e5fb-4722-9e8a-0cd4139248cf",
"label": "High Performance Storage"
}
},
{
"key": "storageReservationPriority",
"value": {
"type": "integer",
"value": 1
}
},
{
"key": "storageReservedSizeGB",
"value": {
"type": "integer",
"value": 100
}
},
{
"key": "storageEnabled",
"value": {
"type": "boolean",
"value": true
}
},
{
"key": "computeResourceStorageFreeSizeGB",
"value": {
"type": "integer",
"value": 691
}
}
]
}
}
]
}
},
{
"key": "reservationMemory",
"value": {
"type": "complex",
"componentTypeId": "com.vmware.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Memory",
"typeFilter": null,
"values": {
"entries": [
{
"key": "computeResourceMemoryTotalSizeMB",
"value": {
"type": "integer",
"value": 13312
}
},
{
"key": "memoryReservedSizeMb",
"value": {
"type": "integer",
"value": 4096
}
}
]
}
}
}
]
}
}
Procedure
{
"links": [],
"content": [{
"id": "94d74105-831a-4598-8f42-efd590fea15c ",
"name": "TestReservation",
"reservationTypeId": "Infrastructure.Reservation.Virtual.vSphere",
"tenantId": "qe",
"subTenantId": "ef58f604-528d-4441-a219-4725bead629b",
"enabled": true,
"priority": 3,
"reservationPolicyId": "b71c3a5f-087a-4d9e-9a56-fab785a3d128",
"alertPolicy": {
"enabled": true,
"frequencyReminder": 20,
"emailBgMgr": false,
"recipients": ["[email protected]",
"[email protected]"],
"alerts": [{
"alertPercentLevel": 10,
"referenceResourceId": "storage",
"id": "storage"
},
{
"alertPercentLevel": 20,
"referenceResourceId": "memory",
"id": "memory"
},
{
"alertPercentLevel": 30,
"referenceResourceId": "cpu",
"id": "cpu"
},
{
"alertPercentLevel": 40,
"referenceResourceId": "machine",
"id": "machine"
}]
},
"extensionData": {
"entries": [{
"key": "key4",
"value": {
"type": "string",
"value": "custom-property-value4"
}
},
{
"key": "key3",
"value": {
"type": "string",
"value": "custom-property-value3"
}
},
{
"key": "reservationNetworks",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationNetwork",
"typeFilter": null,
"values": {
"entries": [{
"key": "reservationNetworkProfile",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "NetworkProfile",
"id": "ed5d1503-08ac-42ca-804d-9167834a63a5",
"label": "ETEDoNotDelete2014-10-13 13:10:56"
}
},
{
"key": "reservationNetworkPath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Network",
"id": "44cb65d5-b321-43dd-a2ab-8ecf387bff8f",
"label": "VM Network SQA"
}
}]
}
}]
}
},
{
"key": "key0",
"value": {
"type": "string",
"value": "custom-property-value0"
}
},
{
"key": "key2",
"value": {
"type": "string",
"value": "custom-property-value2"
}
},
{
"key": "reservationMemory",
"value": {
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationMemory",
"typeFilter": null,
"values": {
"entries": [{
"key": "hostMemoryTotalSizeMB",
"value": {
"type": "integer",
"value": 57187
}
},
{
"key": "reservationMemoryReservedSizeMb",
"value": {
"type": "integer",
"value": 15888
}
}]
}
}
},
{
"key": "key1",
"value": {
"type": "string",
"value": "custom-property-value-Updated"
}
},
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "047e00f5-5424-4ed2-a751-4a334aeaff54",
"label": "VC51-Cluster"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 2
}
},
{
"key": "reservationStorages",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationStorage",
"typeFilter": null,
"values": {
"entries": [{
"key": "storageTotalSizeGB",
"value": {
"type": "integer",
"value": 394
}
},
{
"key": "reservationStorageReservedSizeGB",
"value": {
"type": "integer",
"value": 31
}
},
{
"key": "reservationStorageEnabled",
"value": {
"type": "boolean",
"value": true
}
},
{
"key": "reservationStoragePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "StoragePath",
"id": "f48a527b-30a6-4d54-8829-f549bc195b69",
"label": "VNXe:qe-vnxe-nfs-1"
}
},
{
"key": "storageFreeSizeGB",
"value": {
"type": "integer",
"value": 120
}
},
{
"key": "reservationStorageReservationPriority",
"value": {
"type": "integer",
"value": 1
}
}]
}
}]
}
},
{
"key": "resourcePool",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ResourcePools",
"id": "4e51fabc-19e8-4e79-b413-d52309b3bb62",
"label": "CoreDev"
}
}],
"metadata": {
"size": 0,
"totalElements": 1,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Update a Reservation
You can use the reservation service to update an existing vRealize Automation reservation.
Prerequisites
In addition to the Prerequisites for Working With Reservations, perform the following tasks
before updating a reservation.
n Obtain the reservation ID of the reservation that you want to update. This information is
required API command input. See Syntax for Displaying a List of Reservations .
n Obtain the reservation field information for the reservation that you want to update. For
example, if you want to change from one compute resource to another, you must obtain
the new compute resource ID and its associated JSON section output. This information is
required API command input. See Syntax for Getting a Compute Resource for a Reservation .
Procedure
https://$vRA/reservation-service/api/reservations/94d74105-831a-4598-8f42-efd590fea15c –d
“
{
"id": "94d74105-831a-4598-8f42-efd590fea15c",
"name": "TestReservation",
"reservationTypeId": "Infrastructure.Reservation.Virtual.vSphere",
"tenantId": "qe",
"subTenantId": "ef58f604-528d-4441-a219-4725bead629b",
"enabled": true,
"priority": 3,
"reservationPolicyId": "b71c3a5f-087a-4d9e-9a56-fab785a3d128",
"alertPolicy": {
"enabled": true,
"frequencyReminder": 20,
"emailBgMgr": false,
"recipients": ["[email protected]",
"[email protected]"],
"alerts": [{
"alertPercentLevel": 10,
"referenceResourceId": "storage",
"id": "storage"
},
{
"alertPercentLevel": 20,
"referenceResourceId": "memory",
"id": "memory"
},
{
"alertPercentLevel": 30,
"referenceResourceId": "cpu",
"id": "cpu"
},
{
"alertPercentLevel": 40,
"referenceResourceId": "machine",
"id": "machine"
}]
},
"extensionData": {
"entries": [{
"key": "key4",
"value": {
"type": "string",
"value": "custom-property-value4"
}
},
{
"key": "key3",
"value": {
"type": "string",
"value": "custom-property-value3"
}
},
{
"key": "reservationNetworks",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationNetwork",
"typeFilter": null,
"values": {
"entries": [{
"key": "reservationNetworkProfile",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "NetworkProfile",
"id": "ed5d1503-08ac-42ca-804d-9167834a63a5",
"label": "TestNetworkProfile"
}
},
{
"key": "reservationNetworkPath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Network",
"id": "44cb65d5-b321-43dd-a2ab-8ecf387bff8f",
"label": "VM Network SQA"
}
}]
}
}]
}
},
{
"key": "key0",
"value": {
"type": "string",
"value": "custom-property-value0"
}
},
{
"key": "key2",
"value": {
"type": "string",
"value": "custom-property-value2"
}
},
{
"key": "reservationMemory",
"value": {
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationMemory",
"typeFilter": null,
"values": {
"entries": [{
"key": "hostMemoryTotalSizeMB",
"value": {
"type": "integer",
"value": 57187
}
},
{
"key": "reservationMemoryReservedSizeMb",
"value": {
"type": "integer",
"value": 15888
}
}]
}
}
},
{
"key": "key1",
"value": {
"type": "string",
"value": "custom-property-value-Updated"
}
},
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "047e00f5-5424-4ed2-a751-4a334aeaff54",
"label": "VC51-Cluster"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 2
}
},
{
"key": "reservationStorages",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationStorage",
"typeFilter": null,
"values": {
"entries": [{
"key": "storageTotalSizeGB",
"value": {
"type": "integer",
"value": 394
}
},
{
"key": "reservationStorageReservedSizeGB",
"value": {
"type": "integer",
"value": 31
}
},
{
"key": "reservationStorageEnabled",
"value": {
"type": "boolean",
"value": true
}
},
{
"key": "reservationStoragePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "StoragePath",
"id": "f48a527b-30a6-4d54-8829-f549bc195b69",
"label": "VNXe:qe-vnxe-nfs-1"
}
},
{
"key": "storageFreeSizeGB",
"value": {
"type": "integer",
"value": 120
}
},
{
"key": "reservationStorageReservationPriority",
"value": {
"type": "integer",
"value": 1
}
}]
}
}]
}
},
{
"key": "resourcePool",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ResourcePools",
"id": "4e51fabc-19e8-4e79-b413-d52309b3bb62",
"label": "CoreDev"
}
}]
}
}
”
If the command is successful, the HTTP response body is empty except for a 204 No Content
status statement.
Delete a Reservation
You can use the vRealize Automation REST API reservation service to delete an existing
reservation.
Prerequisites
In addition to the Prerequisites for Working With Reservations, obtain the reservation ID of the
reservation that you want to delete. This information is required API command input. See Syntax
for Displaying a List of Reservations before deleting a reservation.
Procedure
If the command is successful, the HTTP response body is empty except for a 204 No Content
status statement.
Most examples use the reservation service API. You use the identity service API to get the
business group ID for a reservation.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/reservations
Method Get
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
Links Species an array of link objects, each of which contains the following parts:
Content Specifies an array of data rows, each of which represents one of the tenant objects returned
in a pageable list.
You can use the id value for each reservation to update or delete them. For related information,
see Syntax for Updating a Reservation or Syntax for Deleting a Reservation .
{
"links": [],
"content": [{
"id": "94d74105-831a-4598-8f42-efd590fea15c ",
"name": "TestReservation",
"reservationTypeId": "Infrastructure.Reservation.Virtual.vSphere",
"tenantId": "qe",
"subTenantId": "ef58f604-528d-4441-a219-4725bead629b",
"enabled": true,
"priority": 3,
"reservationPolicyId": "b71c3a5f-087a-4d9e-9a56-fab785a3d128",
"alertPolicy": {
"enabled": true,
"frequencyReminder": 20,
"emailBgMgr": false,
"recipients": ["[email protected]",
"[email protected]"],
"alerts": [{
"alertPercentLevel": 10,
"referenceResourceId": "storage",
"id": "storage"
},
{
"alertPercentLevel": 20,
"referenceResourceId": "memory",
"id": "memory"
},
{
"alertPercentLevel": 30,
"referenceResourceId": "cpu",
"id": "cpu"
},
{
"alertPercentLevel": 40,
"referenceResourceId": "machine",
"id": "machine"
}]
},
"extensionData": {
"entries": [{
"key": "key4",
"value": {
"type": "string",
"value": "custom-property-value4"
}
},
{
"key": "key3",
"value": {
"type": "string",
"value": "custom-property-value3"
}
},
{
"key": "reservationNetworks",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationNetwork",
"typeFilter": null,
"values": {
"entries": [{
"key": "reservationNetworkProfile",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "NetworkProfile",
"id": "ed5d1503-08ac-42ca-804d-9167834a63a5",
"label": "ETEDoNotDelete2014-10-13 13:10:56"
}
},
{
"key": "reservationNetworkPath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Network",
"id": "44cb65d5-b321-43dd-a2ab-8ecf387bff8f",
"label": "VM Network SQA"
}
}]
}
}]
}
},
{
"key": "key0",
"value": {
"type": "string",
"value": "custom-property-value0"
}
},
{
"key": "key2",
"value": {
"type": "string",
"value": "custom-property-value2"
}
},
{
"key": "reservationMemory",
"value": {
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationMemory",
"typeFilter": null,
"values": {
"entries": [{
"key": "hostMemoryTotalSizeMB",
"value": {
"type": "integer",
"value": 57187
}
},
{
"key": "reservationMemoryReservedSizeMb",
"value": {
"type": "integer",
"value": 15888
}
}]
}
}
},
{
"key": "key1",
"value": {
"type": "string",
"value": "custom-property-value-Updated"
}
},
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "047e00f5-5424-4ed2-a751-4a334aeaff54",
"label": "VC51-Cluster"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 2
}
},
{
"key": "reservationStorages",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationStorage",
"typeFilter": null,
"values": {
"entries": [{
"key": "storageTotalSizeGB",
"value": {
"type": "integer",
"value": 394
}
},
{
"key": "reservationStorageReservedSizeGB",
"value": {
"type": "integer",
"value": 31
}
},
{
"key": "reservationStorageEnabled",
"value": {
"type": "boolean",
"value": true
}
},
{
"key": "reservationStoragePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "StoragePath",
"id": "f48a527b-30a6-4d54-8829-f549bc195b69",
"label": "VNXe:qe-vnxe-nfs-1"
}
},
{
"key": "storageFreeSizeGB",
"value": {
"type": "integer",
"value": 120
}
},
{
"key": "reservationStorageReservationPriority",
"value": {
"type": "integer",
"value": 1
}
}]
}
}]
}
},
{
"key": "resourcePool",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ResourcePools",
"id": "4e51fabc-19e8-4e79-b413-d52309b3bb62",
"label": "CoreDev"
}
}],
"metadata": {
"size": 0,
"totalElements": 1,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
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.
alertPolicy Specifies the alert policy of the reservation. The detail schema of this field refers to JSON
the alert policy.
extensionData Contains type-specific fields. The detail schema of this field is retrieved by the data JSON
and schema service.
The following table describes the vSphere reservation types field IDs that appear in the output
schema definitions.
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.
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
This property is valid for complex and ref field types only.
n 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.
permissibleVal Optional field. If this field is a permissible value list field, define the meta info for the permissible value
ues by using the following options:
n type: Specifies if the permissible value list is dynamic or static.
n customAllowed: Specifies if a custom value is allowed during user input in this field.
n 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:
n 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.
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.
https://$vRA/reservation-service/api/data-service/schema/
Infrastructure.Reservation.Virtual.vSphere/default
{
"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
}]
}
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.
alertPolicy Specifies the alert policy of the reservation. The detail schema of this field refers to JSON
the alert policy.
extensionData Contains type-specific fields. The detail schema of this field is retrieved by the data JSON
and schema service.
The following table describes the Amazon EC2 reservation types field IDs that appear in the
output schema definitions.
machineQuota Integer NA No NA
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.
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
This property is valid for complex and ref field types only.
n 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.
permissibleVal Optional field. If this field is a permissible value list field, define the meta info for the permissible value
ues by using the following options:
n type: Specifies if the permissible value list is dynamic or static.
n customAllowed: Specifies if a custom value is allowed during user input in this field.
n dependencies: Specifies the list of fields that the current field depends on.
Property Description
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:
n 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.
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.
The schema definition in this example includes 8 extension fields that are supported for the
Amazon EC2 type reservation.
{
"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,
],
"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
}
]
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.
alertPolicy Specifies the alert policy of the reservation. The detail schema of this field refers to JSON
the alert policy.
extensionData Contains type-specific fields. The detail schema of this field is retrieved by the data JSON
and schema service.
The following table describes the vCloud Air reservation types field IDs that appear in the output
schema definitions.
allocationModel Integer NA No NA
machineQuota Integer NA No NA
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.
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
This property is valid for complex and ref field types only.
n 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.
permissibleVal Optional field. If this field is a permissible value list field, define the meta info for the permissible value
ues by using the following options:
n type: Specifies if the permissible value list is dynamic or static.
n customAllowed: Specifies if a custom value is allowed during user input in this field.
n dependencies: Specifies the list of fields that the current field depends on.
Property Description
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:
n 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.
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.
{
"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",
],
"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
}
]
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/identity/api/tenants/$tenantId/subtenants
Method Get
$vRA Specifies the appliance name and fully qualified domain name, or IP address
of the vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
Links Species an array of link objects, each of which contains the following parts:
Content Specifies an array of data rows, each of which represents one of the tenant objects returned
in a pageable list. Each tenant object contains the following information:
insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$vRA/identity/api/tenants/qe/subtenants
{
"links": [],
"content": [{
"@type": "Subtenant",
"id": "7d7dbb19-d2dc-44a3-9fc2-7435552c8a05",
"name": "Development",
"description": " Development ",
"subtenantRoles": null,
"extensionData": {
"entries": [{
"key": "iaas-manager-emails",
"value": {
"type": "string",
"value": "[email protected]"
}
}]
},
"tenant": "qe"
},
{
"@type": "Subtenant",
"id": "ade5b8d3-decf-405e-bd0b-297f976ef721",
"name": "Finance",
"description": "Finance",
"subtenantRoles": null,
"extensionData": {
"entries": [{
"key": "iaas-manager-emails",
"value": {
"type": "string",
"value": " [email protected] "
}
}]
},
"tenant": "qe"
},
{
"@type": "Subtenant",
"id": "ef58f604-528d-4441-a219-4725bead629b",
"name": "Test Sub Tenant",
"description": "VMPS",
"subtenantRoles": null,
"extensionData": {
"entries": []
},
"tenant": "qe"
},
{
"@type": "Subtenant",
"id": "92926c91-37de-4647-9aee-70b8d557ce8d",
"name": "Quality Engineering",
"description": "created by demo content",
"subtenantRoles": null,
"extensionData": {
"entries": [{
"key": "iaas-manager-emails",
"value": {
"type": "string",
"value": " [email protected] "
}
}]
},
"tenant": "qe"
}],
"metadata": {
"size": 20,
"totalElements": 4,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/data-service/schema/
$schemaclassid/default/$fieldid/values
Method Post
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
Parameter Description
HTTP body Because the dependencies entry for this permissible value field is
an empty string, provide an empty JSON string "{}" in the HTTP
body.
Output
The command output contains property names and values based on the command input
parameters.
The values section contains an array of data rows, each of which represents one of the
compute resource objects, returned in a pageable list. Each compute resource object contains
the following information.
Property Description
label Contains the compute resource label. This value matches the underlyingValue.label.
{
"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"
},
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "40b151ce-e409-4d2a-8dae-bb456139a660",
"label": "NSX61-RC-ComputeClusterB"
},
"label": "NSX61-RC-ComputeClusterB"
},
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "cc254a84-95b8-434a-874d-bdfef8e8ad2c",
"label": "NSX61-RC-ComputeClusterA"
},
"label": "NSX61-RC-ComputeClusterA"
}]
}
{
"values": [
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "fdfa4b95-9476-4c18-81c5-1c0e5cb1131f",
"label": "EC2 841 Endpoint-us-west-1"
},
"label": "EC2 841 Endpoint-us-west-1"
},
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "4e362590-b634-4269-9da4-548260148fa3",
"label": "EC2 841 Endpoint-us-west-2"
},
"label": "EC2 841 Endpoint-us-west-2"
},
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "9d1a3b5a-7162-4a5a-85b7-ec1b2824f554",
"label": "EC2 841 Endpoint-us-east-1"
},
"label": "EC2 841 Endpoint-us-east-1"
}
]
}
{
"values": [
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "c527a0f5-b1ae-4b61-8145-ad9d5c434dc7",
"label": "Engineering Allocation VDC"
},
"label": "Engineering Allocation VDC"
}
]
}
Overview
This example illustrates how to get a permissible value list for the resourcePool field. You can
use the generated output as input for creating or updating a vSphere reservation.
Note The information in the table is subject to change. Call the data and schema service to
retrieve the latest field information.
For related information, see Syntax for Displaying a Schema Definition for a vSphere
Reservation .
Input
Use the supported input parameters to control the command output.
Input Description
URL https://$vRA/reservation-service/api/data-service/schema/$schemaclassid/default/
$fieldid/values
Method Post
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
values An array of data rows, each of which represents one of the resource pool objects
returned in a pageable list. Each resource pool object contains an underlyingValue
and label entry.
label Specifies the resource pool label. This value matches the underlyingValue value.
In the following example output, the CoreDev resource pool is shown. Copy the output
underlyingValue section into an XML editor and use it as input to create or update a
reservation. Note that other REST calls can be used such as reservationNetworks and
reservationStorages to get other resources for the reservation.
{
"values": [{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ResourcePools",
"id": " 4e51fabc-19e8-4e79-b413-d52309b3bb62",
Overview
This example illustrates how to get a permissible value list for the securityGroups field. You can
use the generated output as input for creating or updating an Amazon reservation.
machineQuota Integer NA No NA
Note The information in the table is subject to change. Call the data and schema service to
retrieve the latest field information.
For related information, see Syntax for Displaying a Schema Definition for an Amazon
Reservation .
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/data-service/schema/
$schemaclassid/default/$fieldid/values
Method Post
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
values An array of data rows, each of which represents one of the security group objects
returned in a pageable list. Each security group object contains an underlyingValue
and label entry.
label Specifies the security groups label. This value matches the underlyingValue value.
Copy the output from an underlyingValue section into an XML editor and use it as input to
create or update a reservation.
{
"values": [
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "AmazonSecurityGroup",
"id": "9",
"label": "test1"
},
"label": "test1"
},
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "AmazonSecurityGroup",
"id": "10",
"label": "default"
},
"label": "default"
}
]
Overview
This example illustrates how to get a permissible value list for the reservationStorages field.
Use the generated output as input for creating or updating a vCloud Air reservation.
allocationModel Integer NA No NA
machineQuota Integer NA No NA
Note The information in the table is subject to change. Call the data and schema service to
retrieve the latest field information.
For related information, see Syntax for Displaying a Schema Definition for a vCloud Air
Reservation .
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/data-service/schema/$schemaclassid/
default/$fieldid/values
Method Post
$vRA Specifies the appliance name and fully qualified domain name, or IP address
of the vRealize Automation server.
Parameter Description
text Empty
entries key -- Specifies the field ID of dependent field. For this example, enter
computeResource.
value -- Specifies the value of the dependent field. For this example, copy
and paste the vCloud HTTP response obtained by using the Get Compute
Resource task. See Syntax for Getting Resources Schema for a vCloud Air
Reservation .
Output
The command output contains property names and values based on the command input
parameters.
Property Description
values An array of data rows, each of which represents one of the reservation storage
objects returned in a pageable list. Each reservation storage object contains an
underlyingValue and label entry.
label Specifies the reservation storage label. This value matches the underlyingValue
value.
Copy the output from an underlyingValue section into an XML editor and use it as input to
create or update a reservation.
{
"values": [
{
"underlyingValue": {
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Storage",
"typeFilter": null,
"values": {
"entries": [
{
"key": "computeResourceStorageTotalSizeGB",
"value": {
"type": "integer",
"value": 1000
}
},
{
"key": "storagePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Storage",
"id": "f4df029b-d475-4f85-ab42-05bddde3f667",
"label": "Low Performance Storage"
}
},
{
"key": "computeResourceStorageFreeSizeGB",
"value": {
"type": "integer",
"value": 954
}
}
]
}
},
Input
Use the supported input parameters to control the command output.
Input Description
URL https://$vRA/reservation-service/api/reservations
Method Post
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
HTTP body The HTTP body describes the reservation to create and calls the
REST API used to create the reservation.
Compose the HTTP body using one of the following methods:
n Copy the HTTP body from the JSON output from this example
and edit the applicable field values to compose the HTTP body
input for the command line.
n Use the API commands in Syntax for Verifying a Reservation
and Getting Reservation Details , remove the appropriate ID
field from the HTTP response, and edit the field values to
compose the HTTP body input for the command line.
Output
The output URL contains the new reservation ID.
Property Description
"frequencyReminder": 20,
"emailBgMgr": false,
"recipients": ["[email protected]",
"[email protected]"],
"alerts": [{
"alertPercentLevel": 10,
"referenceResourceId": "storage",
"id": "storage"
},
{
"alertPercentLevel": 20,
"referenceResourceId": "memory",
"id": "memory"
},
{
"alertPercentLevel": 30,
"referenceResourceId": "cpu",
"id": "cpu"
},
{
"alertPercentLevel": 40,
"referenceResourceId": "machine",
"id": "machine"
}]
},
"extensionData": {
"entries": [{
"key": "reservationNetworks",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationNetwork",
"typeFilter": null,
"values": {
"entries": [{
"key": "reservationNetworkPath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Network",
"id": "44cb65d5-b321-43dd-a2ab-8ecf387bff8f",
"label": "VM Network SQA"
}
}]
}
}]
}
},
{
"key": "custom-Properties-key0",
"value": {
"type": "string",
"value": "custom-property-value0"
}
},
{
"key": "custom-Properties-key2",
"value": {
"type": "string",
"value": "custom-property-value2"
}
},
{
"key": "reservationMemory",
"value": {
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationMemory",
"typeFilter": null,
"values": {
"entries": [{
"key": "hostMemoryTotalSizeMB",
"value": {
"type": "integer",
"value": 57187
}
},
{
"key": "memoryReservedSizeMb",
"value": {
"type": "integer",
"value": 15872
}
}]
}
}
},
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "cc254a84-95b8-434a-874d-bdfef8e8ad2c",
"label": "NSX61-RC-ComputeClusterA"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 2
}
},
{
"key": "reservationStorages",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationStorage",
"typeFilter": null,
"values": {
"entries": [{
"key": "storageTotalSizeGB",
"value": {
"type": "integer",
"value": 394
}
},
{
"key": "storageReservedSizeGB",
"value": {
"type": "integer",
"value": 32
}
},
{
"key": "storageEnabled",
"value": {
"type": "boolean",
"value": true
}
},
{
"key": "reservationStoragePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "StoragePath",
"id": "f48a527b-30a6-4d54-8829-f549bc195b69",
"label": "VNXe:qe-vnxe-nfs-1"
}
},
{
"key": "storageFreeSizeGB",
"value": {
"type": "integer",
"value": 120
}
},
{
"key": "storagePriority",
"value": {
"type": "integer",
"value": 1
}
}]
}
}]
}
},
{
"key": "resourcePool",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ResourcePools",
"id": "4e51fabc-19e8-4e79-b413-d52309b3bb62",
"label": "CoreDev"
}
}]
}
}
”
Location:
https://$vRA/reservation-service/api/reservations/94d74105-831a-4598-8f42-efd590fea15c
Copy the output response into an XML editor for use in a future procedure, such as updating or
deleting the reservation.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/reservations
Method Post
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
Parameter Description
HTTP body The HTTP body describes the reservation to create and calls the
REST API used to create the reservation.
Compose the HTTP body using one of the following methods:
n Copy the HTTP body from the JSON output from this example
and edit the applicable field values to compose the HTTP body
input for the command line.
n Use the API commands in Syntax for Verifying a Reservation
and Getting Reservation Details , remove the appropriate ID
field from the HTTP response, and edit the field values to
compose the HTTP body input for the command line.
Output
The output URL contains the new reservation ID.
Property Description
],
"alerts": [
{
"alertPercentLevel": 80,
"referenceResourceId": "machine",
"id": "machine"
}
]
},
"extensionData": {
"entries": [
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "9d1a3b5a-7162-4a5a-85b7-ec1b2824f554",
"label": "EC2 841 Endpoint-us-east-1"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 0
}
},
{
"key": "securityGroups",
"value": {
"type": "multiple",
"elementTypeId": "ENTITY_REFERENCE",
"items": [
{
"type": "entityRef",
"componentId": null,
"classId": "AmazonSecurityGroup",
"id": "10",
"label": "default"
}
]
}
},
{
"key": "loadBalancers",
"value": {
"type": "multiple",
"elementTypeId": "ENTITY_REFERENCE",
"items": [
{
"type": "entityRef",
"componentId": null,
"classId": "ElasticLoadBalancer",
"id": "3",
"label": "test1"
}
]
}
},
{
"key": "locations",
"value": {
"type": "multiple",
"elementTypeId": "ENTITY_REFERENCE",
"items": [
{
"type": "entityRef",
"componentId": null,
"classId": "AvailabilityZone",
"id": "10",
"label": "us-east-1a"
}
]
}
},
{
"key": "keyPairs",
"value": {
"type": "string",
"value": "Per Provisioning Group"
}
}
]
}
}”
Location: https://$vRA/reservation-service/api/reservations/3289b039-2a11-4ab4-a0bc-
b583e4c6d085
Copy the output response into an XML editor for use in a future procedure, such as updating or
deleting the reservation.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/reservations
Method Post
Parameter Description
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
HTTP body The HTTP body describes the reservation to create and calls the
REST API used to create the reservation.
Compose the HTTP body using one of the following methods:
n Copy the HTTP body from the JSON output from this example
and edit the applicable field values to compose the HTTP body
input for the command line.
n Update the formatted reservation information to specify the
new information:
n remove the appropriate ID field from the HTTP response
n edit the field values to compose the HTTP body input for
the command line
Output
The output URL contains the new reservation ID.
Property Description
"emailBgMgr": true,
"recipients": [
],
"alerts": [
{
"alertPercentLevel": 80,
"referenceResourceId": "storage",
"id": "storage"
},
{
"alertPercentLevel": 80,
"referenceResourceId": "memory",
"id": "memory"
},
{
"alertPercentLevel": 80,
"referenceResourceId": "cpu",
"id": "cpu"
},
{
"alertPercentLevel": 80,
"referenceResourceId": "machine",
"id": "machine"
}
]
},
"extensionData": {
"entries": [
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "c527a0f5-b1ae-4b61-8145-ad9d5c434dc7",
"label": "Engineering Allocation VDC"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 0
}
},
{
"key": "allocationModel",
"value": {
"type": "integer",
"value": 0
}
},
{
"key": "reservationNetworks",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [
{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Network",
"typeFilter": null,
"values": {
"entries": [
{
"key": "networkPath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Network",
"id": "42c5063c-5422-448f-aac7-22ebe941ac8e",
"label": "VM Network SQA"
}
}
]
}
}
]
}
},
{
"key": "reservationStorages",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [
{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Storage",
"typeFilter": null,
"values": {
"entries": [
{
"key": "computeResourceStorageTotalSizeGB",
"value": {
"type": "integer",
"value": 1000
}
},
{
"key": "storagePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Storage",
"id": "e655aa78-e5fb-4722-9e8a-0cd4139248cf",
"label": "High Performance Storage"
}
},
{
"key": "storageReservationPriority",
"value": {
"type": "integer",
"value": 1
}
},
{
"key": "storageReservedSizeGB",
"value": {
"type": "integer",
"value": 100
}
},
{
"key": "storageEnabled",
"value": {
"type": "boolean",
"value": true
}
},
{
"key": "computeResourceStorageFreeSizeGB",
"value": {
"type": "integer",
"value": 691
}
}
]
}
}
]
}
},
{
"key": "reservationMemory",
"value": {
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Memory",
"typeFilter": null,
"values": {
"entries": [
{
"key": "computeResourceMemoryTotalSizeMB",
"value": {
"type": "integer",
"value": 13312
}
},
{
"key": "memoryReservedSizeMb",
"value": {
"type": "integer",
"value": 4096
}
}
]
}
}
}
]
}
}
“
Location: https://$vRA/reservation-service/api/reservations/3289b039-2a11-4ab4-a0bc-
b583e4c6d085
Copy the output response into an XML editor for use in a future procedure, such as updating or
deleting the reservation.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/reservations/$reservationId
This is the URL that is generated when you create a reservation
using the REST API. See Syntax for Creating a vSphere
Reservation .
Method Get
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
status The HTTP response status is 201 created to indicate that the reservation exists.
Header.Location The HTTP response should contain a location attribute, format as https://$vRA /reservation-
service/api/reservations/$reservationId.
$reservationId The HTTP response should contain a location attribute, formatted as https://$vRA /
reservation-service/api/reservations/$reservationId.
Copy the output response into an XML editor for future step usage.
{
"id": "94d74105-831a-4598-8f42-efd590fea15c ",
"name": "TestReservation",
"reservationTypeId": "Infrastructure.Reservation.Virtual.vSphere",
"tenantId": "qe",
"subTenantId": "ef58f604-528d-4441-a219-4725bead629b",
"enabled": true,
"priority": 3,
"reservationPolicyId": "b71c3a5f-087a-4d9e-9a56-fab785a3d128",
"alertPolicy": {
"enabled": true,
"frequencyReminder": 20,
"emailBgMgr": false,
"recipients": ["[email protected]",
"[email protected]"],
"alerts": [{
"alertPercentLevel": 10,
"referenceResourceId": "storage",
"id": "storage"
},
{
"alertPercentLevel": 20,
"referenceResourceId": "memory",
"id": "memory"
},
{
"alertPercentLevel": 30,
"referenceResourceId": "cpu",
"id": "cpu"
},
{
"alertPercentLevel": 40,
"referenceResourceId": "machine",
"id": "machine"
}]
},
"extensionData": {
"entries": [{
"key": "key4",
"value": {
"type": "string",
"value": "custom-property-value4"
}
},
{
"key": "key3",
"value": {
"type": "string",
"value": "custom-property-value3"
}
},
{
"key": "reservationNetworks",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationNetwork",
"typeFilter": null,
"values": {
"entries": [{
"key": "reservationNetworkProfile",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "NetworkProfile",
"id": "ed5d1503-08ac-42ca-804d-9167834a63a5",
"label": "ETEDoNotDelete2014-10-13 13:10:56"
}
},
{
"key": "reservationNetworkPath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Network",
"id": "44cb65d5-b321-43dd-a2ab-8ecf387bff8f",
"label": "VM Network SQA"
}
}]
}
}]
}
},
{
"key": "key0",
"value": {
"type": "string",
"value": "custom-property-value0"
}
},
{
"key": "key2",
"value": {
"type": "string",
"value": "custom-property-value2"
}
},
{
"key": "reservationMemory",
"value": {
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationMemory",
"typeFilter": null,
"values": {
"entries": [{
"key": "hostMemoryTotalSizeMB",
"value": {
"type": "integer",
"value": 57187
}
},
{
"key": "reservationMemoryReservedSizeMb",
"value": {
"type": "integer",
"value": 15888
}
}]
}
}
},
{
"key": "key1",
"value": {
"type": "string",
"value": "custom-property-value-Updated"
}
},
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "047e00f5-5424-4ed2-a751-4a334aeaff54",
"label": "VC51-Cluster"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 2
}
},
{
"key": "reservationStorages",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationStorage",
"typeFilter": null,
"values": {
"entries": [{
"key": "storageTotalSizeGB",
"value": {
"type": "integer",
"value": 394
}
},
{
"key": "reservationStorageReservedSizeGB",
"value": {
"type": "integer",
"value": 31
}
},
{
"key": "reservationStorageEnabled",
"value": {
"type": "boolean",
"value": true
}
},
{
"key": "reservationStoragePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "StoragePath",
"id": "f48a527b-30a6-4d54-8829-f549bc195b69",
"label": "VNXe:qe-vnxe-nfs-1"
}
},
{
"key": "storageFreeSizeGB",
"value": {
"type": "integer",
"value": 120
}
},
{
"key": "reservationStorageReservationPriority",
"value": {
"type": "integer",
"value": 1
}
}]
}
}]
}
},
{
"key": "resourcePool",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ResourcePools",
"id": "4e51fabc-19e8-4e79-b413-d52309b3bb62",
"label": "CoreDev"
}
}]
}
}
],
"alerts": [
{
"alertPercentLevel": 80,
"referenceResourceId": "storage",
"id": "storage"
},
{
"alertPercentLevel": 80,
"referenceResourceId": "memory",
"id": "memory"
},
{
"alertPercentLevel": 80,
"referenceResourceId": "cpu",
"id": "cpu"
},
{
"alertPercentLevel": 80,
"referenceResourceId": "machine",
"id": "machine"
}
]
},
"extensionData": {
"entries": [
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "c527a0f5-b1ae-4b61-8145-ad9d5c434dc7",
"label": "Engineering Allocation VDC"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 0
}
},
{
"key": "allocationModel",
"value": {
"type": "integer",
"value": 0
}
},
{
"key": "reservationNetworks",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [
{
"type": "complex",
"componentTypeId": "com.vmware.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Network",
"typeFilter": null,
"values": {
"entries": [
{
"key": "networkPath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Network",
"id": "42c5063c-5422-448f-aac7-22ebe941ac8e",
"label": "VM Network SQA"
}
}
]
}
}
]
}
},
{
"key": "reservationStorages",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [
{
"type": "complex",
"componentTypeId": "com.vmware.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Storage",
"typeFilter": null,
"values": {
"entries": [
{
"key": "computeResourceStorageTotalSizeGB",
"value": {
"type": "integer",
"value": 1000
}
},
{
"key": "storagePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Storage",
"id": "e655aa78-e5fb-4722-9e8a-0cd4139248cf",
"label": "High Performance Storage"
}
},
{
"key": "storageReservationPriority",
"value": {
"type": "integer",
"value": 1
}
},
{
"key": "storageReservedSizeGB",
"value": {
"type": "integer",
"value": 100
}
},
{
"key": "storageEnabled",
"value": {
"type": "boolean",
"value": true
}
},
{
"key": "computeResourceStorageFreeSizeGB",
"value": {
"type": "integer",
"value": 691
}
}
]
}
}
]
}
},
{
"key": "reservationMemory",
"value": {
"type": "complex",
"componentTypeId": "com.vmware.csp.iaas.blueprint.service",
"componentId": null,
"classId": "Infrastructure.Reservation.Memory",
"typeFilter": null,
"values": {
"entries": [
{
"key": "computeResourceMemoryTotalSizeMB",
"value": {
"type": "integer",
"value": 13312
}
},
{
"key": "memoryReservedSizeMb",
"value": {
"type": "integer",
"value": 4096
}
}
]
}
}
}
]
}
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/reservations/types
Method Get
$vRA Specifies the appliance name and fully qualified domain name, or IP address
of the vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
Links Species an array of link objects, each of which contains the following parts:
Content Specifies an array of data rows, each of which represents one of the objects returned in a
pageable list. Each object contains the following information:
Property Description
FormReference Specifies the user interface form reference. This field is valid for user interface elements only.
n type -- user interface form type
n formId -- user interface form ID
SchemaClassId Specifies the schema class ID of the reservation type. 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.
alertTypes Contains the alert type list defined in the reservation type:
n createdDate -- Alert type created date
n lastUpdated -- Alert type last updated date
n version -- Alert type version
n id -- Unique identifier of alert type
n name -- Name of alert type
n description -- Long description of alert type
n referenceResourceId -- Unique identifier of reference resource
The following command contains the example bearer token from Syntax for Requesting an HTTP
Bearer Token.
OTJjZjEwNjdhMzdmZTQ5YWMyMzA2NTA5M2UyNzlhMzI2ZGYxZDhlYTgxYmNkNjM5ZTNiNjIyYmEwYTRhOWJiMGE2ZTI="
https://myVRA.eng.mycompany.com/reservation-service/api/reservations/types
{
"links": [],
"content": [{
"@type": "ReservationType",
"createdDate": "2015-10-13T04:44:32.008Z",
"lastUpdated": "2015-10-13T04:44:32.009Z",
"version": 1,
"id": "Infrastructure.Reservation.Virtual.vSphere",
"name": "vSphere",
"description": "vSphere Reservation",
"category": "Virtual",
"serviceTypeId": "com.mycompany.csp.iaas.blueprint.service",
"tenantId": null,
"formReference": {
"type": "external",
"formId": "Infrastructure.Reservation.Virtual.vSphere.form.new"
},
"schemaClassId": "Infrastructure.Reservation.Virtual.vSphere",
"alertTypes": [{
"createdDate": "2015-10-13T04:44:32.008Z",
"lastUpdated": "2015-10-13T04:44:32.008Z",
"version": 0,
"id": "d248eeee-238c-4e87-9e95-f263b04d113f",
"name": "storage",
"description": null,
"referenceResourceId": "storage"
},//Omit 7 reservation types here
],
"metadata": {
"size": 20,
"totalElements": 8,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
{
"links": [],
"content": [{
{
"@type": "ReservationType",
"createdDate": "2015-11-06T10:21:06.010Z",
"lastUpdated": "2015-11-06T10:21:06.011Z",
"version": 1,
"id": "Infrastructure.Reservation.Cloud.vCloudAir",
"name": "vCloud",
"description": "vCloud Reservation",
"category": "Cloud",
"serviceTypeId": "com.mycompany.csp.iaas.blueprint.service",
"tenantId": null,
"formReference": {
"type": "external",
"formId": "Infrastructure.Reservation.Cloud.vCloudAir.form.new"
},
"schemaClassId": "Infrastructure.Reservation.Cloud.vCloudAir",
"alertTypes": [
{
"createdDate": "2015-11-06T10:21:06.010Z",
"lastUpdated": "2015-11-06T10:21:06.010Z",
"version": 0,
"id": "cd707ad2-d504-43e2-8002-11ee670dcf41",
"name": "storage",
"description": null,
"referenceResourceId": "storage"
},
{
"createdDate": "2015-11-06T10:21:06.010Z",
"lastUpdated": "2015-11-06T10:21:06.010Z",
"version": 0,
"id": "ef96fec4-a607-4944-a0af-fbe7df862ee2",
"name": "memory",
"description": null,
"referenceResourceId": "memory"
},
{
"createdDate": "2015-11-06T10:21:06.011Z",
"lastUpdated": "2015-11-06T10:21:06.011Z",
"version": 0,
"id": "043e0815-9f02-4876-b5ce-ddbedabb8ff6",
"name": "cpu",
"description": null,
"referenceResourceId": "cpu"
},
{
"createdDate": "2015-11-06T10:21:06.011Z",
"lastUpdated": "2015-11-06T10:21:06.011Z",
"version": 0,
"id": "77e90acd-93ab-4bbe-853a-b74923dae70a",
"name": "machine",
"description": null,
"referenceResourceId": "machine"
}
]
}, //Omit 7 reservation types here
],
"metadata": {
"size": 20,
"totalElements": 8,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
{
"links": [],
"content": [{
{
"@type": "ReservationType",
"createdDate": "2015-10-13T04:44:32.074Z",
"lastUpdated": "2015-10-13T04:44:32.075Z",
"version": 1,
"id": "Infrastructure.Cloud.Amazon",
"name": "Amazon",
"description": "Amazon Reservation",
"category": "Cloud",
"serviceTypeId": "com.mycompany.csp.iaas.blueprint.service",
"tenantId": null,
"formReference": {
"type": "external",
"formId": "Infrastructure.Cloud.Amazon.form.new"
},
"schemaClassId": "Infrastructure.Cloud.Amazon",
"alertTypes": [{
"createdDate": "2015-10-13T04:44:32.075Z",
"lastUpdated": "2015-10-13T04:44:32.075Z",
"version": 0,
"id": "2ef8f47c-045c-4ee4-821d-7b1543ea5f11",
"name": "machine",
"description": null,
"referenceResourceId": "machine"
}]
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/reservations/$reservationId
Method Put
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
HTTP body Contains the JSON information for the reservation, including the
updated data for the parameters that you want to update.
Most of this JSON string information is obtained by displaying the
existing details of the $reservationId. See Syntax for Verifying a
Reservation and Getting Reservation Details . The rest of the JSON
string information is obtained by using an API command to get the
ID of the parameter you want to update.
For example, to update the reservation to use a different
compute resource than the one currently specified, replace the
computeResource value of the exiting reservation with a new
computeResource value in the command's HTTP input.
Output
If the command is successful, the HTTP response body is empty except for a 204 No Content
status statement.
"key": "key3",
"value": {
"type": "string",
"value": "custom-property-value3"
}
},
{
"key": "reservationNetworks",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationNetwork",
"typeFilter": null,
"values": {
"entries": [{
"key": "reservationNetworkProfile",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "NetworkProfile",
"id": "ed5d1503-08ac-42ca-804d-9167834a63a5",
"label": "TestNetworkProfile"
}
},
{
"key": "reservationNetworkPath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "Network",
"id": "44cb65d5-b321-43dd-a2ab-8ecf387bff8f",
"label": "VM Network SQA"
}
}]
}
}]
}
},
{
"key": "key0",
"value": {
"type": "string",
"value": "custom-property-value0"
}
},
{
"key": "key2",
"value": {
"type": "string",
"value": "custom-property-value2"
}
},
{
"key": "reservationMemory",
"value": {
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationMemory",
"typeFilter": null,
"values": {
"entries": [{
"key": "hostMemoryTotalSizeMB",
"value": {
"type": "integer",
"value": 57187
}
},
{
"key": "reservationMemoryReservedSizeMb",
"value": {
"type": "integer",
"value": 15888
}
}]
}
}
},
{
"key": "key1",
"value": {
"type": "string",
"value": "custom-property-value-Updated"
}
},
{
"key": "computeResource",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "047e00f5-5424-4ed2-a751-4a334aeaff54",
"label": "VC51-Cluster"
}
},
{
"key": "machineQuota",
"value": {
"type": "integer",
"value": 2
}
},
{
"key": "reservationStorages",
"value": {
"type": "multiple",
"elementTypeId": "COMPLEX",
"items": [{
"type": "complex",
"componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
"componentId": null,
"classId": "reservationStorage",
"typeFilter": null,
"values": {
"entries": [{
"key": "storageTotalSizeGB",
"value": {
"type": "integer",
"value": 394
}
},
{
"key": "reservationStorageReservedSizeGB",
"value": {
"type": "integer",
"value": 31
}
},
{
"key": "reservationStorageEnabled",
"value": {
"type": "boolean",
"value": true
}
},
{
"key": "reservationStoragePath",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "StoragePath",
"id": "f48a527b-30a6-4d54-8829-f549bc195b69",
"label": "VNXe:qe-vnxe-nfs-1"
}
},
{
"key": "storageFreeSizeGB",
"value": {
"type": "integer",
"value": 120
}
},
{
"key": "reservationStorageReservationPriority",
"value": {
"type": "integer",
"value": 1
}
}]
}
}]
}
},
{
"key": "resourcePool",
"value": {
"type": "entityRef",
"componentId": null,
"classId": "ResourcePools",
"id": "4e51fabc-19e8-4e79-b413-d52309b3bb62",
"label": "CoreDev"
}
}]
}
}
”
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/reservations/$reservationId
Method Delete
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
Output
If the command is successful, the HTTP response body is empty except for a 204 No Content
status statement.
While many functions are stand-alone, some functions rely on the output of others. For example,
to delete a reservation, you must first obtain the ID of the reservation to delete.
Each example for this use case lists a curl command with respective JSON response, plus input
and output parameters. The same set of prerequisites applies to each example.
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
curl Command
List all available reservation policies.
JSON Output
The following example output lists two reservation policies, named reservationPolicyTest
and reservationPolicyTest2. Use the id value for each reservation policy to update or delete
them. See Update a Reservation Policy Exampleand Deleting a Reservation Policy Example.
{
"links": [],
"content": [{
"@type": "ReservationPolicy",
"id": "8adafb54-4c85-4478-86f0-b6ae80ab5ca4",
"name": "reservationPolicyTest",
"description": "reservationPolicyDescTest",
"reservationPolicyTypeId": "Infrastructure.Reservation.Policy.ComputeResource"
},
{
"@type": "reservationPolicy",
"id": "fdd9854b-012e-41d7-ad17-fc73d4395714",
"name": "reservationPolicyTest2",
"description": "reservationPolicyDescTest2",
"reservationPolicyTypeId": "Infrastructure.Reservation.Policy.Storage"
}],
"metadata": {
"size": 0,
"totalElements": 2,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/reservations/policies
Method Get
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
Links Specifies an array of link objects, each of which contains the following parts:
n rel
Content Specifies an array of data rows, each of which represents one of the tenant objects returned
in a pageable list. Each tenant object contains the following information:
n @type. Contains the ReservationPolicy string.
n id. Specifies the unique reservation policy ID.
n name. Specifies the reservation policy name.
n description. Specifies the reservation policy description.
reservationPolicyType Specifies the type of reservation policy. Supported vRealize Automation reservation policy
Id types are Reservation.Policy.ComputeResource and Reservation.Policy.Storage.
curl Command
The following example command uses the reservation service to create a new reservation policy.
JSON Output
The following example output contains the HTTP body and a location URL. The output URL
contains the new reservation policy ID, for example 5fd2de36-659f-4beb-97af-77d683feb697.
Location:
https://$vRA/reservation-service/api/reservations/policies/
5fd2de36-659f-4beb-97af-77d683feb697
Copy the location URL from this output to an editor for future use, for example for updating or
deleting the reservation policy.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/reservations/policies
Method Post
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
$reservationPolicyId Specifies the new reservation policy ID. Obtain this ID by listing your
available reservation policies.
curl Command
The following example command retrieves information for the reservation policy with an ID of
8adafb54-4c85-4478-86f0-b6ae80ab5ca4.
JSON Output
The following sample output displays information for the specified reservation policy ID
8adafb54-4c85-4478-86f0-b6ae80ab5ca4.
{
"id": "8adafb54-4c85-4478-86f0-b6ae80ab5ca4",
"name": "reservationPolicyTest",
"description": "reservationPolicyDescTest",
"reservationPolicyTypeId": "Infrastructure.Reservation.Policy.ComputeResource"
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/reservations/policies/$id
Method Get
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
Example: Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
Parameter Description
curl Command
The following example command updates the name and description values for the reservation
policy with an ID of 94d74105-831a-4598-8f42-efd590fea15c.
JSON Output
If the command is successful, the HTTP response body is empty except for a 204 No Content
status statement.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/reservations/policies/$id
Method Put
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
Parameter Description
Output
If the command is successful, the HTTP response body is empty except for a 204 No Content
status statement.
curl Command
The following example command deletes a reservation policy with an ID of
8adafb54-4c85-4478-86f0-b6ae80ab5ca4.
JSON Output
If the command is successful, the HTTP response body is empty except for a 204 No Content
status statement.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/reservation-service/api/reservations/policies/$id
Method Delete
$vRA Specifies the appliance name and fully qualified domain name, or IP
address of the vRealize Automation server.
$id Specifies the reservation policy ID. To obtain the reservation policy ID
to delete, see List Reservation Policies Example.
Output
If the command is successful, the HTTP response body is empty except for a 204 No Content
status statement.
For information about using the vRealize Automation application user interface to work with key
pairs, see the IaaS Configuration documentation.
Each example for this use case lists a curl command with respective JSON response, plus input
and output parameters. The same set of prerequisites applies to each example.
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
curl Command
The following example command gets a list of valid key pairs.
JSON Output
The following JSON output is returned based on the command input.
{
"links": [
],
"content": [
{
"@type": "KeyPair",
"id": 26,
"name": "TestKeyPair",
"computeResourceId": "ca4dcca0-85ce-49dd-8371-4ce7c8e2d5e6",
"secretKey": ""
},
{
"@type": "KeyPair",
"id": 27,
"name": "EC2KeyPair",
"computeResourceId": "ca4dcca0-85ce-49dd-8371-4ce7c8e2d5e6",
"secretKey":
"jmfhkPFLe1xF4LsgxyYDlBH65IjiKsNH3xgeUhNt6AyIcSA2eZsxH9FNFcDst1cRLQUmLYLUCN6ZlrVtD3C5CYAOEE9Up
lO+YKnAcqUSyXB6PQ3I/
NuebdtGrx38fkTJsEpRqxLppWPJpVlHYRO2O7GhhWnE6F3bPwwg3dWwymqWHxBZlCcuEcztovbhN8r7/
hKsXKbNSJz+J8DVhPB7PPdHJJ4E/6a9IXkNQs/T0NknCOyc0YcFVpgrc3PMGabi8vd/
7v0nEtDARyA8WwAGgtedHGtBo2gciY1Bu/
0SNr2yCzsZcqbVeg4ufkjlv0G1Ed1FfGHMh5kuVC7alk2aSI5YkWnS4d9YJYi7diYmc7GmrVW0XWNz4kEMdQBkK+CvMxiZ
17jyQD+V4NuM4ydNPJJMqpvoAHtLrAmp/hXhInuf8j/
l0mbawWSvUDUA3s4ZE55cFp546MJIrVCRyoMoKfxuHquIPdANRAVs7qo9DGxBiCzjvyBqof21y6dhGCd1q48Dkd72QCj6g
GV84lHZ/zXWcz4+aKFRVolNqSZEtZ/9wzdjqYdn/ySl0S5GE2rG/xRsh6g+giB9j4VQOMvC/
uvhkYUo3WfTgxi8SeipFIVcbvkkOI0ubPU1xnWdDErjji6UwEtmjajHuiA93GtiWIdeCvyKQWmo9jkkLUmQe4XrmRt3P09
FWm8Quwe5Hw6czK0dIODwcHE0Azl0TqLKl1wA39uhGrHoXNypFiOMmRbo1YnfIW23ggEnxRACY1jUZkTewhSbVY4S+Xyzv
FDcTRpSjWpRUOozYuMSsDnRzCJZQXhg4IYvwTvG+uEUu4+YR+WCrgC6Tk60i3cLSuHnV5k00AWXWwvnPnwYRFxxyzhcSDx
4jyyCaysmBo9NHGwNkJU1F94SY5Vp6O0E9EJuViMohF1gc18Q6SXHBNlrp0L7bAMggpmystGIkBNkSRhcDAFflNoS/
MTEW0uJoDfe6DczAt9B0YGtHdy3AH/U4ADOPkz5xlQ4EL/
rQSSolcBfVhbejVpbktJo4YKB7dzSDcJTSw99Uve+BQjhigVcfxDXme3MrXPO4BeCU891DLaTJyeYYADyGUKZfKFC6iCO9
SQfynwK6iE2eYKLpIMcf/C8+rLJVXcy7gkjT/
17WCu7mQXMevlIJlaApyytN1eCJcVDsr4N5LURZofnPArromhLy3JWiEJ4dtq+17KPiMff34e/
kT+i0ns73Wdy1oblZAi5kwBFMgBjAMex5fGNR1q/wtY1beWaxVw1J5RViaXeXSKO5mttE/
dzW6ONeJygjIlpgfwSLwr8JA4GanN1RWGeqRNjfOOGgdufIvDqmBB/
klnuGTVgMVWc0caQMzFq07UcXlMsgNOROHBfkzelWB+v0kXHsQ4eSeYVhjnT3CPURr5UMZ8YQ7fm+DltRM1Nw3o9WAJjQJ
5xyT2kxou4PHBzoq6JouwrCluig7GQ06lVu2C3nNpyfGKsmFyOlHMaVuRYX9/
dJQyibZAg1yDqyI3sIL3CeGr7ynhOTEEQiAOWqgIUyDvrvc2Ma4RjjI4b3eFfBMkLWqTqs33+/5QktQz+p5JrIb192STI/
PwHY51MfkbDErpeNFY479P7yKlZGbB8WVBfFpJCoVTQoZNio1ZhA7nA+rkqNbM4mcHQ+ZaYfxCc1UKO1AYBGS9ARz5OtYQ
U64Ei7tpWUbsYDXIA9Ss4VRASHvA7M3s+N61TPQ9HZuof/
c6TbzOWE0ojtxEyO3sDsBWumm13/61+JT3k0rIdmV25aVvxrUv1S3JLI/o/
zGgR9yTOeADIXHWsF4lQyai9MnmEaclHVWmK+LiVZSAfk6auEm+13a24+UM9Mg6ninfzeIq0cjdT3OUweXgDnK0BMGX0wf
SIYIrpRrDr9QdVoHGtdqZvJ62F8aITjO8urIK+bXZzwgFQ2JE4SYxojNHPYwBjadFm0A2eVPtOivMYYYr8FCUYtfbjjIS1
TyJaKIFhhqs6bA6/PH+NvBmbozpDkH9wg3mQ1SOP5iSMAMue6fx+b/
SpOZ5MPnNjRo+VXG3qFl936AB4F1F2ObD27GyjibeYmhQkITtp/yGYCZ68PhCun0/eiEjmXiOUx/5jYGOUEZ1Ddojhc5M/
PClR46vQ/
3Iyv5pUGPno+wkn34lk6s2PO2axrXvQqTwoiYC3f2p1gp0qYidIzKa2KHrUCOF4hnjQ3v3z93ORMCK3wN5uQ3xMFOd7+1X
petxvG9d7L1lU/sgCVmEhdOSnhLC5Jeq70MVwixPocnJR4nyotPE=="
},//Omit 18 more key pairs
],
"metadata": {
"size": 0,
"totalElements": 20,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/iaas-proxy-provider/api/keyPairs
Method Get
$vRA Specifies the appliance name and fully qualified domain name,
or IP address of the vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
curl Command
The following example command creates a key pair.
JSON Output
The output returns an empty HTTP response body and the host information and key pair ID in
the header statement.
Location:
https://vcac148-084-241.eng.mycompany.com/iaas-proxy-provider/api/keyPairs/56
Copy the location URL into a text editor for future use.
Input
Use the supported input parameters to control the command output.
Input Description
URL https://$vRA/iaas-proxy-provider/api/keyPairs
Method Post
HTTP Body Contains the HTTP body of the target key pair.
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
https://$vRA/iaas-proxy-provider/api/
keyPairs/$keypairID
"computeResourceId": "ca4dcca0-85ce-49dd-8371-4ce7c8e2d5e6",
"secretKey":
"jmfhkPFLe1xF4LsgxyYDlBH65IjiKsNH3xgeUhNt6AyIcSA2eZsxH9FNFcDst1cRLQUmLYLUCN6ZlrVtD3C5CYAOEE9Up
lO+YKnAcqUSyXB6PQ3I/
NuebdtGrx38fkTJsEpRqxLppWPJpVlHYRO2O7GhhWnE6F3bPwwg3dWwymqWHxBZlCcuEcztovbhN8r7/
hKsXKbNSJz+J8DVhPB7PPdHJJ4E/6a9IXkNQs/T0NknCOyc0YcFVpgrc3PMGabi8vd/
7v0nEtDARyA8WwAGgtedHGtBo2gciY1Bu/
0SNr2yCzsZcqbVeg4ufkjlv0G1Ed1FfGHMh5kuVC7alk2aSI5YkWnS4d9YJYi7diYmc7GmrVW0XWNz4kEMdQBkK+CvMxiZ
17jyQD+V4NuM4ydNPJJMqpvoAHtLrAmp/hXhInuf8j/
l0mbawWSvUDUA3s4ZE55cFp546MJIrVCRyoMoKfxuHquIPdANRAVs7qo9DGxBiCzjvyBqof21y6dhGCd1q48Dkd72QCj6g
GV84lHZ/zXWcz4+aKFRVolNqSZEtZ/9wzdjqYdn/ySl0S5GE2rG/xRsh6g+giB9j4VQOMvC/
uvhkYUo3WfTgxi8SeipFIVcbvkkOI0ubPU1xnWdDErjji6UwEtmjajHuiA93GtiWIdeCvyKQWmo9jkkLUmQe4XrmRt3P09
FWm8Quwe5Hw6czK0dIODwcHE0Azl0TqLKl1wA39uhGrHoXNypFiOMmRbo1YnfIW23ggEnxRACY1jUZkTewhSbVY4S+Xyzv
FDcTRpSjWpRUOozYuMSsDnRzCJZQXhg4IYvwTvG+uEUu4+YR+WCrgC6Tk60i3cLSuHnV5k00AWXWwvnPnwYRFxxyzhcSDx
4jyyCaysmBo9NHGwNkJU1F94SY5Vp6O0E9EJuViMohF1gc18Q6SXHBNlrp0L7bAMggpmystGIkBNkSRhcDAFflNoS/
MTEW0uJoDfe6DczAt9B0YGtHdy3AH/U4ADOPkz5xlQ4EL/
rQSSolcBfVhbejVpbktJo4YKB7dzSDcJTSw99Uve+BQjhigVcfxDXme3MrXPO4BeCU891DLaTJyeYYADyGUKZfKFC6iCO9
SQfynwK6iE2eYKLpIMcf/C8+rLJVXcy7gkjT/
17WCu7mQXMevlIJlaApyytN1eCJcVDsr4N5LURZofnPArromhLy3JWiEJ4dtq+17KPiMff34e/
kT+i0ns73Wdy1oblZAi5kwBFMgBjAMex5fGNR1q/wtY1beWaxVw1J5RViaXeXSKO5mttE/
dzW6ONeJygjIlpgfwSLwr8JA4GanN1RWGeqRNjfOOGgdufIvDqmBB/
klnuGTVgMVWc0caQMzFq07UcXlMsgNOROHBfkzelWB+v0kXHsQ4eSeYVhjnT3CPURr5UMZ8YQ7fm+DltRM1Nw3o9WAJjQJ
5xyT2kxou4PHBzoq6JouwrCluig7GQ06lVu2C3nNpyfGKsmFyOlHMaVuRYX9/
dJQyibZAg1yDqyI3sIL3CeGr7ynhOTEEQiAOWqgIUyDvrvc2Ma4RjjI4b3eFfBMkLWqTqs33+/5QktQz+p5JrIb192STI/
PwHY51MfkbDErpeNFY479P7yKlZGbB8WVBfFpJCoVTQoZNio1ZhA7nA+rkqNbM4mcHQ+ZaYfxCc1UKO1AYBGS9ARz5OtYQ
U64Ei7tpWUbsYDXIA9Ss4VRASHvA7M3s+N61TPQ9HZuof/
c6TbzOWE0ojtxEyO3sDsBWumm13/61+JT3k0rIdmV25aVvxrUv1S3JLI/o/
zGgR9yTOeADIXHWsF4lQyai9MnmEaclHVWmK+LiVZSAfk6auEm+13a24+UM9Mg6ninfzeIq0cjdT3OUweXgDnK0BMGX0wf
SIYIrpRrDr9QdVoHGtdqZvJ62F8aITjO8urIK+bXZzwgFQ2JE4SYxojNHPYwBjadFm0A2eVPtOivMYYYr8FCUYtfbjjIS1
TyJaKIFhhqs6bA6/PH+NvBmbozpDkH9wg3mQ1SOP5iSMAMue6fx+b/
SpOZ5MPnNjRo+VXG3qFl936AB4F1F2ObD27GyjibeYmhQkITtp/yGYCZ68PhCun0/eiEjmXiOUx/5jYGOUEZ1Ddojhc5M/
PClR46vQ/
3Iyv5pUGPno+wkn34lk6s2PO2axrXvQqTwoiYC3f2p1gp0qYidIzKa2KHrUCOF4hnjQ3v3z93ORMCK3wN5uQ3xMFOd7+1X
petxvG9d7L1lU/sgCVmEhdOSnhLC5Jeq70MVwixPocnJR4nyotPE=="
}
“
Location:
https://vcac148-084-241.eng.mycompany.com/iaas-proxy-provider/api/keyPairs/56
Copy the location URL into a text editor for future use.
curl Command
The following example command queries a key pair.
JSON Output
The following JSON output is returned based on the command input.
{
"id": 26,
"name": "TestKeyPair",
"computeResourceId": "ca4dcca0-85ce-49dd-8371-4ce7c8e2d5e6",
"secretKey": ""
}
Input
Use the supported input parameters to control the command output.
Parameters Description
URL https://$vRA/iaas-proxy-provider/api/keyPairs/$ids
Method Get
Output
The command output contains property names and values based on the command input
parameters.
Parameters Description
curl Command
The following example command updates a key pair.
JSON Output
The output contains an empty HTTP response body and the following status code.
204 No Content
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/iaas-proxy-provider/api/keyPairs/$id
Method Put
HTTP Body Contains the HTTP body that describes the key pair to
update and what to update in the identified key pair.
n $id: Specifies the unique identifier of the key pair.
n $name: Specifies the unique identifier of the key pair.
n $computeResourceId: Specifies the compute resource
ID that is binded to the key pair.
n $secretKey: Specifies the secret key for the key pair.
Output
The command output contains a status statement.
Parameter Description
curl Command
The following example command deletes a key pair.
JSON Output
The output contains an empty HTTP response body and the following status code.
204 No Content
Input
Use the supported input parameters to control the command output.
Input Description
URL https://$vRA/iaas-proxy-provider/api/keyPairs/$id
Method Delete
Output
The command output contains a status statement.
Parameter Description
You can access the following types of network profile by using the same programming calls.
Different types of network profiles contain different fields.
Network
Profile Type Description
External All network profiles use the elements in the object definition for external network. The network
definition specifies the network address configuration for the network. The external network
definition can specify:
n Existing network addresses configured on the vSphere server. They are the external part of the
NAT and routed networks types. An external network profile can define a range of static IP
addresses available on the external network.
n An endpoint that allows access to IP ranges obtained from the supplied VMware internal IPAM
provider or an external IPAM provider solution that you have imported and registered in vRealize
Orchestrator, such as Infoblox IPAM, and existing network address ranges configured by the
IPAM provider software.
An external network profile with a static IP range is a prerequisite for NAT and routed networks.
When you specify a NAT network profile or a Routed network profile, the base object definition for
the external network profile is used and additional definitions for the NAT or Routed network profiles
are required to complete the profile.
NAT An external network that uses network address translation (NAT) to enable one set of IP addresses
for external communication and another set for internal communications. With one-to-one NAT
networks, every virtual machine is assigned an external IP address from the external network profile
and an internal IP address from the NAT network profile. With one-to-many NAT networks, all
machines share a single IP address from the external network profile for external communication.
A NAT network profile defines local and external networks that use a translation table for mutual
communication.
Routed A routed network represents a routable IP space divided across subnets that are linked together
using Distributed Logical Router (DLR). Every new routed network has the next available subnet
assigned to it and is associated with other routed networks that use the same network profile.
The virtual machines that are provisioned with routed networks that have the same routed network
profile can communicate with each other and the external network.
A routed network profile defines a routable space and available subnets.
For more information about Distributed Logical Router, see NSX Administration Guide available as a
selection from the NSX for vSphere product documentation.
Each example for this use case lists a curl command with respective JSON response, plus input
and output parameters. The same set of prerequisites applies to each example.
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
curl Command
The following example command returns a list of network profiles.
JSON Output
The following JSON output is returned based on the command input.
{
"links": [
],
"content": [
{
"@type": "NATNetworkProfile",
"id": "599541aa-ffb0-4a37-9483-4353f3fc6be3",
"name": "NATTest",
"description": "",
"createdDate": "2014-11-11T02:29:09.000Z",
"lastModifiedDate": "2014-11-11T02:29:09.000Z",
"isHidden": false,
"definedRanges": [
{
"id": "9f7d8025-bd4c-4560-9b41-9ce455ee49ae",
"name": "range",
"description": "",
"beginIPv4Address": "10.118.190.110",
"endIPv4Address": "10.118.190.115",
"state": "UNALLOCATED",
"createdDate": "2014-11-11T02:29:05.000Z",
"lastModifiedDate": "2014-11-11T02:29:05.000Z",
"definedAddresses": [
{
"id": "6e7dc8c3-dc64-4ebd-a282-05852010310f",
"name": null,
"description": null,
"IPv4Address": "10.118.190.111",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:29:05.000Z",
"lastModifiedDate": "2014-11-11T02:29:05.000Z"
},
{
"id": "f6802100-1d7e-4f31-bdeb-1b27f7e77766",
"name": null,
"description": null,
"IPv4Address": "10.118.190.115",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:29:05.000Z",
"lastModifiedDate": "2014-11-11T02:29:05.000Z"
},
{
"id": "f6deba8c-fbf4-4ea0-9d9c-325e9db2f13e",
"name": null,
"description": null,
"IPv4Address": "10.118.190.114",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:29:05.000Z",
"lastModifiedDate": "2014-11-11T02:29:05.000Z"
},
{
"id": "9d5a9d25-26d7-4ce3-93a2-61242a88c5b2",
"name": null,
"description": null,
"IPv4Address": "10.118.190.110",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:29:05.000Z",
"lastModifiedDate": "2014-11-11T02:29:05.000Z"
},
{
"id": "2b616f1a-dc35-4caa-8ee7-6494ca50db57",
"name": null,
"description": null,
"IPv4Address": "10.118.190.113",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:29:05.000Z",
"lastModifiedDate": "2014-11-11T02:29:05.000Z"
},
{
"id": "9dd5d265-ec23-42be-9bdb-734c11b1e315",
"name": null,
"description": null,
"IPv4Address": "10.118.190.112",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:29:05.000Z",
"lastModifiedDate": "2014-11-11T02:29:05.000Z"
},
]
}
],
"profileType": "NAT",
"subnetMask": "255.255.255.0",
"gatewayAddress": "10.118.190.230",
"primaryDnsAddress": "10.110.182.45",
"secondaryDnsAddress": "",
"dnsSuffix": "mycompany.com",
"dnsSearchSuffix": "",
"primaryWinsAddress": "10.0.0.1",
"secondaryWinsAddress": "",
"dhcpStartIPAddress": null,
"dhcpEndIPAddress": null,
"leaseTimeInSeconds": 0
},
{
"@type": "PrivateNetworkProfile",
"id": "594e4016-b067-4d19-aa81-63502675f925",
"name": "privateTest",
"description": "",
"createdDate": "2014-11-11T02:26:44.000Z",
"lastModifiedDate": "2014-11-11T02:26:44.000Z",
"isHidden": false,
"definedRanges": [
{
"id": "8827193e-f1c3-493e-8bcd-1b153f2a5e74",
"name": "range",
"description": "",
"beginIPv4Address": "10.118.190.110",
"endIPv4Address": "10.118.190.112",
"state": "UNALLOCATED",
"createdDate": "2014-11-11T02:25:57.000Z",
"lastModifiedDate": "2014-11-11T02:25:57.000Z",
"definedAddresses": [
{
"id": "262a4273-1e75-4c23-8fb8-088473521b19",
"name": null,
"description": null,
"IPv4Address": "10.118.190.111",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:25:57.000Z",
"lastModifiedDate": "2014-11-11T02:25:57.000Z"
},
{
"id": "7eebd0ad-0dde-4fa1-aad3-750498214caf",
"name": null,
"description": null,
"IPv4Address": "10.118.190.110",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:25:57.000Z",
"lastModifiedDate": "2014-11-11T02:25:57.000Z"
},
{
"id": "37ca8368-5d19-4d23-a6b8-7b233bb2320d",
"name": null,
"description": null,
"IPv4Address": "10.118.190.112",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:25:57.000Z",
"lastModifiedDate": "2014-11-11T02:25:57.000Z"
},
]
}
],
"profileType": "PRIVATE",
"subnetMask": "255.255.255.0",
"gatewayAddress": "10.118.190.230",
"dhcpStartIPAddress": null,
"dhcpEndIPAddress": null,
"leaseTimeInSeconds": 0
},
{
"@type": "RoutedNetworkProfile",
"id": "a3dbfc76-7eab-4c1f-8f59-8fcc0b50ec6c",
"name": "routedTest",
"description": "",
"createdDate": "2014-11-11T02:31:11.000Z",
"lastModifiedDate": "2014-11-11T02:31:11.000Z",
"isHidden": false,
"definedRanges": [
{
"id": "4d9b291a-841f-4f62-b03e-83781133024c",
"name": "Range 1",
"description": "",
"beginIPv4Address": "10.118.183.1",
"endIPv4Address": "10.118.183.254",
"state": "UNALLOCATED",
"createdDate": "2014-11-11T02:30:34.000Z",
"lastModifiedDate": "2014-11-11T02:30:34.000Z",
"definedAddresses": [
]
}
],
"profileType": "ROUTED",
"subnetMask": "255.255.254.0",
"primaryDnsAddress": "10.110.182.45",
"secondaryDnsAddress": "",
"dnsSuffix": "mycompany.com",
"dnsSearchSuffix": "",
"primaryWinsAddress": "10.0.0.1",
"secondaryWinsAddress": "",
"baseIP": "10.118.183.1"
},
{
"@type": "ExternalNetworkProfile",
"id": "68b6a183-fc8a-4592-af23-92f8d410ee32",
"name": "externalTest",
"description": "",
"createdDate": "2014-11-11T02:24:07.000Z",
"lastModifiedDate": "2014-11-11T02:24:07.000Z",
"isHidden": false,
"definedRanges": [
{
"id": "3a85a049-522f-4b64-8f60-6e7b252ad204",
"name": "range",
"description": "",
"beginIPv4Address": "10.110.183.200",
"endIPv4Address": "10.110.183.201",
"state": "UNALLOCATED",
"createdDate": "2014-11-11T02:23:38.000Z",
"lastModifiedDate": "2014-11-11T02:23:38.000Z",
"definedAddresses": [
{
"id": "f229ea1a-18de-4dae-ae7b-0cec7feaa99b",
"name": null,
"description": null,
"IPv4Address": "10.110.183.201",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:23:38.000Z",
"lastModifiedDate": "2014-11-11T02:23:38.000Z"
},
{
"id": "cd39e786-6490-4c95-8cf7-d6e3b6a0ba67",
"name": null,
"description": null,
"IPv4Address": "10.110.183.200",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:23:38.000Z",
"lastModifiedDate": "2014-11-11T02:23:38.000Z"
},
]
},
{
"id": "67acdc6f-d0b9-4f47-a74b-ea58ff9ce074",
"name": "range2",
"description": "",
"beginIPv4Address": "10.110.183.180",
"endIPv4Address": "10.110.183.183",
"state": "UNALLOCATED",
"createdDate": "2014-11-11T02:24:04.000Z",
"lastModifiedDate": "2014-11-11T02:24:04.000Z",
"definedAddresses": [
{
"id": "37b5c7d1-b82f-4961-a7cc-0117d3610ed7",
"name": null,
"description": null,
"IPv4Address": "10.110.183.182",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:24:04.000Z",
"lastModifiedDate": "2014-11-11T02:24:04.000Z"
},
"id": "43d8bae4-7b78-40d2-a9ef-350d28901c24",
"name": null,
"description": null,
"IPv4Address": "10.110.183.180",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:24:04.000Z",
"lastModifiedDate": "2014-11-11T02:24:04.000Z"
},
{
"id": "c270ce8e-a418-4d02-89db-3b84f6816a75",
"name": null,
"description": null,
"IPv4Address": "10.110.183.181",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:24:04.000Z",
"lastModifiedDate": "2014-11-11T02:24:04.000Z"
},
{
"id": "684bbe43-29ce-4113-92c7-43921c943099",
"name": null,
"description": null,
"IPv4Address": "10.110.183.183",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:24:04.000Z",
"lastModifiedDate": "2014-11-11T02:24:04.000Z"
},
]
}
],
"profileType": "EXTERNAL",
"IPAMEndpointId": null,
"subnetMask": "255.255.255.0",
"gatewayAddress": "10.110.183.253",
"primaryDnsAddress": "10.110.182.45",
"secondaryDnsAddress": "",
"dnsSuffix": "mycompany.com",
"dnsSearchSuffix": "",
"primaryWinsAddress": "10.0.0.1",
"secondaryWinsAddress": ""
}
],
"metadata": {
"size": 0,
"totalElements": 4,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/iaas-proxy-provider/api/network/profiles
Method Get
Parameter Description
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
Specifies the date and time that the network profile was
created.
n lastModifiedDate:
Specifies the date and time that the network profile was
last modified.
n isHidden:
Parameter Description
Parameter Description
curl Command
The following example command creates an external network profile without IPAM.
"primaryDnsAddress": "10.110.182.45",
"secondaryDnsAddress": "",
"dnsSuffix": "mycompany.com",
"dnsSearchSuffix": "",
"primaryWinsAddress": "10.0.0.1",
"secondaryWinsAddress": ""
}
“
JSON Output
The JSON output consists of a location URL, which points to the newly created network
profile. The output contains an empty HTTP response body and the following or similar header
statement. Copy the location URL into a text editor for future use.
Location:
https://vcac148-084-241.eng.mycompany.com/iaas-proxy-provider/api/network/profiles/263b80f5-
d34f-47f2-b0b1-5a3db991c2e9
Copy the location URL into a text editor for future use.
Input
Use the supported input parameters to control the command output.
Input Description
URL https://$vRA/iaas-proxy-provider/api/network/profiles
Method Post
HTTP Body The HTTP body describes the network profile to create.
Sample HTTP body field values are presented in the
JSON Output section of the Get a Network Profile List
Example topic. Format your HTTP body using this content
as reference.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
curl Command
The following example command creates an external IPAM profile.
{
"profileType" : "EXTERNAL",
"id" : null,
"@type" : "ExternalNetworkProfile",
"name" : "External IPAM",
"IPAMEndpointId" : "c20f305c-07a5-4ba7-88ac-35da7b9713e0",
"addressSpaceExternalId" : "address-space-4",
"description" : null,
"definedRanges" : [{
"externalId" : "network-1",
"name" : "192.168.1.0/24",
"description" : "Created by vRO package stub workflow",
"state" : "UNALLOCATED",
"beginIPv4Address" : null,
"endIPv4Address" : null
}
]
}
JSON Output
The output contains an empty HTTP response body and the location and network profile ID in
the header statement.
Location:
https://vcac148-084-241.eng.mycompany.com/iaas-proxy-provider/api/network/profiles/263b80f5-
d34f-47f2-b0b1-5a3db991c2e9
Copy the location URL into a text editor for future use.
Input
Use the supported input parameters to control the command output.
Input Description
URL https://$vRA/iaas-proxy-provider/api/network/profiles
Method Post
HTTP Body The HTTP body specifies the information for creating an
external IPAM profile.
n profileType: Specify EXTERNAL for this parameter.
n id: Specifies null.
n name: Specifies the name of the profile.
n IPAMEndpointId: Specifies the endpoint ID for an
external IPAM provider.
n addressSpaceExternalId: Specify the address space of
the IPAM provider. This is represented in the vRealize
Automation UI as Address Space.
n description: Optionally, can specify a description for
the profile. If you do not provide a description, code
"null" for this parameter.
n definedRanges: Specifies parameters that set up
defined address ranges:
n externalId: Specify the address range of the IPAM
provider.
Output
The command output contains property names and values based on the command input
parameters.
Property Description
curl Command
The following example command queries the existing network profile ID 68b6a183-fc8a-4592-
af23-92f8d410ee32.
JSON Output
The following JSON output is returned based on the command input.
{
"@type": "ExternalNetworkProfile",
"id": "68b6a183-fc8a-4592-af23-92f8d410ee32",
"name": "externalTest",
"description": "",
"createdDate": "2014-11-11T02:24:07.000Z",
"lastModifiedDate": "2014-11-11T02:24:07.000Z",
"isHidden": false,
"definedRanges": [
{
"id": "3a85a049-522f-4b64-8f60-6e7b252ad204",
"name": "range",
"description": "",
"beginIPv4Address": "10.110.183.200",
"endIPv4Address": "10.110.183.201",
"state": "UNALLOCATED",
"createdDate": "2014-11-11T02:23:38.000Z",
"lastModifiedDate": "2014-11-11T02:23:38.000Z",
"definedAddresses": [
{
"id": "f229ea1a-18de-4dae-ae7b-0cec7feaa99b",
"name": null,
"description": null,
"IPv4Address": "10.110.183.201",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:23:38.000Z",
"lastModifiedDate": "2014-11-11T02:23:38.000Z"
},
{
"id": "cd39e786-6490-4c95-8cf7-d6e3b6a0ba67",
"name": null,
"description": null,
"IPv4Address": "10.110.183.200",
"IPSortValue": 0,
"state": "UNALLOCATED",
"hostName": "",
"createdDate": "2014-11-11T02:23:38.000Z",
"lastModifiedDate": "2014-11-11T02:23:38.000Z"
},
}
],
"profileType": "EXTERNAL",
"IPAMEndpointId": null,
"subnetMask": "255.255.255.0",
"gatewayAddress": "10.110.183.253",
"primaryDnsAddress": "10.110.182.45",
"secondaryDnsAddress": "",
"dnsSuffix": "mycompany.com",
"dnsSearchSuffix": "",
"primaryWinsAddress": "10.0.0.1",
"secondaryWinsAddress": ""
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/iaas-proxy-provider/api/network/profiles/$id
Method Get
$vRA Specifies the appliance name and fully qualified domain name,
or IP address of the vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
Specifies the date and time that the network profile was
created.
n lastModifiedDate:
Specifies the date and time that the network profile was
last modified.
n isHidden:
Parameter Description
Parameter Description
curl Command
The following example command updates the network profile with an ID of 263b80f5-d34f-47f2-
b0b1-5a3db991c2e9.
]
}
],
"profileType": "EXTERNAL",
"subnetMask": "255.255.255.0",
"gatewayAddress": "10.110.183.253",
"primaryDnsAddress": "10.110.182.45",
"secondaryDnsAddress": "",
"dnsSuffix": "mycompany.com",
"dnsSearchSuffix": "",
"primaryWinsAddress": "10.0.0.1",
"secondaryWinsAddress": ""
}
“
JSON Output
The output contains an empty HTTP response body and the following status code.
204 No Content
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/iaas-proxy-provider/api/network/profiles/$id
Method Put
Output
The command output contains a status statement.
Parameter Description
curl Command
The following example command deletes a network profile with an ID of 263b80f5-d34f-47f2-
b0b1-5a3db991c2e9.
JSON Output
The output contains an empty HTTP response body and the following status code.
204 No Content
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/iaas-proxy-provider/api/network/
profiles/$id
Method Delete
Output
The command output contains a status statement.
Parameter Description
Prerequisites
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
n Obtain the endpoint ID for the external IPAM provider device you want to query.
Procedure
1 Use the following command to query an IPAM endpoint for a list of configured IP address
ranges.
2 Examine the response for a list of the available IP address ranges configured on the IPAM
provider device.
{
"links": [],
"content": [
{
"@type": "IPRange",
"id": null,
"name": "192.168.0.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 0"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Santa Clara"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.0.0",
"subnetPrefixLength": 24,
"externalId": "network-0",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.1.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.2.0",
"subnetPrefixLength": 24,
"externalId": "network-2",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.3.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 3"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Boston"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.3.0",
"subnetPrefixLength": 24,
"externalId": "network-3",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.4.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 4"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Santa Clara"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.4.0",
"subnetPrefixLength": 24,
"externalId": "network-4",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.5.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 5"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Boston"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.5.0",
"subnetPrefixLength": 24,
"externalId": "network-5",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.6.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 6"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Santa Clara"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.6.0",
"subnetPrefixLength": 24,
"externalId": "network-6",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.7.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 7"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Boston"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.7.0",
"subnetPrefixLength": 24,
"externalId": "network-7",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.8.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 8"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Santa Clara"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.8.0",
"subnetPrefixLength": 24,
"externalId": "network-8",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.9.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 9"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Boston"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.9.0",
"subnetPrefixLength": 24,
"externalId": "network-9",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.10.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 10"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Santa Clara"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.10.0",
"subnetPrefixLength": 24,
"externalId": "network-10",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.11.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 11"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Boston"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.11.0",
"subnetPrefixLength": 24,
"externalId": "network-11",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.12.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.13.0",
"subnetPrefixLength": 24,
"externalId": "network-13",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.14.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 14"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Santa Clara"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.14.0",
"subnetPrefixLength": 24,
"externalId": "network-14",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.15.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 15"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Boston"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.15.0",
"subnetPrefixLength": 24,
"externalId": "network-15",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.16.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 16"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Santa Clara"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.16.0",
"subnetPrefixLength": 24,
"externalId": "network-16",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.17.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 17"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Boston"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.17.0",
"subnetPrefixLength": 24,
"externalId": "network-17",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.18.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 18"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Santa Clara"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.18.0",
"subnetPrefixLength": 24,
"externalId": "network-18",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
},
{
"@type": "IPRange",
"id": null,
"name": "192.168.19.0/24",
"description": "Created by vRO package stub workflow",
"extensionData": {
"entries": [
{
"key": "Building",
"value": {
"type": "string",
"value": "Building 19"
}
},
{
"key": "City",
"value": {
"type": "string",
"value": "Boston"
}
}
]
},
"providerEndpointId": "C20F305C-07A5-4BA7-88AC-35DA7B9713E0",
"providerEndpointURI": null,
"start": null,
"end": null,
"ipVersion": "IPv4",
"gateway": "192.168.19.0",
"subnetPrefixLength": 24,
"externalId": "network-19",
"dnsInfo": {
"@type": "DNSInfo",
"id": null,
"name": null,
"description": null,
"dnsSuffix": "sqa.local",
"primaryDNS": "",
"secondaryDNS": "",
"dnsSearchSuffixes": "search.sqa.local,search2.sqa.local",
"preferredWINS": "",
"alternateWINS": ""
},
"addressSpaceId": "default"
}
],
"metadata": {
"size": 0,
"totalElements": 20,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
vRealize Automation customers often experiment with system artifacts in their development or
staging deployments. When ready, they can use the content management service to move the
artifacts to production environments or between different tenants.
Issue Consideration
Approval policies and entitlements You cannot import or export approval policies or
entitlements.
Required secure property values If you export a blueprint that has the option --secure
true, the values are removed during the export process.
If the secure property is marked required, the import
process will fail unless you update the package with the
secure property values before you import it.
Draft state You cannot import or export any content that is in a draft
state.
For consistency with other service examples, each example lists a curl command. However the
content management service provides a convenient mechanism for moving artifacts between
systems using the CloudClient interface. With CloudClient, there is no need to set heading
values, including the Authorization header. The $vRA//$servicename/api is eliminated from the
URL and the service name becomes a separate parameter. For example, consumer/entitled
CatalogItems/{id}/request/template. See Using vRealize CloudClient.
XaaS services are integrated with the content management service, and all commands that work
with other content types also work with XaaS content to migrate XaaS content into vRealize
Automation.
1 id: Blueprint.CentOSAndApache
2. name: CentOSAndApache
3. status: PUBLISHED
4. components:
5. web:
6. type: Infrastructure.CatalogItem.Machine.Virtual.vSphere
7. data:
8. cpu: 1
9. memory:
10. min: 512
11. max: 8192
12. os_type: Linux
13. os_distribution: rhel
14. action: LinkedClone
15. archive_days: 1
16. provisioning_workflow: {id: CloneWorkflow}
17. lease_days: 3
18. source_machine_name: cbp_centos_63_x86
19. cost_center: sales
20. _cluster: 2
21. apache:
22. type: Software.Apache
23. data:
n Lines 1 - 4 represent possible top level blueprint fields that provide identifying information.
The only other possible field is description. The semantics of these fields is straightforward,
but you can refer to java.classBlueprintDocument for more information.
n Line 4 represents the blueprint components. Each key under components is the ID of the
component that must be unique under the current blueprint.
n Lines 5 - 19 correspond to the Web component. The following appear under any component
data:
n The key type is mandatory and must refer to the component type on which the current
component is based.
n The key dependsOn is optional and contains the list of component IDs current component
depends on. Component dependencies are extracted automatically based on property
binding expressions. In most cases, you do not need to explicitly specify component
dependencies.
n The key data defines the component configuration and appears under all component
data.
n Key is the name of the property or field of that component. This can be a property
defined in the corresponding component type.
n The value of the field can be directly defined as in cpu: 2, or you can defines its
constraints, as done for the memory field in the example.
n Line 16 shows how to specify and entity reference field. The available sub-keys are id and
label.
n ${<field_path>} provides a way to express the value of a field to come from another
field.
n _resource is a reserved field ID that captures the output of entire blueprint. Output from
each component is exposed under the same key as component ID. So in this case, host
value is set to the output of the web component thus saying the apache component needs
to be hosted on machine provisioned from the web component.
Blueprint Constraints
To define constraints in any blueprint field. create a new hierarchy or level in YAML, and use any
of the keys below to define constraints and their values.
Blueprint Components
The blueprint schema can include multiple components each with a corresponding API service.
VM node IaaS
Containers IaaS
For detailed information regarding each component and its corresponding service, see the
Swagger specification available as https://$vRA/component-registry/services/docs#!/
apis where $vRA denotes an instance of vRealize Automation.
n Log in to vRealize Automation with an appropriate role. For example: Software Architect,
Application Architect, Infrastructure Architecture or some combination of these depending on
the need.
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
The REST API supports import and export of the following registered content types:
n XaaS-blueprint
n XaaS-resource-action
n XaaS-resource-type
n XaaS-resource-mapping
curl Command
The following example command returns a list of supported content types.
JSON Output
The following JSON output is returned based on the command input.
{
"links": [
],
"content": [
{
"@type": "ContentType",
"id": "property-group",
"name": "Property Group",
"description": "Content type corresponding to the property groups.",
"classId": "PropertyGroup",
"serviceTypeId": "com.vmware.csp.core.properties.service"
},
{
"@type": "ContentType",
"id": "property-definition",
"name": "Property Definition",
"description": "Content type corresponding to the property definitions.",
"classId": "PropertyDefinition",
"serviceTypeId": "com.vmware.csp.core.properties.service"
},
{
"@type": "ContentType",
"id": "composite-blueprint",
"name": "Composite Blueprint Content Type",
"description": "The content type corresponding to the composite blueprint",
"classId": "Composite.Blueprint",
"serviceTypeId": "com.vmware.csp.component.cafe.composition"
},
{
"@type": "ContentType",
"id": "asd-blueprint",
"name": "{com.vmware.csp.core.designer.service@service.blueprint.content.type.name}",
"description":
"{com.vmware.csp.core.designer.service@service.blueprint.content.type.description}",
"classId": "asdServiceBlueprint",
"serviceTypeId": "com.vmware.csp.core.designer.service"
},
{
"@type": "ContentType",
"id": "asd-resource-action",
"name": "{com.vmware.csp.core.designer.service@resource.action.content.type.name}",
"description":
"{com.vmware.csp.core.designer.service@resource.action.content.type.description}",
"classId": "asdResourceAction",
"serviceTypeId": "com.vmware.csp.core.designer.service"
},
{
"@type": "ContentType",
"id": "asd-resource-type",
"name": "{com.vmware.csp.core.designer.service@resource.type.content.type.name}",
"description":
"{com.vmware.csp.core.designer.service@resource.type.content.type.description}",
"classId": "asdResourceType",
"serviceTypeId": "com.vmware.csp.core.designer.service"
},
{
"@type": "ContentType",
"id": "asd-resource-mapping",
"name": "{com.vmware.csp.core.designer.service@resource.mapping.content.type.name}",
"description":
"{com.vmware.csp.core.designer.service@resource.mapping.content.type.description}",
"classId": "asdResourceMapping",
"serviceTypeId": "com.vmware.csp.core.designer.service"
},
{
"@type": "ContentType",
"id": "software-component",
"name": "Software Component Content Type",
"description":
"{com.vmware.csp.component.software.service@software.component.content.type.description}",
"classId": "softwareComponentType",
"serviceTypeId": "com.vmware.csp.component.software.service"
}
],
"metadata": {
"size": 20,
"totalElements": 9,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Input
Use the supported input parameters with your query URL to control command output. .
$top The number of returned entries from the top of the response (total number per page in Query
relation to skip).
$filter Boolean expression for whether a particular entry should be included in the response. Query
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
Content n id: The unique identifier for the content. This is also
used as a folder name to group similar content
artifacts.
n name: The name of a given content type provided in
localized message key form.
n description: Additional information describing the
content type.
n classId: The class identifier associated with a content
type.
n serviceTypeId: The service ID for the given content
type.
specific context. Content can be represented in a file in different formats, such as XML, JSON, or
a package of files.
curl Command
The following command displays a list of all available content in your vRealize Automation
deployment.
JSON Output
The output includes published artifacts such as blueprints, software, and properties.
{
"links": [],
"content": [
{
"@type": "Content",
"id": "6ba58cb4-257d-4833-b2dc-f090f92f86be",
"contentId": "3482e3a7-c6c2-4372-b8e1-0db517b93406",
"name": "Echo String",
"description": null,
"contentTypeId": "asd-blueprint",
"mimeType": null,
"tenantId": "qe",
"subtenantId": null,
"dependencies": [],
"createdDate": "2015-08-18T19:14:54.899Z",
"lastUpdated": "2015-08-18T19:14:54.899Z",
"version": 0
},
{
"@type": "Content",
"id": "079cc912-b870-4f56-a1c3-91905526b09d",
"contentId": "NicksBP",
"name": "Nick's BP",
"description": "Nick's BP",
"contentTypeId": "composite-blueprint",
"mimeType": null,
"tenantId": "qe",
"subtenantId": null,
"dependencies": [],
"createdDate": "2015-08-18T20:14:57.299Z",
"lastUpdated": "2015-08-18T20:14:57.299Z",
"version": 0
},
{
"@type": "Content",
"id": "9795e97f-7025-44f9-9a57-f59242a7775d",
"contentId": "de81f329-cb72-4099-b831-309db708833b",
"name": "TestMapping",
"description": null,
"contentTypeId": "asd-resource-mapping",
"mimeType": null,
"tenantId": "qe",
"subtenantId": null,
"dependencies": [],
"createdDate": "2015-08-18T20:53:25.062Z",
"lastUpdated": "2015-08-18T20:53:25.062Z",
"version": 0
},
{
"@type": "Content",
"id": "3922fda1-b5fd-4c51-997d-5f803ec6fb6e",
"contentId": "e8ae6093-18a9-4ec9-a415-1ef850f243f9",
"name": "CustomRes",
"description": null,
"contentTypeId": "asd-resource-type",
"mimeType": null,
"tenantId": "qe",
"subtenantId": null,
"dependencies": [],
"createdDate": "2015-08-18T20:56:11.052Z",
"lastUpdated": "2015-08-18T20:56:11.052Z",
"version": 0
},
{
"@type": "Content",
"id": "4754ad69-a6a7-447f-96de-2ed6fa260f7c",
"contentId": "Software.Apache_LB",
"name": "Apache_LB",
"description": "Apache 2.2 The Apache HTTP Server is an open-source HTTP server for
modern operating systems including UNIX, Microsoft Windows, Mac OS/X and Netware. The goal
of this project is to provide a secure, efficient and extensible server that provides HTTP
services observing the current HTTP standards. Apache has been the most popular web server on
the Internet since April of 1996.",
"contentTypeId": "software-component",
"mimeType": null,
"tenantId": "qe",
"subtenantId": null,
"dependencies": [],
"createdDate": "2015-08-18T21:31:43.094Z",
"lastUpdated": "2015-08-18T21:31:44.133Z",
"version": 1
},
{
Input
Use the supported input parameters with your query URL to control command output.
$top The number of returned entries from the top of the response (total number per page in Query
relation to skip).
$filter Boolean expression for whether a particular entry should be included in the response. Query
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
Parameter Description
curl Command
The following command filters content by the contentTypeId named composite-blueprint.
JSON Output
In this example, the returned IDs correspond to composite blueprints that meet the filtering
criteria.
{
"links": [],
"content": [
{
"@type": "Content",
"id": "9b348c29-88ff-4fa8-b93e-f80bc7c3e723",
"contentId": "vSphere",
"name": "vSphere",
"description": "vSphere",
"contentTypeId": "composite-blueprint",
"mimeType": null,
"tenantId": "qe",
"subtenantId": null,
"dependencies": [],
"createdDate": "2015-08-04T14:46:54.201Z",
"lastUpdated": "2015-08-04T16:59:30.488Z",
"version": 1
},
{
"@type": "Content",
"id": "968ae331-1ef2-44f8-bdc5-dfc2be78ca2f",
"contentId": "Amazon",
"name": "Amazon",
"description": "Amazon",
"contentTypeId": "composite-blueprint",
"mimeType": null,
"tenantId": "qe",
"subtenantId": null,
"dependencies": [
"9e2005c3-c56e-48d0-801c-be36851f2b08"
],
"createdDate": "2015-08-04T20:47:20.308Z",
"lastUpdated": "2015-08-04T20:47:20.308Z",
"version": 0
}
],
"metadata": {
"size": 20,
"totalElements": 2,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Input
Output
The command output contains property names and values based on the command input
parameters.
n The package is a logical unit that enables you to piece together different content elements.
n To obtain the IDs of content that is available for export, you use GET /api/contents.
See List Available Content Example.
A package represents an entity that you can export or import via the content management
service. A set of references to the content instances can be bundled together as a package.
curl Command
The following command creates a package named Demo Package with a single content ID of
9b348c29-88ff-4fa8-b93e-f80bc7c3e723.
JSON Output
The JSON output is a URL for the created package.
Input
Parameter Description
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
Parameter Description
curl Command
The following command lists the packages within the content service.
JSON Output
The following output lists all packages within the content service.
{
"links": [
],
"content": [
{
"@type": "Package",
"createdDate": "2015-08-04T22:22:53.490Z",
"lastUpdated": "2015-08-04T22:22:53.490Z",
"version": 0,
"id": "54f627bb-2277-48af-9fa0-7d7366b498f3",
"name": "Demo Package",
"description": "Package for demo purposes",
"contents": [
"9b348c29-88ff-4fa8-b93e-f80bc7c3e723"
],
"tenantId": "qe",
"subTenantId": null
}
],
"metadata": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Input
You must provide the appropriate request parameters to list packages within the content service.
$top The number of returned entries from the top of the response (total number per page in Query
relation to skip).
$filter Boolean expression for whether a particular entry should be included in the response. Query
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
Parameter Description
curl Command
The following command exports a package as a .zip file.
JSON Output
The export command returns a message that indicates whether or not the package was
exported. A successful export produces a package.zip exported to the specified location. The
returned message is '200 - Successes' with the Package or 404 - 'Not Found' if it does not find
a package with provided ID.
Input
The query URL for the export command must specify the ID of the package to export.
secureValueFormat The format in which secure values should be sent. This Query
parameter is optional and defaults to "BLANKOUT".
Output
The output of this command is a .zip file.
curl Command
The following command validates a content bundle prior to importing it. This example uses
the DukesBankApp.zip file which is provided on the vRealize Automation virtual appliance.
You can copy the file from /usr/lib/vcac/tools/initial-config/sample-oob-content/
DukesBankApp.zip using WinSCP (Windows) or scp (Mac).
JSON Output
The validation output displays the validation status of each content item within the bundle.
{
"contentImportStatus": "SUCCESS",
"contentImportResults": [
{
"contentId": "Apache_LB",
"contentName": "Apache_LB",
"contentTypeId": "software-component",
"contentImportStatus": "SUCCESS",
"contentImportErrors": null
},
{
"contentId": "MySql",
"contentName": "MySql",
"contentTypeId": "software-component",
"contentImportStatus": "SUCCESS",
"contentImportErrors": null
},
{
"contentId": "JBossAppServer",
"contentName": "JBossAppServer",
"contentTypeId": "software-component",
"contentImportStatus": "SUCCESS",
"contentImportErrors": null
},
{
"contentId": "Dukes-Bank-DB-setup",
"contentName": "Dukes-Bank-DB-setup",
"contentTypeId": "software-component",
"contentImportStatus": "SUCCESS",
"contentImportErrors": null
},
{
"contentId": "Dukes_Bank_App",
"contentName": "Dukes_Bank_App",
"contentTypeId": "software-component",
"contentImportStatus": "SUCCESS",
"contentImportErrors": null
},
{
"contentId": "DukesBankApplication",
"contentName": "DukesBankApplication",
"contentTypeId": "composite-blueprint",
"contentImportStatus": "SUCCESS",
"contentImportErrors": null
}
]
}
Input
You can use optional request parameters with your query URL to customize the returned
content.
resolution mode The resolution mode to be used for performing validation query
when the same entity exists in the system. Valid values are
SKIP, OVERWRITE. SKIP will not update the existing entity
with the new content while OVERWRITE will update the old
entity with the new data. In case the resolution mode is not
explicitly provided the default mode OVERWRITE will be used
for conflict resolution.
Output
The package validation response body contains the following parameters.
Parameter Description
contentImportSta Over all status of the import/validation operation, one failure in import/validation result guarantees
tus failed status. Values are as follows:
n Success - Denotes the successful import or validation status at a particular component or
package level.
n Failed - Denotes an import or validation failure at a particular component package level.
n Warning - Denotes a scenario that warrants a system level warning. Alerts the user about a
possible error condition that the proposed action may create.
contentImportRes Set of collected content import/validation results populated by the provider. The Content import
ults operation result collection is the set of content that passed or failed. If failed the errors are
populated in ContentImportError. Properties are as follows:
n contentId - (string) Unique content ID within the file system.
n contentName - (anyType) Name of the content being imported.
n contentTypeId - (string) The ID for the content type being exported. This matches the folder
structure in the exported zip.
n contentImportStatus - Track the failed or succeeded status of an entity.
n messages - Information returned by the provider.
n contentImportErrors - Set of errors returned by the provider.
curl Command
The following command imports a .zip file. This example uses the DukesBankApp.zip
file which is provided on the vRealize Automation virtual appliance. You can copy the
file from /usr/lib/vcac/tools/initial-config/sample-oob-content/DukesBankApp.zip
using WinSCP (Windows) or scp (Mac).
To verify success of a package import, use vRealize Automation to view the imported items on
the target system.
JSON Output
The following JSON output is returned on the command input.
{
"contentImportStatus": "SUCCESS",
"contentImportResults": [
{
"contentId": "Apache_LB",
"contentName": "Apache_LB",
"contentTypeId": "software-component",
"contentImportStatus": "SUCCESS",
"contentImportErrors": null
},
{
"contentId": "MySql",
"contentName": "MySql",
"contentTypeId": "software-component",
"contentImportStatus": "SUCCESS",
"contentImportErrors": null
},
{
"contentId": "JBossAppServer",
"contentName": "JBossAppServer",
"contentTypeId": "software-component",
"contentImportStatus": "SUCCESS",
"contentImportErrors": null
},
{
"contentId": "Dukes-Bank-DB-setup",
"contentName": "Dukes-Bank-DB-setup",
"contentTypeId": "software-component",
"contentImportStatus": "SUCCESS",
"contentImportErrors": null
},
{
"contentId": "Dukes_Bank_App",
"contentName": "Dukes_Bank_App",
"contentTypeId": "software-component",
"contentImportStatus": "SUCCESS",
"contentImportErrors": null
},
{
"contentId": "DukesBankApplication",
"contentName": "DukesBankApplication",
"contentTypeId": "composite-blueprint",
"contentImportStatus": "SUCCESS",
"contentImportErrors": null
}
]
}
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
contentImportSta Over all status of the import/validation operation, one failure in import/validation result guarantees
tus failed status. Values are as follows:
n Success - Denotes the successful import or validation status at a particular component or
package level.
n Failed - Denotes an import or validation failure at a particular component package level.
n Warning - Denotes a scenario that warrants a system level warning. Alerts the user about a
possible error condition that the proposed action may create.
contentImportRes Set of collected content import/validation results populated by the provider. The Content import
ults operation result collection is the set of content that passed or failed. If failed the errors are
populated in ContentImportError. Properties are as follows:
n contentId - (string) Unique content ID within the file system.
n contentName - (anyType) Name of the content being imported.
n contentTypeId - (string) The ID for the content type being exported. This matches the folder
structure in the exported zip.
n contentImportStatus - Track the failed or succeeded status of an entity.
n messages - Information returned by the provider.
n contentImportErrors - Set of errors returned by the provider.
curl Command
The following command exports an XaaS package as a .zip file at the specified location.
JSON Output
The output of a successful export command is a .zip file at the specified location.
Input
Table 13-6. XaaS Import Input Parameters
Name Parameter
Output
curl Command
The following command imports a file called XaaSContent.zip.
JSON Output
The output of the command is a message indicating the status and details of the import
operation.
{
"importStatus" : "SUCCESSFUL",
"data" : [ {
"logLevel" : "INFO",
"entityType" : "com.vmware.vcac.designer.service.domain.ServiceBlueprint",
"entityId" : "4740aa54-61e6-47d7-945f-0bb50ff153c8",
"entityName" : "XaaSBlueprint",
"messageKey" : "import.blueprint.success",
"message" : "Success"
} ]
}
Input
Table 13-7. XaaS Import Input Parameters
Name Parameter
file Identifies the .zip file that is the content bundle to import.
prefix The prefix to use with imported objects. Ensures avoidance of a duplicate name failure.
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
importStatus Over all status of the import/validation operation, one failure in import/validation result
guarantees failed status. Values are as follows:
n Successful - Denotes the successful import or validation status at a particular
component or package level.
n Partial - Denotes a scenario that warrants a system level warning. Alerts the user
about a possible error condition that the proposed action may create.
n Failed - Denotes an import or validation failure at a particular component package
level.
data Set of collected content import/validation results populated by the provider. The
Content import operation result collection is the set of content that passed or failed:
n entityType - (string) The ID for the entity being imported.
n entitytId - (string) Unique content ID within the file system.
n messageKey - (string)
n logLevel - The logging level to use for any errors that occur.
n message - Information returned by the provider.
n entityName - (anyType) Name of the entity being imported.
As a vRealize Automation system administrator, you can change the tenancy of a security group,
security tag, or security policy. The tenancy levels are:
n Global — Security object visible to all tenants with a reservation on the specific endpoint in
which the security object exists. To indicate that a tenancy is global, the tenantID must be set
to null.
This use case example updates the tenant ID for a security group, but the same procedure
applies to security tags and security policies using similar APIs such as:
n /network-service/api/security-tags/{id}
n /network-service/api/security-policies/{id}
Prerequisites
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
Procedure
For details regarding input and output for this request, see Syntax for Retrieving Security
Groups.
Name the JSON file updateTenantId.json and set the tenant ID to a single tenant named
rainpole.
{
"@type": "SecurityGroup",
"id": "24",
"name": "security-group-name",
"description": "Managed by VMware vRealize Automation",
"externalId": "securitygroup-19567",
"tenantId": "rainpole",
"extensionData": {
"entries": [...]
},
"securityGroupTypeId": "Infrastructure.Network.SecurityGroup.NSX",
"internal": false,
"machineIdCollection": null,
"ipAddressCollection": null
}
3 Submit a request to update the security group with ID=24 that calls the JSON file.
For details regarding input and output for this request see Syntax for Updating a Tenant ID .
4 Examine the response to verify that the security group has the tenant you specified.
Results
With the tenancy changed to rainpole, rainpole is the only tenant on this endpoint that can now
see the security group with ID=24 .
Input
Use the supported input parameters to control the command output.
Parameter Description
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
Content Specifies an array of data rows, each of which represents one of the security objects
returned in a pageable list. Each security object can contain the following information:
n id: Specifies the unique security object identifier.
n name: Specifies the name of the security object.
n description: Specifies a description of the security object.
n externalId: Specifies the external ID of the security object.
n tenantId: Specifies the tenant ID value. Default value is null.
n extensionData: Contains an array of Literals name "entries". Each Literanl contains a
key and a value. The value, in turn, contains a type (such as a string or integer) and
the Literal's value.
n securityGroupTypeId: For internal use only. Applies to security groups only.
n internal: For internal use only. Applies to security groups only.
n machineIdCollection: For internal use only. Applies to security groups only.
n ipAddressCollection: For internal use only. Applies to security groups only.
The response in JSON lists the information for the security group specified.
{
"links": [],
"content": [
{
"@type": "SecurityGroup",
"id": "24",
"name": "security-group-name",
"description": "Managed by VMware vRealize Automation",
"externalId": "securitygroup-19567",
"tenantId": null,
"extensionData": {
"entries": [...]
},
"securityGroupTypeId": "Infrastructure.Network.SecurityGroup.NSX",
"internal": false,
"machineIdCollection": null,
"ipAddressCollection": null
}
],
}
Input
Use the supported input parameters to control the command output.
Parameter Description
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
Parameter Description
$tenantId Specifies the tenant ID value. Valid values are: <unscoped>, null, and tenant_name,
where:
n "tenantID": "<unscoped>" — Hides the security object from all tenants.
n "tenantID": null — Specifies global tenancy. The object is visible to all tenants
with a reservation on the specific endpoint in which the security object exists.
n "tenantID": "my_tenant_example" — The security object is only visible to the
tenant named my_tenant_example.
$extensionData Contains an array of Literals name "entries". Each Literanl contains a key and a value.
The value, in turn, contains a type (such as a string or integer) and the Literal's value.
{
"@type": "SecurityGroup",
"id": "$securityId",
"name": "$securityName",
"description": "$description",
"externalId": "$externalId",
"tenantId": "$tenantId",
"extensionData": {
"entries": [...]
},
"securityGroupTypeId": "$securityGroupTypeId",
"internal": false,
"machineIdCollection": null,
"ipAddressCollection": null
}
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
Links Specifies an array of link objects, each of which contains the following parts:
n rel: Specifies the name of the link.
n Self refers to the object that was returned or requested. This property does
not exist when you query for a single profile.
n First, Previous, Next, and Last refer to corresponding pages of pageable
lists.
n Specifies the application or service that determines the other names.
n href: Specifies the URL that produces the result.
Content Specifies an array of data rows, each of which represents one of the security objects
returned in a pageable list. Each security object can contain the following information:
n id: Specifies the unique security object identifier.
n name: Specifies the name of the security object.
n description: Specifies a description of the security object.
n externalId: Specifies the external ID of the security object.
n tenantId: Specifies the tenant ID value. Default value is null.
n extensionData: Contains an array of Literals name "entries". Each Literanl contains a
key and a value. The value, in turn, contains a type (such as a string or integer) and
the Literal's value.
n securityGroupTypeId: For internal use only. Applies to security groups only.
n internal: For internal use only. Applies to security groups only.
n machineIdCollection: For internal use only. Applies to security groups only.
n ipAddressCollection: For internal use only. Applies to security groups only.
Example: curl Command to Update the Tenant ID for a Security Group With
JSON File
The following sample updateTenantId.json file contains parameters for the request to update
a security group with ID=24.
{
"@type": "SecurityGroup",
"id": "24",
"name": "security-group-name",
"description": "Managed by VMware vRealize Automation",
"externalId": "securitygroup-19567",
"tenantId": "my_tenant_example",
"extensionData": {
"entries": [...]
},
"securityGroupTypeId": "Infrastructure.Network.SecurityGroup.NSX",
"internal": false,
"machineIdCollection": null,
"ipAddressCollection": null
}
The following example requests a tenant ID update for security group with ID=24 by calling the
updateTenantId.json file.
Example: curl Command to Update the Tenant ID for a Security Group With
Parameters Inline
The following example requests a tenant ID update for security group with ID=24 with input
parameters specified inline.
On-demand directory synchronization brings users and groups into vRealize Automation without
reading and saving the active directory configuration first. In this way, you can automate the
process.
Prerequisites
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
Procedure
For details regarding input and output for this request, see Syntax for Retrieving Directories.
2 Examine the result to find the domain name of the directory for which you want to initiate
synchronization.
{
"@type": "IdentityStore",
"domain": "demo.ad-example.local",
"name": "Demo AD for sync",
"description": "Demo AD for sync",
"alias": "",
"type": "AD",
...
}
In this example, the directory is Demo AD for sync with domain name demo.ad-
example.local.
For details regarding input and output for this request, see Syntax for Synchronizing the
Active Directory.
For details regarding input and output for this request, see Syntax for Checking the
Synchronization Process.
{
"syncStatus": {
"status": "RUNNING",
"message": null
}
}
Results
When the synchronization process completes successfully, the status is COMPLETED and the
directory with the name Demo AD for sync appears with synced groups and users under
Administration > Directories in the vRealize Automation interface.
Input
Use the supported input parameters to control the command output.
Parameter Description
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
Links Specifies an array of link objects, each of which contains the following parts:
n rel: Specifies the name of the link.
n Self refers to the object that was returned or requested. This property does
not exist when you query for a single profile.
n First, Previous, Next, and Last refer to corresponding pages of pageable
lists.
n Specifies the application or service that determines the other names.
n href: Specifies the URL that produces the result.
Content Specifies an array of data rows, each of which represents one of the objects returned
in a pageable list. Each object can contain the following information:
n domain: Specifies the domain name for the directory.
n name: Specifies the name of the directory.
n description: Specifies a description of the directory.
n alias: Specifies the alternate name of the directory, if applicable.
n type: Specifies the type of directory, such as active directory or local directory.
The response in JSON lists the information for the tenant specified.
{
"links": [],
"content": [
{
"@type": "IdentityStore",
"domain": "domain_name1",
"name": "Active Directory Example 1",
"description": "Active Directory Example 1",
"alias": "",
"type": "AD",
...
}
{
"@type": "IdentityStore",
"domain": "domain_name2",
"name": "Active Directory Example 2",
"description": "Active Directory Example 2",
"alias": "",
"type": "AD",
...
}
],
"metadata": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Input
Use the supported input parameters to control the command output.
Parameter Description
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
404 NOT FOUND The domain name is incorrect or there is no such domain
in the tenant. For example:
Input
Use the supported input parameters to control the command output.
Parameter Description
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
The response in JSON provides the status of the synchronization process. The following example
is a positive response that shows the synchronization is running.
{
"syncStatus": {
"status": "RUNNING",
"message": null
},
}
A configuration includes one or more test suites that you create and run on a schedule to check
the health of your vRealize Automation or vRealize Orchestrator installation. vRealize Automation
Health Service is a plug-in to vRealize Automation, and each configuration corresponds to a tile
on the Health page of the user interface.
This example shows how to retrieve results for the latest execution of a health test configuration.
You can also retrieve results for tests executed at a different time.
Prerequisites
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
Procedure
1 Use the health broker proxy server to get an authentication token for the health services API.
For details regarding input and output for this request, see Syntax for Requesting a Health
Services Token.
A successful request returns an authentication token that you include in subsequent API
requests.
export healthtoken="EXAMPLE-HEALTH-TOKEN-TEXT"
For details regarding input and output for this request see Syntax to Retrieve a List of
Configurations.
"documentLinks": [
"/health/config/configurations/80dc3a6f1478553368707000",
"/health/config/configurations/8277769f1478213933292000",
"/health/config/configurations/80dc3a6f1478545923685000"
],
Every time the Health Broker runs a test configuration, an execution is created.
5 Submit a request to find the latest execution for one of the health test configurations.
{
"taskInfo": {
"isDirect": true
},
"querySpec": {
"query": {
"occurance": "MUST_OCCUR",
"booleanClauses": [{
"occurance": "MUST_OCCUR",
"term": {
"propertyName": "documentKind",
"matchValue": "com:vmware:healthbroker:states:ExecutionServiceState",
"matchType": "TERM"
}
},
{
"occurance": "MUST_OCCUR",
"term": {
"propertyName": "configurationLink",
"matchValue": "/health/config/configurations/8277769f1478213933292000",
"matchType": "TERM"
}
}]
},
"sortTerm": {
"propertyName": "startedTimestamp",
"propertyType": "LONG"
},
"sortOrder": "DESC",
"resultLimit": 1,
"options": ["TOP_RESULTS",
"EXPAND_CONTENT",
"SORT"]
}
}
For details regarding input and output for this request see Syntax to Filter for Latest
Execution of a Configuration .
6 Examine the execution document contained in the response to find the overallResultLink.
"overallResultsLink": "/health/result/overall-results/Report_vRA_20161103-22.59.03.0373",
7 Submit a request to find all the individual results for the latest execution.
The query body specifies the value for the overallResultsLink as the value to match.
{
"taskInfo": {
"isDirect": true
},
"querySpec": {
"query": {
"occurance": "MUST_OCCUR",
"booleanClauses": [{
"occurance": "MUST_OCCUR",
"term": {
"propertyName": "documentKind",
"matchValue":
"com:vmware:healthbroker:states:IndividualTestResultServiceState",
"matchType": "TERM"
}
},
{
"occurance": "MUST_OCCUR",
"term": {
"propertyName": "overallResultsLink",
"matchValue": "/health/result/overall-results/
Report_vRA_20161103-22.59.03.0373",
"matchType": "TERM"
}
}]
},
"sortTerm": {
"propertyName": "state",
"propertyType": "STRING"
},
"sortOrder": "DESC",
"options": ["EXPAND_CONTENT",
"SORT"]
}
}
For details regarding input and output for this request see Syntax to Find All Individual
Results.
Results
{
"testMethod": {
"name": "vRealize Automation Node Common Name Certificate Check",
"description": "This test case verifies that the vRA node certificate Common names match
that of it's server. This test is most useful for distributed/HA environments.",
"descriptionType": "text",
"severity": "CRITICAL",
"methodName": "areVraNodeCertsCommonNameValid",
"accessLevel": "INFRASTRUCTURE",
"enabled": false,
"configurationReferences": []
},
"startTime": "1478213951731",
"endTime": "1478213960684",
"state": "FAILED",
"message": "Not all checks were successful. See the following errors for more
details: \njava.io.IOException: Unable to get the certificate of your server [cava-
pn-210-066.eng.vmware.com:443]. Please confirm configuration information. The returned
exception is: [java.net.UnknownHostException: cava-pn-210-066.eng.vmware.com] \n",
"remediationType": "html",
"remediation": "http://kb.vmware.com/selfservice/microsites/search.do?
language=en_US&cmd=displayKC&externalId=2106583",
"overallResultsLink": "/health/result/overall-results/Report_vRA_20161103-22.59.03.0373",
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA/healthbroker-proxy-server/api/authn/all
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
Output
The output is a text file with the token to authenticate to the health services API.
The text response is the authentication token for requests to the health services API.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA:8090/health/config/configurations
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
$healthtoken Specifies a valid authentication token for the health services API.
Note The request does not use the API endpoint so healthbroker-proxy-service/api is not
used.
Output
The command output contains property names and values based on the command input
parameters.
Parameter Description
Content Specifies an array of data rows, each of which represents one of the objects returned
in a pageable list. Each object can contain the following information:
n documentLinks: Specifies the configurations.
n documentCount: Specifies the number of configurations
n queryTimeMicros: Specifies
n documentOwner: Specifies
{
"documentLinks": [
"/health/config/configurations/12858d4c34f278755680551b52340"
],
"documentCount": 1,
"queryTimeMicros": 3000,
"documentVersion": 0,
"documentUpdateTimeMicros": 0,
"documentExpirationTimeMicros": 0,
"documentOwner": "213feac8-675e-49da-b882-0fca7149962a"
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA:8090/core/health-query-tasks
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
$healthtoken Specifies a valid authentication token for the health services API.
Note The request does not use the API endpoint so healthbroker-proxy-service/api is not
used.
400 BAD REQUEST The data you provided in the POST failed validation.
Inspect the response body for details.
"EXPAND_CONTENT",
"SORT"]
}
}
{
"taskInfo": {
...
},
"querySpec": {
"query": {
...
}
},
"results": {
"documentLinks": [
"/health/exec/executions/12858d4c34f278755680551d322f0"
],
"documents": {
"/health/exec/executions/12858d4c34f278755680551d322f0": {
"configurationLink": "/health/config/configurations/
12858d4c34f278755680551b52340",
"started": "2018-03-22T19:29:00.471Z",
"overallResultsLink": "/health/result/overall-results/Report_089adaf3-44d3-4cb2-
a1a5-d2de4f376e73-20180322-19.29.00.0471",
...
},
...
},
}
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$vRA:8090/core/health-query-tasks
$vRA Specifies the appliance name and fully qualified domain name, or IP address of the
vRealize Automation server.
$healthtoken Specifies a valid authentication token for the health services API.
Note The request does not use the API endpoint so healthbroker-proxy-service/api is not
used.
400 BAD REQUEST The data you provided in the POST failed validation.
Inspect the response body for details.
Example: curl Command to Retrieve all the Individual Results for the Latest
Execution
The following example command retrieves the individual results for the
execution named /health/result/overall-results/Report_089adaf3-44d3-4cb2-a1a5-
d2de4f376e73-20180322-19.29.00.0471.
"term": {
"propertyName": "overallResultsLink",
"matchValue": "/health/result/overall-results/Report_089adaf3-44d3-4cb2-
a1a5-d2de4f376e73-20180322-19.29.00.0471",
"matchType": "TERM"
}
}]
},
"sortTerm": {
"propertyName": "state",
"propertyType": "STRING"
},
"sortOrder": "DESC",
"options": ["EXPAND_CONTENT",
"SORT"]
}
}
{
"taskInfo": {
...
},
"querySpec": {
"query": {
...
}
},
"results": {
"documentLinks": [
"/health/exec/executions/12858d4c34f278755680551d322f0"
],
"documents": {
"/health/result/individual-result/Report_089..." : {
"testMethod": {
"name": "Check Storage Reservation Policy to Reservation
Assignments",
"description": "This test collects all storages that are assigned
a storage reservation policy(from all tenants), and checks them against created
reservations(in the specified tenant) to see if that storage is assigned to a
reservation.",
"descriptionType": "text",
"severity": "NORMAL",
"methodName":
"CheckIfAllStorageReservationPoliciesAreAssignedToReservations",
"accessLevel": "NORMAL",
"enabled": false,
"configurationReferences": []
},
"startTime": "1521746961853",
"endTime": "1521746962763",
"state": "FAILED",
"message": "[Storage reservation policy [Rainpole High Speed] is assigned
to storage [Datastore1], but the storage is not in any reservation in tenant [rainpole].]
\n[Storage reservation policy [Rainpole Low Cost] is assigned to storage [VNXe:nsx61-data1],
but the storage is not in any reservation in tenant [rainpole].]\n[Storage reservation policy
[Rainpole High Speed] is assigned to storage [VNXe:nsx61-data2], but the storage is not in
any reservation in tenant [rainpole].] expected [false] but found [true]",
"remediationType": "html",
"remediation":
"http://pubs.vmware.com/vrealize-automation-72/index.jsp#com.vmware.vrealize.automation.doc/
GUID-95AADE6A-4CE2-4AC9-9D1F-1E42DC3E52FF.html",
"overallResultsLink": "/health/result/overall-results/
Report_089adaf3-44d3-4cb2-a1a5-d2de4f376e73-20180322-19.29.00.0471",
...
},
...
},
...
},
...
}
SNMP uses http://www.net-snmp.org with customization to hide the plain text passwords
from the configuration file. The VMware SNMP daemon or vSNMPD is the vRealize Automation
implementation of SNMP. vSNMPD facilitates the monitoring of vRealize Automation node
resources such as CPU, memory, or disk space.
As a system administrator, you can use vSNMPD as an early warning system to prevent a
vRealize Automation slowdown. For example, if vSNMPD sends a message about high CPU
usage, you can scan your processes to find the one that is the most CPU intensive. You can also
further investigate the correlation between CPU, memory, and disk usage. Using your current
tools, all network and system monitoring is secure because vSNMPD uses SNMPv3.
The Swagger document for configuration services is available at the following URL.
https://$vRA:5480/config/
Prerequisites
Satisfy the following conditions before using the SNMP service.
n Verify that the appliance name and fully qualified domain name of the vRealize Automation
instance are available.
n Verify that you have a valid HTTP bearer token that matches your login credentials. See
Chapter 2 REST API Authentication.
Local SNMP only runs on the localhost. To access the service using the REST API on VAMI
port 5480, you use the URL https://$vRA:5480/config#/vSNMP-local-daemon. To maintain
network security and accessibility within your environment, leave the local SNMP daemon
running.
Before running any SNMP service requests, verify that you have satisfied the prerequisites in
Chapter 17 Using SNMP to Monitor vRealize Automation.
{
"SNMPv2-SMI::enterprises.2021.4.11.0": "6813296"
}
In this response, 6813296 is the total free memory on the SNMP device.
A snippet of the response body shows information about the network objects.
{
"SNMPv2-SMI::mib-2.6.13.1.5.127.0.0.1.37866.127.0.0.1.61613": "61613",
"SNMPv2-SMI::mib-2.6.13.1.4.10.126.188.32.58326.10.126.188.32.9300": "10.126.188.32",
"SNMPv2-SMI::mib-2.25.4.2.1.3.1532": "0.0",
"SNMPv2-SMI::mib-2.6.20.1.4.1.4.0.0.0.0.8080": "30132",
"SNMPv2-SMI::mib-2.6.13.1.1.127.0.0.1.44418.127.0.0.1.5433": "5",
...
"SNMPv2-SMI::mib-2.6.13.1.1.127.0.0.1.443.127.0.0.1.33257": "5",
"SNMPv2-SMI::enterprises.2021.4.11.0": "6727248",
"SNMPv2-SMI::mib-2.25.3.7.1.2.393232.1": "/dev/sda1",
"SNMPv2-SMI::mib-2.25.3.7.1.2.393232.2": "/dev/sda2",
...
"SNMPv2-SMI::mib-2.25.4.2.1.5.382": "",
"SNMPv2-SMI::mib-2.25.4.2.1.4.41367": "postgres: vcac vcac 127.0.0.1(38115) idle",
"SNMPv2-SMI::mib-2.25.4.2.1.4.41366": "postgres: vcac vcac 127.0.0.1(38113) idle",
"SNMPv2-SMI::mib-2.25.4.2.1.4.57817": "",
"SNMPv2-SMI::enterprises.8072.1.2.1.1.5.0.11.1.3.6.1.2.1.55.1.6.1.7.127": "0x80"
}
By using the MIB definition to access all OID data, you can see the names of all SNMP devices.
To access global SNMP using the REST API on VAMI port 5480, you use the URL https://
$vRA:5480/config#/vSNMP. The following procedure shows how to configure, enable, and start
the VMware SNMP daemon.
Prerequisites
Verify that you have satisfied the prerequisites in Chapter 17 Using SNMP to Monitor vRealize
Automation.
Procedure
{
"load": {
"load": [
[
"10",
"10",
"10"
]
],
"monitor": {
"seconds": "30"
}
},
"disk": {
"disk": [
[
"/",
"15%"
],
[
"/storage/log",
"15%"
],
[
"/storage/artifactory",
"15%"
],
[
"/storage/db",
"15%"
]
],
"monitor": {
"seconds": "10"
}
},
"proc": {
"proc": [
[
"postgres",
"1",
"300"
]
],
"monitor": {
"seconds": "60"
}
},
"file": {
"monitor": {
"seconds": "60"
},
"file": [
[
"\"/storage/db/pgdata/recovery.conf\"",
"0"
]
]
}
}
3 To change the configuration for SNMP, edit parameter values in the response and use the
new configuration as input to the request. In this example, the load monitoring period is
extended to 180 seconds.
Results
After the VMware SNMP daemon is configured and running, you can access the vRealize
Automation node agent on port 161. For authentication, you use the same user name and
password that you used to configure SNMP. To encrypt the channel, you use the same
channel_encryption_password that you used to encrypt the channel between the vSNMPD and
the SNMP server.
You can use the vRealize CloudClient to simplify your interaction with the vRealize Automation
REST API. You can also use third party tools such as Chrome Developer Tools or Firebug to
further expand your vRealize Automation REST API programming options.
For information about vRealize CloudClient, see the VMware Developer site at https://
developercenter.vmware.com/tool/cloudclient.
Creating a new OAuth2 client in vRealize Automation is a privileged operation. To create a new
OAuth2 client, the administrator must authenticate with vRealize Automation using an existing
client ID and secret.
Table 18-1. Input parameters for the vra oauth2client create command
Parameter Description
Table 18-1. Input parameters for the vra oauth2client create command (continued)
Parameter Description
In a large organization, a vRealize Automation administrator may want to create an OAuth2 client
per business group rather than per individual user. vRealize CloudClient end users in the same
business group would use the same OAuth2 client. If a user were to leave the organization, the
administrator would delete the existing OAuth2 client and create a new client for the business
group.
In addition to the access token used to authenticate the current vRealize CloudClient session,
vRealize Automation provides a refresh token that is a valid for a longer period and can be used
to obtain a new access token after the initial access token expires.
Table 18-2. Input parameters for the vra login authzcode command
Parameter Description
Table 18-3. Input parameters for the vra login refreshtoken command
Parameter Description
Table 18-3. Input parameters for the vra login refreshtoken command (continued)
Parameter Description
Cron jobs or other scheduled jobs can use vra login refreshtoken and a refresh-token to
authenticate with vRealize Automation. This avoids the browser interaction requiring username
and password credentials that is part of the vra login authzcode authentication process.
You can adapt these steps to perform a different action, such as adding a tenant.
Prerequisites
This example shows how you might use the Chrome Developer Tools to perform a catalog
service query. This option is not available for all vRealize Automation functions.
n Open a Chrome browser session and log in to the vRealize Automation console as a business
group user with access to catalog items.
n Open a command prompt or a shell and log in to the vRealize Automation command line
interface.
Procedure
3 Enter the request information for the catalog item, but do not submit your changes.
4 Press the Ctrl-Shift-I keys simultaneously to open the Chrome Developer Tools. For example:
5 Verify that the network logs in the Chrome Developer Tools contain the relevant data. For
example:
The postData section shows the JSON data passed in the HTTP POST call. You can insert the
JSON data in a JSON file, for example request.json, and submit it with the POST method in
the command line.
Note Click Clear to purge the network logs if they become too large to navigate easily.
6 Enter the following call in the vRealize Automation shell, where the request.json text file
contains the JSON data from the postData section.
This call makes the same request that was submitted by using the console.
You can use filters in your command line to limit JSON output to specific conditions. For example,
you can use a filter in a catalog item request to display only catalog items that contain a specific
catalog ID. Or you can use the requestID resource call to format the output of a command that
displays request status. You can also use an Odata equivalent to format that same information
For details, see Syntax for Getting Information for a Catalog Item.
Note You must URL encode all filter parameters when using curl commands.
You can also reduce command line errors by using a JSON formatter to validate the JSON data
and present it in an easy-to-read format.
You can use command line options or JSON formatting tools, such as Open Data Protocol
(OData), to control the JSON results of your vRealize Automation REST API commands.
To simplify your JSON output, consider using command line options or a to filter out unnecessary
data and display only the information that you are interested in, such as the following information
categories:
n Request status