listEventSources method
You can use this to see all the partner event sources that have been shared with your AWS account. For more information about partner event sources, see CreateEventBus.
May throw InternalException. May throw OperationDisabledException.
Parameter limit
:
Specifying this limits the number of results returned by this operation.
The operation also returns a NextToken which you can use in a subsequent
operation to retrieve the next set of results.
Parameter namePrefix
:
Specifying this limits the results to only those partner event sources
with names that start with the specified prefix.
Parameter nextToken
:
The token returned by a previous call to retrieve the next set of results.
Implementation
Future<ListEventSourcesResponse> listEventSources({
int? limit,
String? namePrefix,
String? nextToken,
}) async {
_s.validateNumRange(
'limit',
limit,
1,
100,
);
_s.validateStringLength(
'namePrefix',
namePrefix,
1,
256,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
2048,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSEvents.ListEventSources'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (limit != null) 'Limit': limit,
if (namePrefix != null) 'NamePrefix': namePrefix,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListEventSourcesResponse.fromJson(jsonResponse.body);
}