describeSubscribersForNotification method

Future<DescribeSubscribersForNotificationResponse> describeSubscribersForNotification({
  1. required String accountId,
  2. required String budgetName,
  3. required Notification notification,
  4. int? maxResults,
  5. String? nextToken,
})

Lists the subscribers that are associated with a notification.

May throw InternalErrorException. May throw NotFoundException. May throw InvalidParameterException. May throw InvalidNextTokenException. May throw ExpiredNextTokenException. May throw AccessDeniedException.

Parameter accountId : The accountId that is associated with the budget whose subscribers you want descriptions of.

Parameter budgetName : The name of the budget whose subscribers you want descriptions of.

Parameter notification : The notification whose subscribers you want to list.

Parameter maxResults : An optional integer that represents how many entries a paginated response contains. The maximum is 100.

Parameter nextToken : The pagination token that you include in your request to indicate the next set of results that you want to retrieve.

Implementation

Future<DescribeSubscribersForNotificationResponse>
    describeSubscribersForNotification({
  required String accountId,
  required String budgetName,
  required Notification notification,
  int? maxResults,
  String? nextToken,
}) 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(notification, 'notification');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    2147483647,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'AWSBudgetServiceGateway.DescribeSubscribersForNotification'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AccountId': accountId,
      'BudgetName': budgetName,
      'Notification': notification,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return DescribeSubscribersForNotificationResponse.fromJson(
      jsonResponse.body);
}