# Cloud Cost Budgets

Manage Budgets bulky

## Adjust Budget Amount in Bulk

 - [POST /ccm/api/budgets/bulk/adjust-budget-amount](https://apidocs.harness.io/cloud-cost-budgets/adjustbudgetamountoperation.md): Adjusts multiple budget amounts in a single operation. This is an asynchronous operation that returns a job ID for tracking.        
#### Example Request:
json
{
  "budgetIds": ["budget_123", "budget_456"],
  "adjustBudgetBulkRequestType": "INCREASE_BY_PERCENTAGE",
  "adjustmentValue": 10,
  "notes": "Q2 budget adjustment - 10% increase for all production budgets"
}


#### Adjustment Types (adjustBudgetBulkRequestType):
- INCREASE_BY_PERCENTAGE: Increase budgets by a percentage (e.g., 10 = 10% increase)
- DECREASE_BY_PERCENTAGE: Decrease budgets by a percentage (e.g., 5 = 5% decrease)
- INCREASE_BY_AMOUNT: Increase budgets by a fixed amount
- DECREASE_BY_AMOUNT: Decrease budgets by a fixed amount
- SET_TO_SPECIFIC_AMOUNT: Set budgets to specific amounts (requires amountMap)

## Clone Budgets in Bulk

 - [POST /ccm/api/budgets/bulk/clone](https://apidocs.harness.io/cloud-cost-budgets/clonebudgetsbulkoperation.md): Creates copies of multiple budgets with customizable naming patterns and alert configurations.

## Delete Budgets in Bulk

 - [POST /ccm/api/budgets/bulk/delete](https://apidocs.harness.io/cloud-cost-budgets/deletebudgetsbulkoperation.md): Permanently deletes multiple budgets in a single operation.

⚠️ WARNING: This action cannot be undone. Deleted budgets and their historical data will be permanently removed.

Recommendations:
- Double-check budget IDs before deletion
- Consider exporting budget data before proceeding
- Review dependent alerts and reports

## Check Bulk Operation Status

 - [GET /ccm/api/budgets/bulk/check-job-status](https://apidocs.harness.io/cloud-cost-budgets/checkbulkbudgetjobstatus.md): Retrieves the current status of an asynchronous bulk budget operation. Returns the status of the most recent bulk operation for an account.

Status Values:
- RUNNING: Operation is in progress
- COMPLETED: Operation finished successfully
- FAILED: Operation encountered errors (check failedBudgetIds)

## Manage Budget Alerts in Bulk

 - [POST /ccm/api/budgets/bulk/manage-alerts](https://apidocs.harness.io/cloud-cost-budgets/managebudgetalertsbulkoperation.md): Performs bulk operations on budget alerts including adding, updating, or removing alert configurations.

Supported Operations:
- Add/Update Alert Thresholds - Add new alert thresholds to budgets
- Remove Alerts - Remove specific alert thresholds from budgets
- Manage Notification Recipients:
  - Add email recipients
  - Remove email recipients
  - Add Slack recipients
  - Remove Slack recipients

## Fetch Budget details

 - [GET /ccm/api/budgets/{id}](https://apidocs.harness.io/cloud-cost-budgets/getbudget.md): Fetch details of a Cloud Cost Budget for the given Budget ID.

## Update a Budget

 - [PUT /ccm/api/budgets/{id}](https://apidocs.harness.io/cloud-cost-budgets/updatebudget.md): Updates the configuration of an existing budget. All fields provided will overwrite the existing values.

Common Updates:
- Adjust budget amount or time period
- Add/remove alert thresholds
- Update notification recipients
- Change associated perspective

## Clone a budget

 - [POST /ccm/api/budgets/{id}](https://apidocs.harness.io/cloud-cost-budgets/clonebudget.md): Clone a Cloud Cost Budget using the given Budget ID.

## Delete a Budget

 - [DELETE /ccm/api/budgets/{id}](https://apidocs.harness.io/cloud-cost-budgets/deletebudget.md): Permanently deletes a budget and all its associated data.

⚠️ WARNING: This action cannot be undone. The following will be permanently deleted:
- Budget configuration
- Historical spending data
- Alert history
- Notification settings

Recommendations:
- Verify the budget ID before deletion
- Export any required budget data
- Check for dependent reports or dashboards

## Return the list of filter values for the Budgets

 - [POST /ccm/api/budgets/filter-values](https://apidocs.harness.io/cloud-cost-budgets/budgetfiltervalues.md): Returns the list of filter values for all the specified filters.

## Filter budgets with RBAC checks

 - [POST /ccm/api/budgets/v2/list](https://apidocs.harness.io/cloud-cost-budgets/getaccessiblebudgetsummaries.md): Returns a list of budgets based on filter criteria with folder-based RBAC checks

## Fetch the cost details of a Budget

 - [GET /ccm/api/budgets/{id}/costDetails](https://apidocs.harness.io/cloud-cost-budgets/getcostdetails.md): Fetch the cost details of a Cloud Cost Budget for the given Budget ID.

## List all the Budgets associated with a Perspective

 - [GET /ccm/api/budgets/perspectiveBudgets](https://apidocs.harness.io/cloud-cost-budgets/listbudgetsforperspective.md): List all the Cloud Cost Budgets associated for the given Perspective ID.

## List all the Budgets

 - [GET /ccm/api/budgets](https://apidocs.harness.io/cloud-cost-budgets/listbudgets.md): List all the Cloud Cost Budgets.

## Create a New Budget

 - [POST /ccm/api/budgets](https://apidocs.harness.io/cloud-cost-budgets/createbudget.md): Creates a new budget to monitor and control your cloud spending with configurable alerts.

Key Features:
- Set monthly, quarterly, or custom time periods
- Configure multiple alert thresholds (50%, 75%, 90%, etc.)
- Receive email notifications for budget alerts
- Track actual vs. forecasted spending

Example Use Cases:
- Set department-wise spending limits
- Monitor project-specific cloud costs
- Control non-production environment spending

Example Request:
json
{
  "name": "Production Environment - Q2 2024",
  "amount": 10000,
  "period": "MONTHLY",
  "perspectiveId": "perspective_prod_123",
  "alertThresholds": [
    {
      "percentage": 50,
      "emailAddresses": ["team@example.com"],
      "alertOn": "ACTUAL_COST"
    },
    {
      "percentage": 90,
      "emailAddresses": ["team@example.com", "alerts@example.com"],
      "alertOn": "FORECASTED_COST"
    }
  ]
}

## List alert thresholds for a budget

 - [GET /ccm/api/budgets/subscribe/list](https://apidocs.harness.io/cloud-cost-budgets/listbudgetalertthresholds.md): List all the alert thresholds that have been set for the given Budget ID.

## Move budgets to a folder

 - [POST /ccm/api/budgets/moveBudgets](https://apidocs.harness.io/cloud-cost-budgets/movebudgets.md): Move budgets to a different folder, overriding perspective folder inheritance.

## Update alert thresholds for a budget

 - [POST /ccm/api/budgets/subscribe](https://apidocs.harness.io/cloud-cost-budgets/updatebudgetalertthresholds.md): Update the alert thresholds for the given Budget ID with the provided list of alert thresholds.

