listPublishingDestinations method
Returns a list of publishing destinations associated with the specified
detectorId.
May throw BadRequestException.
May throw InternalServerErrorException.
Parameter detectorId :
The detector ID for which you want to retrieve the publishing destination.
To find the detectorId in the current Region, see the
Settings page in the GuardDuty console, or run the ListDetectors
API.
Parameter maxResults :
The maximum number of results to return in the response.
Parameter nextToken :
A token to use for paginating results that are returned in the response.
Set the value of this parameter to null for the first request to a list
action. For subsequent calls, use the NextToken value
returned from the previous request to continue listing results after the
first page.
Implementation
Future<ListPublishingDestinationsResponse> listPublishingDestinations({
required String detectorId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/detector/${Uri.encodeComponent(detectorId)}/publishingDestination',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListPublishingDestinationsResponse.fromJson(response);
}