All Products
Search
Document Center

BSS OpenAPI:DescribeCostBudgetsSummary

Last Updated:Mar 01, 2024

Query the summary information of the user "Cost Management-Budget".

Operation description

This operation is in beta testing and is only available for specific users in the whitelist. Excessive calls may result in performance issues. For example, the response times out.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
bss:DescribeCostBudgetsSummaryRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
BudgetNamestringNo

The name of the budget. Fuzzy match is supported.

Annual budget
BudgetStatusstringNo

The status of the budget. Valid values: overdue and notOverdue. A value of overdue specifies to filter expired budgets. A value of notOverdue specifies to filter budgets that do not expire. By default, if you do not specify this parameter, information about all budgets is to be returned.

notOverdue
BudgetTypestringNo

The type of the budget. Valid values: cost, byquantity, and asset. A value of cost specifies to filter expense budgets. A value of byquantity specifies to filter budgets calculated based on the resource usage. A value of asset specifies to filter usage or coverage budgets. By default, information about all budgets is returned if you do not specify this parameter.

cost
NextTokenstringNo

The position in which the query starts. You must set this parameter to null or the token that is obtained from the previous query. Otherwise, an error is returned. If you set the NextToken parameter to null, the query starts from the beginning. The default value is null.

eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6NH0=
MaxResultsintegerNo

The number of entries to return on each page. Default value: 10. Maximum value: 10. Minimum value: 1.

5

Response parameters

ParameterTypeDescriptionExample
object

The result of the request.

RequestIdstring

The ID of the request.

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

Indicates whether the request is successful.

true
Codestring

The HTTP status code.

Success
Messagestring

The error message.

Successful!
Dataobject

The data that is returned.

NextTokenstring

The token that is used to retrieve the next page

eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6NH0=
MaxResultsinteger

The maximum number of entries that are returned.

5
TotalCountinteger

The total number of entries that are returned.

20
Itemsobject []

The data that is returned.

BudgetNamestring

The name of the budget.

Annual budget
BudgetStatusstring

The status of the budget.

overdue
BudgetTypestring

The type of the budget.

cost
Budgetobject

The information about the budget. The BudgetCycleType parameter indicates the cycle of the budget. Valid values: daily, monthly, quarterly, and yearly. The TotalBudgetAmount parameter indicates the total budget. The BudgetMemo parameter indicates the remarks of the budget.

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

The information about the estimate-to-actual analysis. The ActualConsumeSum parameter indicates the accumulated actual value. The ActualAddForecastedAmount parameter indicates the sum of accumulated actual value and predicted value. If the BudgetType parameter is set to cost, the sum of actual value and predicted value includes the actual cost incurred from the budget start date to the current date and the predicted cost from the current date to the budget end date. If the BudgetType parameter is set to asset, the sum of actual value and predicted value includes the actual usage or coverage from the budget start date to the budget end date. If the budget end date minus the current date is more than one year, the part that exceeds one year is not included. The ActualAndBudgetComparison parameter indicates the comparison between the actual value and the predicted value. The value of the ActualAndBudgetComparison parameter is calculated based on the following formula: Accumulated actual value/Total budget × 100%.

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

The information about the billing cycle. The ConsumePeriodBegin parameter indicates the start date of the budget. The ConsumePeriodEnd parameter indicates the end date of the budget.

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

The site of the host.

cn

Examples

Sample success responses

JSONformat

{
  "RequestId": "3BFC23FE-A182-4D96-A1E4-7521B30B8E43",
  "Success": true,
  "Code": "Success",
  "Message": "Successful!",
  "Data": {
    "NextToken": "eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6NH0=",
    "MaxResults": 5,
    "TotalCount": 20,
    "Items": [
      {
        "BudgetName": "Annual budget\n",
        "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

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-12-06Add Operationsee changesets