describeBudgetNotificationsForAccount method

Future<DescribeBudgetNotificationsForAccountResponse> describeBudgetNotificationsForAccount({
  1. required String accountId,
  2. int? maxResults,
  3. String? nextToken,
})

Lists the budget names and notifications 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 maxResults : An integer that represents how many budgets a paginated response contains. The default is 50.

Implementation

Future<DescribeBudgetNotificationsForAccountResponse>
    describeBudgetNotificationsForAccount({
  required String accountId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount'
  };
  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,
    },
  );

  return DescribeBudgetNotificationsForAccountResponse.fromJson(
      jsonResponse.body);
}