7.3

Table Of Contents
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
$vRA Specifies the appliance name and fully qualified domain name,
or IP address of the vRealize Automation server.
$token Specifies a valid HTTP bearer token with necessary credentials.
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
status If the command is successful, the HTTP status is 201 Created.
Header.Location The http response should contain a Location attribute with the
following format.
https://$vRA/iaas-proxy-
provider/api/keyPairs/$keypairID
$keypairID Specifies the unique identifier of the new key pair.
Example: curl Command
curl --insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$vRA/iaas-proxy-provider/api/keyPairs -d
{
"name": "TestKeyPair",
"computeResourceId": "ca4dcca0-85ce-49dd-8371-4ce7c8e2d5e6",
Programming Guide
VMware, Inc. 295