describe_budget_spend
async
¶
describe_budget_spend(
account_id: AccountId,
budget_name: BudgetName,
*,
config_overrides: Optional[AsyncBudgetsClientConfig] = None,
group_by: Optional[GroupDefinitions] = None,
filter_expression: Optional[Expression] = None,
max_results: Optional[MaxResultsDescribeBudgets] = None,
next_token: Optional[SpendPaginationToken] = None,
) -> DescribeBudgetSpendResponse
Describes the spend of a budget for the budget's current period. Use this operation with a budget that uses the PublicOnDemandCost or EstimatedContractedCost metric.
By default, the response has one row for each budget limit. If the budget has BudgetLimitDimensions, set GroupBy to the budget's SpendAttributions key to get one row for each principal instead. Use FilterExpression to return only some principals. Rows are sorted by spend, from highest to lowest.
Results are paginated. Use the NextToken parameter to retrieve additional results.
Parameters:
-
account_id(AccountId) –The
accountIdthat is associated with the budget. -
budget_name(BudgetName) –The name of the budget whose spend you want to describe.
-
group_by(Optional[GroupDefinitions], default:None) –How to group the spend. You can specify no entry or one entry. To get one row for each principal, specify one
DIMENSIONentry whose key is the budget'sSpendAttributionsvalue. If you don't specifyGroupBy, the response uses the budget'sBudgetLimitDimensions. -
filter_expression(Optional[Expression], default:None) –The principals to return spend for. Specify one
Dimensionsclause whose key is the budget'sSpendAttributionsvalue, with theEQUALSmatch option and 1 to 20 principal IDs. If you don't specifyFilterExpression, Amazon Web Services Budgets returns spend for every principal that has spend in the budget. -
max_results(Optional[MaxResultsDescribeBudgets], default:None) –The maximum number of results to return in one page. Valid range is 1 to 1000. If you don't specify
MaxResults, the default is 100. -
next_token(Optional[SpendPaginationToken], default:None) –The pagination token that you include in your request to indicate the next set of results that you want to retrieve.
Raises:
-
AccessDeniedException–You are not authorized to use this operation with the given parameters.
-
ExpiredNextTokenException–The pagination token expired.
-
InternalErrorException–An error on the server occurred during the processing of your request. Try again later.
-
InvalidNextTokenException–The pagination token is invalid.
-
InvalidParameterException–An error on the client occurred. Typically, the cause is an invalid input value.
-
NotFoundException–We can’t locate the resource that you specified.
-
ThrottlingException–The number of API requests has exceeded the maximum allowed API request throttling limit for the account.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_budgets/_services/async_budgets.py
1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 | |