Syntax for Updating Price Information
POST /api/blueprints/{id}/costs/upfront of the composition service, updates and displays price information for a deployment. The price of a deployment is based on which blueprint you request plus details of the specific request. For example, if the blueprint allows for a range of CPU, memory, or storage values, the price depends on the value requested.
Input
Use the supported input parameters to control the command output.
cost
in API commands and output.
Parameter | Description |
---|---|
URL |
https://$vRA/composition-service/api/blueprints/$BlueprintId/costs/upfront |
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 |
Specifies the blueprint ID for the blueprint for which you are requesting price information and other information.
|
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. |
averageDailyPriceInfo | Specifies the average daily price, which depends on the reservation available for the component. |
count | Specifies the instance count of the component. |
memory | Specifies memory requested for this component. |
additional | Specifies the additional price, if any, associated with the component. |
cpu | Specifies the cpu requested for the component. |
storage | Specifies the storage requested for the component. |
componentId | Specifies the component ID, or total price of the deployment. |
Example:
curl
Command
The following sample command updates and displays the price of a sample blueprint with one node. The HTTP body is included as part of the command line input.
cost
in API commands and output.
curl -- insecure -H “Content Type: application/json” -H "Authorization: Bearer $token" https://$vRA/composition-service/api/blueprints/$BlueprintId/costs/upfront" { "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 } } ] } } } ] } }
Example: JSON Output for a Blueprint Price Update
[{"componentId":"vSphere_Machine_1", "setupFee":"$0.00", "totalEstimatedLeasePriceInfo":{"min":50.0543225806451601,"max":50.0543225806451601,"displayString":"$50.05"}, "averageDailyPriceInfo":{"min":16.6847741935483867,"max":16.6847741935483867,"displayString":"$16.68"}, "count":3 "fieldMap":{"setup_fee":{"min":0,"max":0,"displayString":"$0.00"}, "memory":{"min":8.00,"max":8.00,"displayString":"$8.00"}, "additional":{"min":8.6847741935483867,"max":8.6847741935483867,"displayString":"$8.68"}, "cpu":{"min":0.0,"max":0.0,"displayString":"$0.00"}, "storage":{"min":0,"max":0,"displayString":"$0.00"}}}, {"componentId":"Total","setupFee":"","totalEstimatedLeasePriceInfo": {"min":50.0543225806451601,"max":50.0543225806451601,"displayString":"$50.05"}, "averageDailyPriceInfo":{"min":16.6847741935483867,"max":16.6847741935483867,"displayString":"$16.68"}, "count":3,"fieldMap":{}}]