listApiDestinations method
Retrieves a list of API destination in the account in the current Region.
May throw InternalException.
Parameter connectionArn :
The ARN of the connection specified for the API destination.
Parameter limit :
The maximum number of API destinations to include in the response.
Parameter namePrefix :
A name prefix to filter results returned. Only API destinations with a
name that starts with the prefix are returned.
Parameter nextToken :
The token returned by a previous call, which you can use to retrieve the
next set of results.
The value of nextToken is a unique pagination token for each
page. To retrieve the next page of results, make the call again using the
returned token. Keep all other arguments unchanged.
Using an expired pagination token results in an HTTP 400
InvalidToken error.
Implementation
Future<ListApiDestinationsResponse> listApiDestinations({
String? connectionArn,
int? limit,
String? namePrefix,
String? nextToken,
}) async {
_s.validateNumRange(
'limit',
limit,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSEvents.ListApiDestinations'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (connectionArn != null) 'ConnectionArn': connectionArn,
if (limit != null) 'Limit': limit,
if (namePrefix != null) 'NamePrefix': namePrefix,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListApiDestinationsResponse.fromJson(jsonResponse.body);
}