listPublishingDestinations method
Returns a list of publishing destinations associated with the specified
dectectorId
.
May throw BadRequestException. May throw InternalServerErrorException.
Parameter detectorId
:
The ID of the detector to retrieve publishing destinations for.
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 {
ArgumentError.checkNotNull(detectorId, 'detectorId');
_s.validateStringLength(
'detectorId',
detectorId,
1,
300,
isRequired: true,
);
_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);
}