aws-sdk-lambdapreview 1.0.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 47b3af99ccfa021ccac47b5c7c0aca6e17110a55
4
+ data.tar.gz: a6ddff9e9e56b29bc49b4034adb3ef2c126f6328
5
+ SHA512:
6
+ metadata.gz: 9b6f64c7b339575f766e8e9975f004adbbe1357219929c8ec381519199d4fb12f237e96a1b0b2fe9238eb9b11fb67c61cfae679d3a066cce587fc0f5e1497607
7
+ data.tar.gz: 9054bf085afa1282f3cd20d5acbba3f0118e40e080024273d237997c1d7339e2556d0808fe0e1cdf2d2a06a63f3c0a5eb44a7a08d8036e511bb61bea38bd90b2
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-lambdapreview/types'
12
+ require_relative 'aws-sdk-lambdapreview/client_api'
13
+ require_relative 'aws-sdk-lambdapreview/client'
14
+ require_relative 'aws-sdk-lambdapreview/errors'
15
+ require_relative 'aws-sdk-lambdapreview/resource'
16
+ require_relative 'aws-sdk-lambdapreview/customizations'
17
+
18
+ # This module provides support for AWS Lambda. This module is available in the
19
+ # `aws-sdk-lambdapreview` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from AWS Lambda all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::LambdaPreview::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::LambdaPreview
44
+
45
+ GEM_VERSION = '1.0.0.rc1'
46
+
47
+ end
@@ -0,0 +1,737 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/signature_v4.rb'
22
+ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
23
+
24
+ Aws::Plugins::GlobalConfiguration.add_identifier(:lambdapreview)
25
+
26
+ module Aws
27
+ module LambdaPreview
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :lambdapreview
33
+
34
+ set_api(ClientApi::API)
35
+
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::SignatureV4)
50
+ add_plugin(Aws::Plugins::Protocols::RestJson)
51
+
52
+ # @option options [required, Aws::CredentialProvider] :credentials
53
+ # Your AWS credentials. This can be an instance of any one of the
54
+ # following classes:
55
+ #
56
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
57
+ # credentials.
58
+ #
59
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
60
+ # from an EC2 IMDS on an EC2 instance.
61
+ #
62
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
63
+ # shared file, such as `~/.aws/config`.
64
+ #
65
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
66
+ #
67
+ # When `:credentials` are not configured directly, the following
68
+ # locations will be searched for credentials:
69
+ #
70
+ # * `Aws.config[:credentials]`
71
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
72
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
73
+ # * `~/.aws/credentials`
74
+ # * `~/.aws/config`
75
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
76
+ # very aggressive. Construct and pass an instance of
77
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
78
+ # timeouts.
79
+ # @option options [required, String] :region
80
+ # The AWS region to connect to. The configured `:region` is
81
+ # used to determine the service `:endpoint`. When not passed,
82
+ # a default `:region` is search for in the following locations:
83
+ #
84
+ # * `Aws.config[:region]`
85
+ # * `ENV['AWS_REGION']`
86
+ # * `ENV['AMAZON_REGION']`
87
+ # * `ENV['AWS_DEFAULT_REGION']`
88
+ # * `~/.aws/credentials`
89
+ # * `~/.aws/config`
90
+ # @option options [String] :access_key_id
91
+ # @option options [Boolean] :convert_params (true)
92
+ # When `true`, an attempt is made to coerce request parameters into
93
+ # the required types.
94
+ # @option options [String] :endpoint
95
+ # The client endpoint is normally constructed from the `:region`
96
+ # option. You should only configure an `:endpoint` when connecting
97
+ # to test endpoints. This should be avalid HTTP(S) URI.
98
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
99
+ # The log formatter.
100
+ # @option options [Symbol] :log_level (:info)
101
+ # The log level to send messages to the `:logger` at.
102
+ # @option options [Logger] :logger
103
+ # The Logger instance to send log messages to. If this option
104
+ # is not set, logging will be disabled.
105
+ # @option options [String] :profile ("default")
106
+ # Used when loading credentials from the shared credentials file
107
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
108
+ # @option options [Integer] :retry_limit (3)
109
+ # The maximum number of times to retry failed requests. Only
110
+ # ~ 500 level server errors and certain ~ 400 level client errors
111
+ # are retried. Generally, these are throttling errors, data
112
+ # checksum errors, networking errors, timeout errors and auth
113
+ # errors from expired credentials.
114
+ # @option options [String] :secret_access_key
115
+ # @option options [String] :session_token
116
+ # @option options [Boolean] :stub_responses (false)
117
+ # Causes the client to return stubbed responses. By default
118
+ # fake responses are generated and returned. You can specify
119
+ # the response data to return or errors to raise by calling
120
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
121
+ #
122
+ # ** Please note ** When response stubbing is enabled, no HTTP
123
+ # requests are made, and retries are disabled.
124
+ # @option options [Boolean] :validate_params (true)
125
+ # When `true`, request parameters are validated before
126
+ # sending the request.
127
+ def initialize(*args)
128
+ super
129
+ end
130
+
131
+ # @!group API Operations
132
+
133
+ # Identifies a stream as an event source for an AWS Lambda function. It
134
+ # can be either an Amazon Kinesis stream or a Amazon DynamoDB stream.
135
+ # AWS Lambda invokes the specified function when records are posted to
136
+ # the stream.
137
+ #
138
+ # This is the pull model, where AWS Lambda invokes the function. For
139
+ # more information, go to [AWS Lambda: How it Works][1] in the AWS
140
+ # Lambda Developer Guide.
141
+ #
142
+ # This association between an Amazon Kinesis stream and an AWS Lambda
143
+ # function is called the event source mapping. You provide the
144
+ # configuration information (for example, which stream to read from and
145
+ # which AWS Lambda function to invoke) for the event source mapping in
146
+ # the request body.
147
+ #
148
+ # Each event source, such as a Kinesis stream, can only be associated
149
+ # with one AWS Lambda function. If you call AddEventSource for an event
150
+ # source that is already mapped to another AWS Lambda function, the
151
+ # existing mapping is updated to call the new function instead of the
152
+ # old one.
153
+ #
154
+ # This operation requires permission for the `iam:PassRole` action for
155
+ # the IAM role. It also requires permission for the
156
+ # `lambda:AddEventSource` action.
157
+ #
158
+ #
159
+ #
160
+ # [1]: http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html
161
+ # @option params [required, String] :event_source
162
+ # The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is
163
+ # the event source. Any record added to this stream causes AWS Lambda to
164
+ # invoke your Lambda function. AWS Lambda POSTs the Amazon Kinesis
165
+ # event, containing records, to your Lambda function as JSON.
166
+ # @option params [required, String] :function_name
167
+ # The Lambda function to invoke when AWS Lambda detects an event on the
168
+ # stream.
169
+ # @option params [required, String] :role
170
+ # The ARN of the IAM role (invocation role) that AWS Lambda can assume
171
+ # to read from the stream and invoke the function.
172
+ # @option params [Integer] :batch_size
173
+ # The largest number of records that AWS Lambda will give to your
174
+ # function in a single event. The default is 100 records.
175
+ # @option params [Hash<String,String>] :parameters
176
+ # A map (key-value pairs) defining the configuration for AWS Lambda to
177
+ # use when reading the event source. Currently, AWS Lambda supports only
178
+ # the `InitialPositionInStream` key. The valid values are:
179
+ # "TRIM\_HORIZON" and "LATEST". The default value is
180
+ # "TRIM\_HORIZON". For more information, go to [ShardIteratorType][1]
181
+ # in the Amazon Kinesis Service API Reference.
182
+ #
183
+ #
184
+ #
185
+ # [1]: http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType
186
+ # @return [Types::EventSourceConfiguration] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
187
+ #
188
+ # * {Types::EventSourceConfiguration#uuid #UUID} => String
189
+ # * {Types::EventSourceConfiguration#batch_size #BatchSize} => Integer
190
+ # * {Types::EventSourceConfiguration#event_source #EventSource} => String
191
+ # * {Types::EventSourceConfiguration#function_name #FunctionName} => String
192
+ # * {Types::EventSourceConfiguration#parameters #Parameters} => Hash&lt;String,String&gt;
193
+ # * {Types::EventSourceConfiguration#role #Role} => String
194
+ # * {Types::EventSourceConfiguration#last_modified #LastModified} => Time
195
+ # * {Types::EventSourceConfiguration#is_active #IsActive} => Boolean
196
+ # * {Types::EventSourceConfiguration#status #Status} => String
197
+ #
198
+ # @example Request syntax with placeholder values
199
+ # resp = client.add_event_source({
200
+ # event_source: "String", # required
201
+ # function_name: "FunctionName", # required
202
+ # role: "RoleArn", # required
203
+ # batch_size: 1,
204
+ # parameters: {
205
+ # "String" => "String",
206
+ # },
207
+ # })
208
+ #
209
+ # @example Response structure
210
+ # resp.uuid #=> String
211
+ # resp.batch_size #=> Integer
212
+ # resp.event_source #=> String
213
+ # resp.function_name #=> String
214
+ # resp.parameters #=> Hash
215
+ # resp.parameters["String"] #=> String
216
+ # resp.role #=> String
217
+ # resp.last_modified #=> Time
218
+ # resp.is_active #=> Boolean
219
+ # resp.status #=> String
220
+ # @overload add_event_source(params = {})
221
+ # @param [Hash] params ({})
222
+ def add_event_source(params = {}, options = {})
223
+ req = build_request(:add_event_source, params)
224
+ req.send_request(options)
225
+ end
226
+
227
+ # Deletes the specified Lambda function code and configuration.
228
+ #
229
+ # This operation requires permission for the `lambda:DeleteFunction`
230
+ # action.
231
+ # @option params [required, String] :function_name
232
+ # The Lambda function to delete.
233
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
234
+ #
235
+ # @example Request syntax with placeholder values
236
+ # resp = client.delete_function({
237
+ # function_name: "FunctionName", # required
238
+ # })
239
+ # @overload delete_function(params = {})
240
+ # @param [Hash] params ({})
241
+ def delete_function(params = {}, options = {})
242
+ req = build_request(:delete_function, params)
243
+ req.send_request(options)
244
+ end
245
+
246
+ # Returns configuration information for the specified event source
247
+ # mapping (see AddEventSource).
248
+ #
249
+ # This operation requires permission for the `lambda:GetEventSource`
250
+ # action.
251
+ # @option params [required, String] :uuid
252
+ # The AWS Lambda assigned ID of the event source mapping.
253
+ # @return [Types::EventSourceConfiguration] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
254
+ #
255
+ # * {Types::EventSourceConfiguration#uuid #UUID} => String
256
+ # * {Types::EventSourceConfiguration#batch_size #BatchSize} => Integer
257
+ # * {Types::EventSourceConfiguration#event_source #EventSource} => String
258
+ # * {Types::EventSourceConfiguration#function_name #FunctionName} => String
259
+ # * {Types::EventSourceConfiguration#parameters #Parameters} => Hash&lt;String,String&gt;
260
+ # * {Types::EventSourceConfiguration#role #Role} => String
261
+ # * {Types::EventSourceConfiguration#last_modified #LastModified} => Time
262
+ # * {Types::EventSourceConfiguration#is_active #IsActive} => Boolean
263
+ # * {Types::EventSourceConfiguration#status #Status} => String
264
+ #
265
+ # @example Request syntax with placeholder values
266
+ # resp = client.get_event_source({
267
+ # uuid: "String", # required
268
+ # })
269
+ #
270
+ # @example Response structure
271
+ # resp.uuid #=> String
272
+ # resp.batch_size #=> Integer
273
+ # resp.event_source #=> String
274
+ # resp.function_name #=> String
275
+ # resp.parameters #=> Hash
276
+ # resp.parameters["String"] #=> String
277
+ # resp.role #=> String
278
+ # resp.last_modified #=> Time
279
+ # resp.is_active #=> Boolean
280
+ # resp.status #=> String
281
+ # @overload get_event_source(params = {})
282
+ # @param [Hash] params ({})
283
+ def get_event_source(params = {}, options = {})
284
+ req = build_request(:get_event_source, params)
285
+ req.send_request(options)
286
+ end
287
+
288
+ # Returns the configuration information of the Lambda function and a
289
+ # presigned URL link to the .zip file you uploaded with UploadFunction
290
+ # so you can download the .zip file. Note that the URL is valid for up
291
+ # to 10 minutes. The configuration information is the same information
292
+ # you provided as parameters when uploading the function.
293
+ #
294
+ # This operation requires permission for the `lambda:GetFunction`
295
+ # action.
296
+ # @option params [required, String] :function_name
297
+ # The Lambda function name.
298
+ # @return [Types::GetFunctionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
299
+ #
300
+ # * {Types::GetFunctionResponse#configuration #Configuration} => Types::FunctionConfiguration
301
+ # * {Types::GetFunctionResponse#code #Code} => Types::FunctionCodeLocation
302
+ #
303
+ # @example Request syntax with placeholder values
304
+ # resp = client.get_function({
305
+ # function_name: "FunctionName", # required
306
+ # })
307
+ #
308
+ # @example Response structure
309
+ # resp.configuration.function_name #=> String
310
+ # resp.configuration.function_arn #=> String
311
+ # resp.configuration.configuration_id #=> String
312
+ # resp.configuration.runtime #=> String, one of "nodejs"
313
+ # resp.configuration.role #=> String
314
+ # resp.configuration.handler #=> String
315
+ # resp.configuration.mode #=> String, one of "event"
316
+ # resp.configuration.code_size #=> Integer
317
+ # resp.configuration.description #=> String
318
+ # resp.configuration.timeout #=> Integer
319
+ # resp.configuration.memory_size #=> Integer
320
+ # resp.configuration.last_modified #=> Time
321
+ # resp.code.repository_type #=> String
322
+ # resp.code.location #=> String
323
+ # @overload get_function(params = {})
324
+ # @param [Hash] params ({})
325
+ def get_function(params = {}, options = {})
326
+ req = build_request(:get_function, params)
327
+ req.send_request(options)
328
+ end
329
+
330
+ # Returns the configuration information of the Lambda function. This the
331
+ # same information you provided as parameters when uploading the
332
+ # function by using UploadFunction.
333
+ #
334
+ # This operation requires permission for the
335
+ # `lambda:GetFunctionConfiguration` operation.
336
+ # @option params [required, String] :function_name
337
+ # The name of the Lambda function for which you want to retrieve the
338
+ # configuration information.
339
+ # @return [Types::FunctionConfiguration] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
340
+ #
341
+ # * {Types::FunctionConfiguration#function_name #FunctionName} => String
342
+ # * {Types::FunctionConfiguration#function_arn #FunctionARN} => String
343
+ # * {Types::FunctionConfiguration#configuration_id #ConfigurationId} => String
344
+ # * {Types::FunctionConfiguration#runtime #Runtime} => String
345
+ # * {Types::FunctionConfiguration#role #Role} => String
346
+ # * {Types::FunctionConfiguration#handler #Handler} => String
347
+ # * {Types::FunctionConfiguration#mode #Mode} => String
348
+ # * {Types::FunctionConfiguration#code_size #CodeSize} => Integer
349
+ # * {Types::FunctionConfiguration#description #Description} => String
350
+ # * {Types::FunctionConfiguration#timeout #Timeout} => Integer
351
+ # * {Types::FunctionConfiguration#memory_size #MemorySize} => Integer
352
+ # * {Types::FunctionConfiguration#last_modified #LastModified} => Time
353
+ #
354
+ # @example Request syntax with placeholder values
355
+ # resp = client.get_function_configuration({
356
+ # function_name: "FunctionName", # required
357
+ # })
358
+ #
359
+ # @example Response structure
360
+ # resp.function_name #=> String
361
+ # resp.function_arn #=> String
362
+ # resp.configuration_id #=> String
363
+ # resp.runtime #=> String, one of "nodejs"
364
+ # resp.role #=> String
365
+ # resp.handler #=> String
366
+ # resp.mode #=> String, one of "event"
367
+ # resp.code_size #=> Integer
368
+ # resp.description #=> String
369
+ # resp.timeout #=> Integer
370
+ # resp.memory_size #=> Integer
371
+ # resp.last_modified #=> Time
372
+ # @overload get_function_configuration(params = {})
373
+ # @param [Hash] params ({})
374
+ def get_function_configuration(params = {}, options = {})
375
+ req = build_request(:get_function_configuration, params)
376
+ req.send_request(options)
377
+ end
378
+
379
+ # Submits an invocation request to AWS Lambda. Upon receiving the
380
+ # request, Lambda executes the specified function asynchronously. To see
381
+ # the logs generated by the Lambda function execution, see the
382
+ # CloudWatch logs console.
383
+ #
384
+ # This operation requires permission for the `lambda:InvokeFunction`
385
+ # action.
386
+ # @option params [required, String] :function_name
387
+ # The Lambda function name.
388
+ # @option params [required, String, IO] :invoke_args
389
+ # JSON that you want to provide to your Lambda function as input.
390
+ # @return [Types::InvokeAsyncResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
391
+ #
392
+ # * {Types::InvokeAsyncResponse#status #Status} => Integer
393
+ #
394
+ # @example Request syntax with placeholder values
395
+ # resp = client.invoke_async({
396
+ # function_name: "FunctionName", # required
397
+ # invoke_args: "data", # required
398
+ # })
399
+ #
400
+ # @example Response structure
401
+ # resp.status #=> Integer
402
+ # @overload invoke_async(params = {})
403
+ # @param [Hash] params ({})
404
+ def invoke_async(params = {}, options = {})
405
+ req = build_request(:invoke_async, params)
406
+ req.send_request(options)
407
+ end
408
+
409
+ # Returns a list of event source mappings you created using the
410
+ # `AddEventSource` (see AddEventSource), where you identify a stream as
411
+ # event source. This list does not include Amazon S3 event sources.
412
+ #
413
+ # For each mapping, the API returns configuration information. You can
414
+ # optionally specify filters to retrieve specific event source mappings.
415
+ #
416
+ # This operation requires permission for the `lambda:ListEventSources`
417
+ # action.
418
+ # @option params [String] :event_source_arn
419
+ # The Amazon Resource Name (ARN) of the Amazon Kinesis stream.
420
+ # @option params [String] :function_name
421
+ # The name of the AWS Lambda function.
422
+ # @option params [String] :marker
423
+ # Optional string. An opaque pagination token returned from a previous
424
+ # `ListEventSources` operation. If present, specifies to continue the
425
+ # list from where the returning call left off.
426
+ # @option params [Integer] :max_items
427
+ # Optional integer. Specifies the maximum number of event sources to
428
+ # return in response. This value must be greater than 0.
429
+ # @return [Types::ListEventSourcesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
430
+ #
431
+ # * {Types::ListEventSourcesResponse#next_marker #NextMarker} => String
432
+ # * {Types::ListEventSourcesResponse#event_sources #EventSources} => Array&lt;Types::EventSourceConfiguration&gt;
433
+ #
434
+ # @example Request syntax with placeholder values
435
+ # resp = client.list_event_sources({
436
+ # event_source_arn: "String",
437
+ # function_name: "FunctionName",
438
+ # marker: "String",
439
+ # max_items: 1,
440
+ # })
441
+ #
442
+ # @example Response structure
443
+ # resp.next_marker #=> String
444
+ # resp.event_sources #=> Array
445
+ # resp.event_sources[0].uuid #=> String
446
+ # resp.event_sources[0].batch_size #=> Integer
447
+ # resp.event_sources[0].event_source #=> String
448
+ # resp.event_sources[0].function_name #=> String
449
+ # resp.event_sources[0].parameters #=> Hash
450
+ # resp.event_sources[0].parameters["String"] #=> String
451
+ # resp.event_sources[0].role #=> String
452
+ # resp.event_sources[0].last_modified #=> Time
453
+ # resp.event_sources[0].is_active #=> Boolean
454
+ # resp.event_sources[0].status #=> String
455
+ # @overload list_event_sources(params = {})
456
+ # @param [Hash] params ({})
457
+ def list_event_sources(params = {}, options = {})
458
+ req = build_request(:list_event_sources, params)
459
+ req.send_request(options)
460
+ end
461
+
462
+ # Returns a list of your Lambda functions. For each function, the
463
+ # response includes the function configuration information. You must use
464
+ # GetFunction to retrieve the code for your function.
465
+ #
466
+ # This operation requires permission for the `lambda:ListFunctions`
467
+ # action.
468
+ # @option params [String] :marker
469
+ # Optional string. An opaque pagination token returned from a previous
470
+ # `ListFunctions` operation. If present, indicates where to continue the
471
+ # listing.
472
+ # @option params [Integer] :max_items
473
+ # Optional integer. Specifies the maximum number of AWS Lambda functions
474
+ # to return in response. This parameter value must be greater than 0.
475
+ # @return [Types::ListFunctionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
476
+ #
477
+ # * {Types::ListFunctionsResponse#next_marker #NextMarker} => String
478
+ # * {Types::ListFunctionsResponse#functions #Functions} => Array&lt;Types::FunctionConfiguration&gt;
479
+ #
480
+ # @example Request syntax with placeholder values
481
+ # resp = client.list_functions({
482
+ # marker: "String",
483
+ # max_items: 1,
484
+ # })
485
+ #
486
+ # @example Response structure
487
+ # resp.next_marker #=> String
488
+ # resp.functions #=> Array
489
+ # resp.functions[0].function_name #=> String
490
+ # resp.functions[0].function_arn #=> String
491
+ # resp.functions[0].configuration_id #=> String
492
+ # resp.functions[0].runtime #=> String, one of "nodejs"
493
+ # resp.functions[0].role #=> String
494
+ # resp.functions[0].handler #=> String
495
+ # resp.functions[0].mode #=> String, one of "event"
496
+ # resp.functions[0].code_size #=> Integer
497
+ # resp.functions[0].description #=> String
498
+ # resp.functions[0].timeout #=> Integer
499
+ # resp.functions[0].memory_size #=> Integer
500
+ # resp.functions[0].last_modified #=> Time
501
+ # @overload list_functions(params = {})
502
+ # @param [Hash] params ({})
503
+ def list_functions(params = {}, options = {})
504
+ req = build_request(:list_functions, params)
505
+ req.send_request(options)
506
+ end
507
+
508
+ # Removes an event source mapping. This means AWS Lambda will no longer
509
+ # invoke the function for events in the associated source.
510
+ #
511
+ # This operation requires permission for the `lambda:RemoveEventSource`
512
+ # action.
513
+ # @option params [required, String] :uuid
514
+ # The event source mapping ID.
515
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
516
+ #
517
+ # @example Request syntax with placeholder values
518
+ # resp = client.remove_event_source({
519
+ # uuid: "String", # required
520
+ # })
521
+ # @overload remove_event_source(params = {})
522
+ # @param [Hash] params ({})
523
+ def remove_event_source(params = {}, options = {})
524
+ req = build_request(:remove_event_source, params)
525
+ req.send_request(options)
526
+ end
527
+
528
+ # Updates the configuration parameters for the specified Lambda function
529
+ # by using the values provided in the request. You provide only the
530
+ # parameters you want to change. This operation must only be used on an
531
+ # existing Lambda function and cannot be used to update the function's
532
+ # code.
533
+ #
534
+ # This operation requires permission for the
535
+ # `lambda:UpdateFunctionConfiguration` action.
536
+ # @option params [required, String] :function_name
537
+ # The name of the Lambda function.
538
+ # @option params [String] :role
539
+ # The Amazon Resource Name (ARN) of the IAM role that Lambda will assume
540
+ # when it executes your function.
541
+ # @option params [String] :handler
542
+ # The function that Lambda calls to begin executing your function. For
543
+ # Node.js, it is the *module-name.export* value in your function.
544
+ # @option params [String] :description
545
+ # A short user-defined function description. Lambda does not use this
546
+ # value. Assign a meaningful description as you see fit.
547
+ # @option params [Integer] :timeout
548
+ # The function execution time at which Lambda should terminate the
549
+ # function. Because the execution time has cost implications, we
550
+ # recommend you set this value based on your expected execution time.
551
+ # The default is 3 seconds.
552
+ # @option params [Integer] :memory_size
553
+ # The amount of memory, in MB, your Lambda function is given. Lambda
554
+ # uses this memory size to infer the amount of CPU allocated to your
555
+ # function. Your function use-case determines your CPU and memory
556
+ # requirements. For example, a database operation might need less memory
557
+ # compared to an image processing function. The default value is 128 MB.
558
+ # The value must be a multiple of 64 MB.
559
+ # @return [Types::FunctionConfiguration] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
560
+ #
561
+ # * {Types::FunctionConfiguration#function_name #FunctionName} => String
562
+ # * {Types::FunctionConfiguration#function_arn #FunctionARN} => String
563
+ # * {Types::FunctionConfiguration#configuration_id #ConfigurationId} => String
564
+ # * {Types::FunctionConfiguration#runtime #Runtime} => String
565
+ # * {Types::FunctionConfiguration#role #Role} => String
566
+ # * {Types::FunctionConfiguration#handler #Handler} => String
567
+ # * {Types::FunctionConfiguration#mode #Mode} => String
568
+ # * {Types::FunctionConfiguration#code_size #CodeSize} => Integer
569
+ # * {Types::FunctionConfiguration#description #Description} => String
570
+ # * {Types::FunctionConfiguration#timeout #Timeout} => Integer
571
+ # * {Types::FunctionConfiguration#memory_size #MemorySize} => Integer
572
+ # * {Types::FunctionConfiguration#last_modified #LastModified} => Time
573
+ #
574
+ # @example Request syntax with placeholder values
575
+ # resp = client.update_function_configuration({
576
+ # function_name: "FunctionName", # required
577
+ # role: "RoleArn",
578
+ # handler: "Handler",
579
+ # description: "Description",
580
+ # timeout: 1,
581
+ # memory_size: 1,
582
+ # })
583
+ #
584
+ # @example Response structure
585
+ # resp.function_name #=> String
586
+ # resp.function_arn #=> String
587
+ # resp.configuration_id #=> String
588
+ # resp.runtime #=> String, one of "nodejs"
589
+ # resp.role #=> String
590
+ # resp.handler #=> String
591
+ # resp.mode #=> String, one of "event"
592
+ # resp.code_size #=> Integer
593
+ # resp.description #=> String
594
+ # resp.timeout #=> Integer
595
+ # resp.memory_size #=> Integer
596
+ # resp.last_modified #=> Time
597
+ # @overload update_function_configuration(params = {})
598
+ # @param [Hash] params ({})
599
+ def update_function_configuration(params = {}, options = {})
600
+ req = build_request(:update_function_configuration, params)
601
+ req.send_request(options)
602
+ end
603
+
604
+ # Creates a new Lambda function or updates an existing function. The
605
+ # function metadata is created from the request parameters, and the code
606
+ # for the function is provided by a .zip file in the request body. If
607
+ # the function name already exists, the existing Lambda function is
608
+ # updated with the new code and metadata.
609
+ #
610
+ # This operation requires permission for the `lambda:UploadFunction`
611
+ # action.
612
+ # @option params [required, String] :function_name
613
+ # The name you want to assign to the function you are uploading. The
614
+ # function names appear in the console and are returned in the
615
+ # ListFunctions API. Function names are used to specify functions to
616
+ # other AWS Lambda APIs, such as InvokeAsync.
617
+ # @option params [required, String, IO] :function_zip
618
+ # A .zip file containing your packaged source code. For more information
619
+ # about creating a .zip file, go to [AWS LambdaL How it Works][1] in the
620
+ # AWS Lambda Developer Guide.
621
+ #
622
+ #
623
+ #
624
+ # [1]: http://docs.aws.amazon.com/lambda/latest/dg/walkthrough-custom-events.html
625
+ # @option params [required, String] :runtime
626
+ # The runtime environment for the Lambda function you are uploading.
627
+ # Currently, Lambda supports only "nodejs" as the runtime.
628
+ # @option params [required, String] :role
629
+ # The Amazon Resource Name (ARN) of the IAM role that Lambda assumes
630
+ # when it executes your function to access any other Amazon Web Services
631
+ # (AWS) resources.
632
+ # @option params [required, String] :handler
633
+ # The function that Lambda calls to begin execution. For Node.js, it is
634
+ # the *module-name*.*export* value in your function.
635
+ # @option params [required, String] :mode
636
+ # How the Lambda function will be invoked. Lambda supports only the
637
+ # "event" mode.
638
+ # @option params [String] :description
639
+ # A short, user-defined function description. Lambda does not use this
640
+ # value. Assign a meaningful description as you see fit.
641
+ # @option params [Integer] :timeout
642
+ # The function execution time at which Lambda should terminate the
643
+ # function. Because the execution time has cost implications, we
644
+ # recommend you set this value based on your expected execution time.
645
+ # The default is 3 seconds.
646
+ # @option params [Integer] :memory_size
647
+ # The amount of memory, in MB, your Lambda function is given. Lambda
648
+ # uses this memory size to infer the amount of CPU allocated to your
649
+ # function. Your function use-case determines your CPU and memory
650
+ # requirements. For example, database operation might need less memory
651
+ # compared to image processing function. The default value is 128 MB.
652
+ # The value must be a multiple of 64 MB.
653
+ # @return [Types::FunctionConfiguration] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
654
+ #
655
+ # * {Types::FunctionConfiguration#function_name #FunctionName} => String
656
+ # * {Types::FunctionConfiguration#function_arn #FunctionARN} => String
657
+ # * {Types::FunctionConfiguration#configuration_id #ConfigurationId} => String
658
+ # * {Types::FunctionConfiguration#runtime #Runtime} => String
659
+ # * {Types::FunctionConfiguration#role #Role} => String
660
+ # * {Types::FunctionConfiguration#handler #Handler} => String
661
+ # * {Types::FunctionConfiguration#mode #Mode} => String
662
+ # * {Types::FunctionConfiguration#code_size #CodeSize} => Integer
663
+ # * {Types::FunctionConfiguration#description #Description} => String
664
+ # * {Types::FunctionConfiguration#timeout #Timeout} => Integer
665
+ # * {Types::FunctionConfiguration#memory_size #MemorySize} => Integer
666
+ # * {Types::FunctionConfiguration#last_modified #LastModified} => Time
667
+ #
668
+ # @example Request syntax with placeholder values
669
+ # resp = client.upload_function({
670
+ # function_name: "FunctionName", # required
671
+ # function_zip: "data", # required
672
+ # runtime: "nodejs", # required, accepts nodejs
673
+ # role: "RoleArn", # required
674
+ # handler: "Handler", # required
675
+ # mode: "event", # required, accepts event
676
+ # description: "Description",
677
+ # timeout: 1,
678
+ # memory_size: 1,
679
+ # })
680
+ #
681
+ # @example Response structure
682
+ # resp.function_name #=> String
683
+ # resp.function_arn #=> String
684
+ # resp.configuration_id #=> String
685
+ # resp.runtime #=> String, one of "nodejs"
686
+ # resp.role #=> String
687
+ # resp.handler #=> String
688
+ # resp.mode #=> String, one of "event"
689
+ # resp.code_size #=> Integer
690
+ # resp.description #=> String
691
+ # resp.timeout #=> Integer
692
+ # resp.memory_size #=> Integer
693
+ # resp.last_modified #=> Time
694
+ # @overload upload_function(params = {})
695
+ # @param [Hash] params ({})
696
+ def upload_function(params = {}, options = {})
697
+ req = build_request(:upload_function, params)
698
+ req.send_request(options)
699
+ end
700
+
701
+ # @!endgroup
702
+
703
+ # @param params ({})
704
+ # @api private
705
+ def build_request(operation_name, params = {})
706
+ handlers = @handlers.for(operation_name)
707
+ context = Seahorse::Client::RequestContext.new(
708
+ operation_name: operation_name,
709
+ operation: config.api.operation(operation_name),
710
+ client: self,
711
+ params: params,
712
+ config: config)
713
+ context[:gem_name] = 'aws-sdk-lambdapreview'
714
+ context[:gem_version] = '1.0.0.rc1'
715
+ Seahorse::Client::Request.new(handlers, context)
716
+ end
717
+
718
+ # @api private
719
+ # @deprecated
720
+ def waiter_names
721
+ []
722
+ end
723
+
724
+ class << self
725
+
726
+ # @api private
727
+ attr_reader :identifier
728
+
729
+ # @api private
730
+ def errors_module
731
+ Errors
732
+ end
733
+
734
+ end
735
+ end
736
+ end
737
+ end