listV2LoggingLevels method

Future<ListV2LoggingLevelsResponse> listV2LoggingLevels({
  1. int? maxResults,
  2. String? nextToken,
  3. LogTargetType? targetType,
})

Lists logging levels.

May throw InternalException. May throw NotConfiguredException. May throw InvalidRequestException. May throw ServiceUnavailableException.

Parameter maxResults : The maximum number of results to return at one time.

Parameter nextToken : To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

Parameter targetType : The type of resource for which you are configuring logging. Must be THING_Group.

Implementation

Future<ListV2LoggingLevelsResponse> listV2LoggingLevels({
  int? maxResults,
  String? nextToken,
  LogTargetType? targetType,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (targetType != null) 'targetType': [targetType.toValue()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v2LoggingLevel',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListV2LoggingLevelsResponse.fromJson(response);
}