updateNotification method
Future<void>
updateNotification({
- required String accountId,
- required String budgetName,
- required Notification newNotification,
- required Notification oldNotification,
Updates a notification.
May throw InternalErrorException. May throw InvalidParameterException. May throw NotFoundException. May throw DuplicateRecordException. May throw AccessDeniedException.
Parameter accountId
:
The accountId
that is associated with the budget whose
notification you want to update.
Parameter budgetName
:
The name of the budget whose notification you want to update.
Parameter newNotification
:
The updated notification to be associated with a budget.
Parameter oldNotification
:
The previous notification that is associated with a budget.
Implementation
Future<void> updateNotification({
required String accountId,
required String budgetName,
required Notification newNotification,
required Notification oldNotification,
}) 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,
);
ArgumentError.checkNotNull(newNotification, 'newNotification');
ArgumentError.checkNotNull(oldNotification, 'oldNotification');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSBudgetServiceGateway.UpdateNotification'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AccountId': accountId,
'BudgetName': budgetName,
'NewNotification': newNotification,
'OldNotification': oldNotification,
},
);
}