describeBudget method

Future<DescribeBudgetResponse> describeBudget({
  1. required String accountId,
  2. required String budgetName,
})

Describes a budget.

May throw InternalErrorException. May throw InvalidParameterException. May throw NotFoundException. May throw AccessDeniedException.

Parameter accountId : The accountId that is associated with the budget that you want a description of.

Parameter budgetName : The name of the budget that you want a description of.

Implementation

Future<DescribeBudgetResponse> describeBudget({
  required String accountId,
  required String budgetName,
}) async {
  ArgumentError.checkNotNull(accountId, 'accountId');
  _s.validateStringLength(
    'accountId',
    accountId,
    12,
    12,
    isRequired: true,
  );
  ArgumentError.checkNotNull(budgetName, 'budgetName');
  _s.validateStringLength(
    'budgetName',
    budgetName,
    1,
    100,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSBudgetServiceGateway.DescribeBudget'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AccountId': accountId,
      'BudgetName': budgetName,
    },
  );

  return DescribeBudgetResponse.fromJson(jsonResponse.body);
}