DescribeCostBudgetsSummary

Updated at:
Copy as MD

Queries a summary of cost budgets.

Operation description

This API is in beta and available only to whitelisted users. Excessive calls may cause performance issues such as response timeouts.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

bss:DescribeCostBudgetsSummary

get

*All Resource

*

None

None

Request parameters

Parameter

Type

Required

Description

Example

BudgetName

string

No

The budget name. Supports fuzzy search.

BudgetStatus

string

No

The budget status. If not specified, all statuses are returned.

Valid values:

  • notOverdue :

    The budget is not overdue.

  • overdue :

    The budget is overdue.

notOverdue

BudgetType

string

No

The budget type. If not specified, all types are returned.

Valid values:

  • cost :

    Cost budget

  • byquantity :

    Quantity-based budget

  • asset :

    Usage and coverage budget

cost

NextToken

string

No

The pagination token. Set this to the NextToken value from the previous response. If not specified, the query starts from the first page.

eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6NH0=

MaxResults

integer

No

The maximum number of items to return. Valid values: 1 to 10. Default value: 10.

5

Response elements

Element

Type

Description

Example

object

The response object.

RequestId

string

The request ID.

3BFC23FE-A182-4D96-A1E4-7521B30B8E43

Success

boolean

Whether the request was successful.

true

Code

string

The status code.

Success

Message

string

The error message.

Successful!

Data

object

The returned data.

NextToken

string

The token for the next page of results.

eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6NH0=

MaxResults

integer

The maximum number of entries per page.

5

TotalCount

integer

The total number of entries.

20

Items

array<object>

The list of items.

object

The list of budgets.

BudgetName

string

The budget name.

BudgetStatus

string

The budget status.

overdue

BudgetType

string

The budget type.

cost

Budget

object

Budget details.

  • BudgetCycleType: Budget period. Valid values: daily, monthly, quarterly, yearly.

  • TotalBudgetAmount: The total budget amount.

  • BudgetMemo: Budget notes.

{ "budgetCycleType": "monthly", "budgetMemo": "", "totalBudgetAmount": 220 }

CalculatedValues

object

Estimate-to-actual comparison data.

  • ActualConsumeSum: Accumulated actual consumption.

  • ActualAddForecastedAmount: Sum of accumulated actual and forecasted values. For cost budgets, this equals actual spending to date plus forecasted spending through the budget period end.

  • ActualAndBudgetComparison: Actual-to-budget ratio, calculated as (Accumulated actual value / Total budget amount) × 100%.

{ "actualConsumeSum": 88.6, "actualAddForecastedAmount": 89.6, "actualAndBudgetComparison": "20.73%" }

ConsumePeriod

object

Billing cycle details.

  • ConsumePeriodBegin: Budget start date.

  • ConsumePeriodEnd: Budget end date.

{ "consumePeriodBegin": "2022-10", "consumePeriodEnd": "2022-11" }

HostId

string

The website.

cn

Examples

Success response

JSON format

{
  "RequestId": "3BFC23FE-A182-4D96-A1E4-7521B30B8E43",
  "Success": true,
  "Code": "Success",
  "Message": "Successful!",
  "Data": {
    "NextToken": "eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6NH0=",
    "MaxResults": 5,
    "TotalCount": 20,
    "Items": [
      {
        "BudgetName": "",
        "BudgetStatus": "overdue",
        "BudgetType": "cost",
        "Budget": {
          "budgetCycleType": "monthly",
          "budgetMemo": "",
          "totalBudgetAmount": 220
        },
        "CalculatedValues": {
          "actualConsumeSum": 88.6,
          "actualAddForecastedAmount": 89.6,
          "actualAndBudgetComparison": "20.73%"
        },
        "ConsumePeriod": {
          "consumePeriodBegin": "2022-10",
          "consumePeriodEnd": "2022-11"
        }
      }
    ],
    "HostId": "cn"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.