mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
39 lines
1.3 KiB
Ruby
39 lines
1.3 KiB
Ruby
module Fog
|
|
module AWS
|
|
class Lambda
|
|
class Real
|
|
require 'fog/aws/parsers/lambda/base'
|
|
|
|
# Returns a list of your Lambda functions.
|
|
# http://docs.aws.amazon.com/lambda/latest/dg/API_ListFunctions.html
|
|
# ==== Parameters
|
|
# * Marker <~String> - opaque pagination token returned from a previous ListFunctions operation. If present, indicates where to continue the listing.
|
|
# * MaxItems <~Integer> - Specifies the maximum number of AWS Lambda functions to return in response.
|
|
# ==== Returns
|
|
# * response<~Excon::Response>:
|
|
# * body<~Hash>:
|
|
# * 'Functions' <~Array> - list of Lambda functions.
|
|
# * 'NextMarker' <~String> - present if there are more functions.
|
|
def list_functions(params={})
|
|
request({
|
|
:method => 'GET',
|
|
:path => '/functions/',
|
|
:parser => Fog::AWS::Parsers::Lambda::Base.new
|
|
}.merge(params))
|
|
end
|
|
end
|
|
|
|
class Mock
|
|
def list_functions(params={})
|
|
response = Excon::Response.new
|
|
response.status = 200
|
|
response.body = {
|
|
'Functions' => self.data[:functions].values,
|
|
'NextMarker' => nil
|
|
}
|
|
response
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|