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