describeBudgets method
Lists the budgets that are associated with an account.
May throw AccessDeniedException.
May throw ExpiredNextTokenException.
May throw InternalErrorException.
May throw InvalidNextTokenException.
May throw InvalidParameterException.
May throw NotFoundException.
May throw ThrottlingException.
Parameter accountId :
The accountId that is associated with the budgets that you
want to describe.
Parameter maxResults :
An integer that represents how many budgets a paginated response contains.
The default is 100.
Parameter nextToken :
The pagination token that you include in your request to indicate the next
set of results that you want to retrieve.
Parameter showFilterExpression :
Specifies whether the response includes the filter expression associated
with the budgets. By showing the filter expression, you can see detailed
filtering logic applied to the budgets, such as Amazon Web Services
services or tags that are being tracked.
Implementation
Future<DescribeBudgetsResponse> describeBudgets({
required String accountId,
int? maxResults,
String? nextToken,
bool? showFilterExpression,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSBudgetServiceGateway.DescribeBudgets'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AccountId': accountId,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (showFilterExpression != null)
'ShowFilterExpression': showFilterExpression,
},
);
return DescribeBudgetsResponse.fromJson(jsonResponse.body);
}