listEventSourceMappings method
Lists event source mappings. Specify an EventSourceArn
to
only show event source mappings for a single event source.
May throw ServiceException. May throw ResourceNotFoundException. May throw InvalidParameterValueException. May throw TooManyRequestsException.
Parameter eventSourceArn
:
The Amazon Resource Name (ARN) of the event source.
- Amazon Kinesis - The ARN of the data stream or a stream consumer.
- Amazon DynamoDB Streams - The ARN of the stream.
- Amazon Simple Queue Service - The ARN of the queue.
- Amazon Managed Streaming for Apache Kafka - The ARN of the cluster.
Parameter functionName
:
The name of the Lambda function.
Name formats
-
Function name -
MyFunction
. -
Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:MyFunction
. -
Version or Alias ARN -
arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD
. -
Partial ARN -
123456789012:function:MyFunction
.
Parameter marker
:
A pagination token returned by a previous call.
Parameter maxItems
:
The maximum number of event source mappings to return.
Implementation
Future<ListEventSourceMappingsResponse> listEventSourceMappings({
String? eventSourceArn,
String? functionName,
String? marker,
int? maxItems,
}) async {
_s.validateStringLength(
'functionName',
functionName,
1,
140,
);
_s.validateNumRange(
'maxItems',
maxItems,
1,
10000,
);
final $query = <String, List<String>>{
if (eventSourceArn != null) 'EventSourceArn': [eventSourceArn],
if (functionName != null) 'FunctionName': [functionName],
if (marker != null) 'Marker': [marker],
if (maxItems != null) 'MaxItems': [maxItems.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/2015-03-31/event-source-mappings/',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListEventSourceMappingsResponse.fromJson(response);
}