def list_event_source_mappings(params={})
response = Excon::Response.new
response.status = 200
function_name = params.delete('FunctionName')
begin
function = self.get_function_configuration('FunctionName' => function_name).body
function_arn = function['FunctionArn']
rescue Fog::AWS::Lambda::Error => e
end
event_source_mappings = []
if function_arn
event_source_mappings = self.data[:event_source_mappings].values.select do |m|
m['FunctionArn'].eql?(function_arn)
end
end
response.body = {
'EventSourceMappings' => event_source_mappings,
'NextMarker' => nil
}
response
end