listLogSubscriptions method

Future<ListLogSubscriptionsResult> listLogSubscriptions({
  1. String? directoryId,
  2. int? limit,
  3. String? nextToken,
})

Lists the active log subscriptions for the Amazon Web Services account.

May throw ClientException. May throw EntityDoesNotExistException. May throw InvalidNextTokenException. May throw ServiceException.

Parameter directoryId : If a DirectoryID is provided, lists only the log subscription associated with that directory. If no DirectoryId is provided, lists all log subscriptions associated with your Amazon Web Services account. If there are no log subscriptions for the Amazon Web Services account or the directory, an empty list will be returned.

Parameter limit : The maximum number of items returned.

Parameter nextToken : The token for the next set of items to return.

Implementation

Future<ListLogSubscriptionsResult> listLogSubscriptions({
  String? directoryId,
  int? limit,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    0,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DirectoryService_20150416.ListLogSubscriptions'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (directoryId != null) 'DirectoryId': directoryId,
      if (limit != null) 'Limit': limit,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListLogSubscriptionsResult.fromJson(jsonResponse.body);
}