listMetricStreams method
Returns a list of metric streams in this account.
May throw InternalServiceFault.
May throw InvalidNextToken.
May throw InvalidParameterValueException.
May throw MissingRequiredParameterException.
Parameter maxResults :
The maximum number of results to return in one operation.
Parameter nextToken :
Include this value, if it was returned by the previous call, to get the
next set of metric streams.
Implementation
Future<ListMetricStreamsOutput> listMetricStreams({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
500,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'GraniteServiceVersion20100801.ListMetricStreams'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListMetricStreamsOutput.fromJson(jsonResponse.body);
}