executeBudgetAction method

Future<ExecuteBudgetActionResponse> executeBudgetAction({
  1. required String accountId,
  2. required String actionId,
  3. required String budgetName,
  4. required ExecutionType executionType,
})

Executes a budget action.

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

Parameter actionId : A system-generated universally unique identifier (UUID) for the action.

Parameter executionType : The type of execution.

Implementation

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

  return ExecuteBudgetActionResponse.fromJson(jsonResponse.body);
}