createSubscriber method
Creates a subscriber. You must create the associated budget and notification before you create the subscriber.
May throw AccessDeniedException.
May throw CreationLimitExceededException.
May throw DuplicateRecordException.
May throw InternalErrorException.
May throw InvalidParameterException.
May throw NotFoundException.
May throw ThrottlingException.
Parameter accountId :
The accountId that is associated with the budget that you
want to create a subscriber for.
Parameter budgetName :
The name of the budget that you want to subscribe to. Budget names must be
unique within an account.
Parameter notification :
The notification that you want to create a subscriber for.
Parameter subscriber :
The subscriber that you want to associate with a budget notification.
Implementation
Future<void> createSubscriber({
required String accountId,
required String budgetName,
required Notification notification,
required Subscriber subscriber,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSBudgetServiceGateway.CreateSubscriber'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AccountId': accountId,
'BudgetName': budgetName,
'Notification': notification,
'Subscriber': subscriber,
},
);
}