updateBudgetAction method
Updates a budget action.
May throw AccessDeniedException.
May throw InternalErrorException.
May throw InvalidParameterException.
May throw NotFoundException.
May throw ResourceLockedException.
May throw ThrottlingException.
Parameter actionId :
A system-generated universally unique identifier (UUID) for the action.
Parameter approvalModel :
This specifies if the action needs manual or automatic approval.
Parameter executionRoleArn :
The role passed for action execution and reversion. Roles and actions must
be in the same account.
Implementation
Future<UpdateBudgetActionResponse> updateBudgetAction({
required String accountId,
required String actionId,
required String budgetName,
ActionThreshold? actionThreshold,
ApprovalModel? approvalModel,
Definition? definition,
String? executionRoleArn,
NotificationType? notificationType,
List<Subscriber>? subscribers,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSBudgetServiceGateway.UpdateBudgetAction'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AccountId': accountId,
'ActionId': actionId,
'BudgetName': budgetName,
if (actionThreshold != null) 'ActionThreshold': actionThreshold,
if (approvalModel != null) 'ApprovalModel': approvalModel.value,
if (definition != null) 'Definition': definition,
if (executionRoleArn != null) 'ExecutionRoleArn': executionRoleArn,
if (notificationType != null)
'NotificationType': notificationType.value,
if (subscribers != null) 'Subscribers': subscribers,
},
);
return UpdateBudgetActionResponse.fromJson(jsonResponse.body);
}