Cloud Cruiser became HPE Consumption Analytics on Nov. 1, 2018. You'll still see the old name in places while we update this site.

 

 

Consumption Analytics Documentation

Home > Documentation for older versions > Cloud Cruiser 3 > REST API reference > Budgets and alerts > Update a budget

Update a budget

Updates a specified budget with a complete budget element you provide. If you only have the information you want to update, get the budget before updating it so that you can create a complete element.

Resource URL

PUT http://<ccServerURL>/rest/v1/budgets/budget/<id>

Request

Parameters
  Name Type Description
URL path parameters (required) id int ID of the budget to be updated
URL query parameters (optional) None
Content-Type

application/xml

Body

The budget to update with, as XML text with the root element customerBudget or JAXB type com.cloudcruiser.server.webservices.v1.dto.budgets.CustomerBudget. The budgetId attribute must have the same value as the id parameter in the URL path.

Response

Content-Type

application/xml

Body

The budget after update, as XML text with the root element customerBudget or JAXB type com.cloudcruiser.server.webservices.v1.dto.budgets.CustomerBudget.

Example

URL invocation

PUT http://localhost:8080/rest/v1/budgets/budget/10000

Java invocation

CustomerBudget updatedBudget = budgetsServiceProxy.updateCustomerBudget(inputBudget);​

Request body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customerBudget xmlns="http://www.cloudcruiser.com/webservices/v1/Budget" budgetId="10000" budgetType="COST">
  <customer id="8" accountId="B-BB" accountingDay="5"/>
  <accountingYear>2001</accountingYear>
  <currencyCode>usd</currencyCode>
  <standardAlertsEnabled>true</standardAlertsEnabled>
  <projectedAlertsEnabled>true</projectedAlertsEnabled>
  <useDefaultThresholds>true</useDefaultThresholds>
  <threshold1Percent>90</threshold1Percent>
  <threshold2Percent>100</threshold2Percent>
  <threshold3Percent>150</threshold3Percent>
  <costPeriods>
    <period accountingPeriod="1" budgetValue="50000.0"/>
    <period accountingPeriod="2" budgetValue="50000.0"/>
    <period accountingPeriod="3" budgetValue="50000.0"/>
    <period accountingPeriod="4" budgetValue="50000.0"/>
    <period accountingPeriod="5" budgetValue="50000.0"/>
    <period accountingPeriod="6" budgetValue="50000.0"/>
    <period accountingPeriod="7" budgetValue="50000.0"/>
    <period accountingPeriod="8" budgetValue="50000.0"/>
    <period accountingPeriod="9" budgetValue="50000.0"/>
    <period accountingPeriod="10" budgetValue="50000.0"/>
    <period accountingPeriod="11" budgetValue="50000.0"/>
    <period accountingPeriod="12" budgetValue="50000.0"/>
  </costPeriods>
</customerBudget>
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customerBudget xmlns="http://www.cloudcruiser.com/webservices/v1/Budget" budgetId="10000" budgetType="COST">
  <customer id="8" accountId="B-BB" accountingDay="5"/>
  <accountingYear>2001</accountingYear>
  <currencyCode>usd</currencyCode>
  <standardAlertsEnabled>true</standardAlertsEnabled>
  <projectedAlertsEnabled>true</projectedAlertsEnabled>
  <useDefaultThresholds>true</useDefaultThresholds>
  <threshold1Percent>80</threshold1Percent>
  <threshold2Percent>100</threshold2Percent>
  <threshold3Percent>120</threshold3Percent>
  <costPeriods>
    <period accountingPeriod="1" budgetValue="50000.0"/>
    <period accountingPeriod="2" budgetValue="50000.0"/>
    <period accountingPeriod="3" budgetValue="50000.0"/>
    <period accountingPeriod="4" budgetValue="50000.0"/>
    <period accountingPeriod="5" budgetValue="50000.0"/>
    <period accountingPeriod="6" budgetValue="50000.0"/>
    <period accountingPeriod="7" budgetValue="50000.0"/>
    <period accountingPeriod="8" budgetValue="50000.0"/>
    <period accountingPeriod="9" budgetValue="50000.0"/>
    <period accountingPeriod="10" budgetValue="50000.0"/>
    <period accountingPeriod="11" budgetValue="50000.0"/>
    <period accountingPeriod="12" budgetValue="50000.0"/>
  </costPeriods>
</customerBudget>
Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.