describeLogGroups method
Lists the specified log groups. You can list all your log groups or filter the results by prefix. The results are ASCII-sorted by log group name.
May throw InvalidParameterException. May throw ServiceUnavailableException.
Parameter limit
:
The maximum number of items returned. If you don't specify a value, the
default is up to 50 items.
Parameter logGroupNamePrefix
:
The prefix to match.
Parameter nextToken
:
The token for the next set of items to return. (You received this token
from a previous call.)
Implementation
Future<DescribeLogGroupsResponse> describeLogGroups({
int? limit,
String? logGroupNamePrefix,
String? nextToken,
}) async {
_s.validateNumRange(
'limit',
limit,
1,
50,
);
_s.validateStringLength(
'logGroupNamePrefix',
logGroupNamePrefix,
1,
512,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Logs_20140328.DescribeLogGroups'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (limit != null) 'limit': limit,
if (logGroupNamePrefix != null)
'logGroupNamePrefix': logGroupNamePrefix,
if (nextToken != null) 'nextToken': nextToken,
},
);
return DescribeLogGroupsResponse.fromJson(jsonResponse.body);
}