describeBudgetActionsForAccount method

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

Describes all of the budget actions for an account.

May throw InternalErrorException. May throw InvalidParameterException. May throw AccessDeniedException. May throw InvalidNextTokenException.

Implementation

Future<DescribeBudgetActionsForAccountResponse>
    describeBudgetActionsForAccount({
  required String accountId,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(accountId, 'accountId');
  _s.validateStringLength(
    'accountId',
    accountId,
    12,
    12,
    isRequired: true,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    2147483647,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSBudgetServiceGateway.DescribeBudgetActionsForAccount'
  };
  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 DescribeBudgetActionsForAccountResponse.fromJson(jsonResponse.body);
}