updateBudget method
Updates a budget. You can change every part of a budget except for the
budgetName and the calculatedSpend. When you
modify a budget, the calculatedSpend drops to zero until
Amazon Web Services has new usage data to use for forecasting.
Similarly, only one set of filter and metric selections can be present in
the syntax at one time. Either FilterExpression and
Metrics or CostFilters and
CostTypes, not both or a different combination. We recommend
using FilterExpression and Metrics as they
provide more flexible and powerful filtering capabilities. The Request
Syntax section shows the
FilterExpression/Metrics syntax.
May throw AccessDeniedException.
May throw BillingViewHealthStatusException.
May throw InternalErrorException.
May throw InvalidParameterException.
May throw NotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
Parameter accountId :
The accountId that is associated with the budget that you
want to update.
Parameter newBudget :
The budget that you want to update your budget to.
Implementation
Future<void> updateBudget({
required String accountId,
required Budget newBudget,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSBudgetServiceGateway.UpdateBudget'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AccountId': accountId,
'NewBudget': newBudget,
},
);
}