aws-sdk-lambdapreview 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,559 @@
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
+ module Aws
9
+ module LambdaPreview
10
+ module Types
11
+
12
+ # @note When making an API call, pass AddEventSourceRequest
13
+ # data as a hash:
14
+ #
15
+ # {
16
+ # event_source: "String", # required
17
+ # function_name: "FunctionName", # required
18
+ # role: "RoleArn", # required
19
+ # batch_size: 1,
20
+ # parameters: {
21
+ # "String" => "String",
22
+ # },
23
+ # }
24
+ # @!attribute [rw] event_source
25
+ # The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is
26
+ # the event source. Any record added to this stream causes AWS Lambda
27
+ # to invoke your Lambda function. AWS Lambda POSTs the Amazon Kinesis
28
+ # event, containing records, to your Lambda function as JSON.
29
+ # @return [String]
30
+ #
31
+ # @!attribute [rw] function_name
32
+ # The Lambda function to invoke when AWS Lambda detects an event on
33
+ # the stream.
34
+ # @return [String]
35
+ #
36
+ # @!attribute [rw] role
37
+ # The ARN of the IAM role (invocation role) that AWS Lambda can assume
38
+ # to read from the stream and invoke the function.
39
+ # @return [String]
40
+ #
41
+ # @!attribute [rw] batch_size
42
+ # The largest number of records that AWS Lambda will give to your
43
+ # function in a single event. The default is 100 records.
44
+ # @return [Integer]
45
+ #
46
+ # @!attribute [rw] parameters
47
+ # A map (key-value pairs) defining the configuration for AWS Lambda to
48
+ # use when reading the event source. Currently, AWS Lambda supports
49
+ # only the `InitialPositionInStream` key. The valid values are:
50
+ # "TRIM\_HORIZON" and "LATEST". The default value is
51
+ # "TRIM\_HORIZON". For more information, go to
52
+ # [ShardIteratorType][1] in the Amazon Kinesis Service API Reference.
53
+ #
54
+ #
55
+ #
56
+ # [1]: http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType
57
+ # @return [Hash<String,String>]
58
+ class AddEventSourceRequest < Struct.new(
59
+ :event_source,
60
+ :function_name,
61
+ :role,
62
+ :batch_size,
63
+ :parameters)
64
+ include Aws::Structure
65
+ end
66
+
67
+ # @note When making an API call, pass DeleteFunctionRequest
68
+ # data as a hash:
69
+ #
70
+ # {
71
+ # function_name: "FunctionName", # required
72
+ # }
73
+ # @!attribute [rw] function_name
74
+ # The Lambda function to delete.
75
+ # @return [String]
76
+ class DeleteFunctionRequest < Struct.new(
77
+ :function_name)
78
+ include Aws::Structure
79
+ end
80
+
81
+ # Describes mapping between an Amazon Kinesis stream and a Lambda
82
+ # function.
83
+ # @!attribute [rw] uuid
84
+ # The AWS Lambda assigned opaque identifier for the mapping.
85
+ # @return [String]
86
+ #
87
+ # @!attribute [rw] batch_size
88
+ # The largest number of records that AWS Lambda will POST in the
89
+ # invocation request to your function.
90
+ # @return [Integer]
91
+ #
92
+ # @!attribute [rw] event_source
93
+ # The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is
94
+ # the source of events.
95
+ # @return [String]
96
+ #
97
+ # @!attribute [rw] function_name
98
+ # The Lambda function to invoke when AWS Lambda detects an event on
99
+ # the stream.
100
+ # @return [String]
101
+ #
102
+ # @!attribute [rw] parameters
103
+ # The map (key-value pairs) defining the configuration for AWS Lambda
104
+ # to use when reading the event source.
105
+ # @return [Hash<String,String>]
106
+ #
107
+ # @!attribute [rw] role
108
+ # The ARN of the IAM role (invocation role) that AWS Lambda can assume
109
+ # to read from the stream and invoke the function.
110
+ # @return [String]
111
+ #
112
+ # @!attribute [rw] last_modified
113
+ # The UTC time string indicating the last time the event mapping was
114
+ # updated.
115
+ # @return [Time]
116
+ #
117
+ # @!attribute [rw] is_active
118
+ # Indicates whether the event source mapping is currently honored.
119
+ # Events are only processes if IsActive is true.
120
+ # @return [Boolean]
121
+ #
122
+ # @!attribute [rw] status
123
+ # The description of the health of the event source mapping. Valid
124
+ # values are: "PENDING", "OK", and "PROBLEM:*message*".
125
+ # Initially this staus is "PENDING". When AWS Lambda begins
126
+ # processing events, it changes the status to "OK".
127
+ # @return [String]
128
+ class EventSourceConfiguration < Struct.new(
129
+ :uuid,
130
+ :batch_size,
131
+ :event_source,
132
+ :function_name,
133
+ :parameters,
134
+ :role,
135
+ :last_modified,
136
+ :is_active,
137
+ :status)
138
+ include Aws::Structure
139
+ end
140
+
141
+ # The object for the Lambda function location.
142
+ # @!attribute [rw] repository_type
143
+ # The repository from which you can download the function.
144
+ # @return [String]
145
+ #
146
+ # @!attribute [rw] location
147
+ # The presigned URL you can use to download the function's .zip file
148
+ # that you previously uploaded. The URL is valid for up to 10 minutes.
149
+ # @return [String]
150
+ class FunctionCodeLocation < Struct.new(
151
+ :repository_type,
152
+ :location)
153
+ include Aws::Structure
154
+ end
155
+
156
+ # A complex type that describes function metadata.
157
+ # @!attribute [rw] function_name
158
+ # The name of the function.
159
+ # @return [String]
160
+ #
161
+ # @!attribute [rw] function_arn
162
+ # The Amazon Resource Name (ARN) assigned to the function.
163
+ # @return [String]
164
+ #
165
+ # @!attribute [rw] configuration_id
166
+ # A Lambda-assigned unique identifier for the current function code
167
+ # and related configuration.
168
+ # @return [String]
169
+ #
170
+ # @!attribute [rw] runtime
171
+ # The runtime environment for the Lambda function.
172
+ # @return [String]
173
+ #
174
+ # @!attribute [rw] role
175
+ # The Amazon Resource Name (ARN) of the IAM role that Lambda assumes
176
+ # when it executes your function to access any other Amazon Web
177
+ # Services (AWS) resources.
178
+ # @return [String]
179
+ #
180
+ # @!attribute [rw] handler
181
+ # The function Lambda calls to begin executing your function.
182
+ # @return [String]
183
+ #
184
+ # @!attribute [rw] mode
185
+ # The type of the Lambda function you uploaded.
186
+ # @return [String]
187
+ #
188
+ # @!attribute [rw] code_size
189
+ # The size, in bytes, of the function .zip file you uploaded.
190
+ # @return [Integer]
191
+ #
192
+ # @!attribute [rw] description
193
+ # The user-provided description.
194
+ # @return [String]
195
+ #
196
+ # @!attribute [rw] timeout
197
+ # The function execution time at which Lambda should terminate the
198
+ # function. Because the execution time has cost implications, we
199
+ # recommend you set this value based on your expected execution time.
200
+ # The default is 3 seconds.
201
+ # @return [Integer]
202
+ #
203
+ # @!attribute [rw] memory_size
204
+ # The memory size, in MB, you configured for the function. Must be a
205
+ # multiple of 64 MB.
206
+ # @return [Integer]
207
+ #
208
+ # @!attribute [rw] last_modified
209
+ # The timestamp of the last time you updated the function.
210
+ # @return [Time]
211
+ class FunctionConfiguration < Struct.new(
212
+ :function_name,
213
+ :function_arn,
214
+ :configuration_id,
215
+ :runtime,
216
+ :role,
217
+ :handler,
218
+ :mode,
219
+ :code_size,
220
+ :description,
221
+ :timeout,
222
+ :memory_size,
223
+ :last_modified)
224
+ include Aws::Structure
225
+ end
226
+
227
+ # @note When making an API call, pass GetEventSourceRequest
228
+ # data as a hash:
229
+ #
230
+ # {
231
+ # uuid: "String", # required
232
+ # }
233
+ # @!attribute [rw] uuid
234
+ # The AWS Lambda assigned ID of the event source mapping.
235
+ # @return [String]
236
+ class GetEventSourceRequest < Struct.new(
237
+ :uuid)
238
+ include Aws::Structure
239
+ end
240
+
241
+ # @note When making an API call, pass GetFunctionConfigurationRequest
242
+ # data as a hash:
243
+ #
244
+ # {
245
+ # function_name: "FunctionName", # required
246
+ # }
247
+ # @!attribute [rw] function_name
248
+ # The name of the Lambda function for which you want to retrieve the
249
+ # configuration information.
250
+ # @return [String]
251
+ class GetFunctionConfigurationRequest < Struct.new(
252
+ :function_name)
253
+ include Aws::Structure
254
+ end
255
+
256
+ # @note When making an API call, pass GetFunctionRequest
257
+ # data as a hash:
258
+ #
259
+ # {
260
+ # function_name: "FunctionName", # required
261
+ # }
262
+ # @!attribute [rw] function_name
263
+ # The Lambda function name.
264
+ # @return [String]
265
+ class GetFunctionRequest < Struct.new(
266
+ :function_name)
267
+ include Aws::Structure
268
+ end
269
+
270
+ # This response contains the object for AWS Lambda function location
271
+ # (see API\_FunctionCodeLocation
272
+ # @!attribute [rw] configuration
273
+ # A complex type that describes function metadata.
274
+ # @return [Types::FunctionConfiguration]
275
+ #
276
+ # @!attribute [rw] code
277
+ # The object for the Lambda function location.
278
+ # @return [Types::FunctionCodeLocation]
279
+ class GetFunctionResponse < Struct.new(
280
+ :configuration,
281
+ :code)
282
+ include Aws::Structure
283
+ end
284
+
285
+ # @note When making an API call, pass InvokeAsyncRequest
286
+ # data as a hash:
287
+ #
288
+ # {
289
+ # function_name: "FunctionName", # required
290
+ # invoke_args: "data", # required
291
+ # }
292
+ # @!attribute [rw] function_name
293
+ # The Lambda function name.
294
+ # @return [String]
295
+ #
296
+ # @!attribute [rw] invoke_args
297
+ # JSON that you want to provide to your Lambda function as input.
298
+ # @return [IO]
299
+ class InvokeAsyncRequest < Struct.new(
300
+ :function_name,
301
+ :invoke_args)
302
+ include Aws::Structure
303
+ end
304
+
305
+ # Upon success, it returns empty response. Otherwise, throws an
306
+ # exception.
307
+ # @!attribute [rw] status
308
+ # It will be 202 upon success.
309
+ # @return [Integer]
310
+ class InvokeAsyncResponse < Struct.new(
311
+ :status)
312
+ include Aws::Structure
313
+ end
314
+
315
+ # @note When making an API call, pass ListEventSourcesRequest
316
+ # data as a hash:
317
+ #
318
+ # {
319
+ # event_source_arn: "String",
320
+ # function_name: "FunctionName",
321
+ # marker: "String",
322
+ # max_items: 1,
323
+ # }
324
+ # @!attribute [rw] event_source_arn
325
+ # The Amazon Resource Name (ARN) of the Amazon Kinesis stream.
326
+ # @return [String]
327
+ #
328
+ # @!attribute [rw] function_name
329
+ # The name of the AWS Lambda function.
330
+ # @return [String]
331
+ #
332
+ # @!attribute [rw] marker
333
+ # Optional string. An opaque pagination token returned from a previous
334
+ # `ListEventSources` operation. If present, specifies to continue the
335
+ # list from where the returning call left off.
336
+ # @return [String]
337
+ #
338
+ # @!attribute [rw] max_items
339
+ # Optional integer. Specifies the maximum number of event sources to
340
+ # return in response. This value must be greater than 0.
341
+ # @return [Integer]
342
+ class ListEventSourcesRequest < Struct.new(
343
+ :event_source_arn,
344
+ :function_name,
345
+ :marker,
346
+ :max_items)
347
+ include Aws::Structure
348
+ end
349
+
350
+ # Contains a list of event sources (see API\_EventSourceConfiguration)
351
+ # @!attribute [rw] next_marker
352
+ # A string, present if there are more event source mappings.
353
+ # @return [String]
354
+ #
355
+ # @!attribute [rw] event_sources
356
+ # An arrary of `EventSourceConfiguration` objects.
357
+ # @return [Array<Types::EventSourceConfiguration>]
358
+ class ListEventSourcesResponse < Struct.new(
359
+ :next_marker,
360
+ :event_sources)
361
+ include Aws::Structure
362
+ end
363
+
364
+ # @note When making an API call, pass ListFunctionsRequest
365
+ # data as a hash:
366
+ #
367
+ # {
368
+ # marker: "String",
369
+ # max_items: 1,
370
+ # }
371
+ # @!attribute [rw] marker
372
+ # Optional string. An opaque pagination token returned from a previous
373
+ # `ListFunctions` operation. If present, indicates where to continue
374
+ # the listing.
375
+ # @return [String]
376
+ #
377
+ # @!attribute [rw] max_items
378
+ # Optional integer. Specifies the maximum number of AWS Lambda
379
+ # functions to return in response. This parameter value must be
380
+ # greater than 0.
381
+ # @return [Integer]
382
+ class ListFunctionsRequest < Struct.new(
383
+ :marker,
384
+ :max_items)
385
+ include Aws::Structure
386
+ end
387
+
388
+ # Contains a list of AWS Lambda function configurations (see
389
+ # API\_FunctionConfiguration.
390
+ # @!attribute [rw] next_marker
391
+ # A string, present if there are more functions.
392
+ # @return [String]
393
+ #
394
+ # @!attribute [rw] functions
395
+ # A list of Lambda functions.
396
+ # @return [Array<Types::FunctionConfiguration>]
397
+ class ListFunctionsResponse < Struct.new(
398
+ :next_marker,
399
+ :functions)
400
+ include Aws::Structure
401
+ end
402
+
403
+ # @note When making an API call, pass RemoveEventSourceRequest
404
+ # data as a hash:
405
+ #
406
+ # {
407
+ # uuid: "String", # required
408
+ # }
409
+ # @!attribute [rw] uuid
410
+ # The event source mapping ID.
411
+ # @return [String]
412
+ class RemoveEventSourceRequest < Struct.new(
413
+ :uuid)
414
+ include Aws::Structure
415
+ end
416
+
417
+ # @note When making an API call, pass UpdateFunctionConfigurationRequest
418
+ # data as a hash:
419
+ #
420
+ # {
421
+ # function_name: "FunctionName", # required
422
+ # role: "RoleArn",
423
+ # handler: "Handler",
424
+ # description: "Description",
425
+ # timeout: 1,
426
+ # memory_size: 1,
427
+ # }
428
+ # @!attribute [rw] function_name
429
+ # The name of the Lambda function.
430
+ # @return [String]
431
+ #
432
+ # @!attribute [rw] role
433
+ # The Amazon Resource Name (ARN) of the IAM role that Lambda will
434
+ # assume when it executes your function.
435
+ # @return [String]
436
+ #
437
+ # @!attribute [rw] handler
438
+ # The function that Lambda calls to begin executing your function. For
439
+ # Node.js, it is the *module-name.export* value in your function.
440
+ # @return [String]
441
+ #
442
+ # @!attribute [rw] description
443
+ # A short user-defined function description. Lambda does not use this
444
+ # value. Assign a meaningful description as you see fit.
445
+ # @return [String]
446
+ #
447
+ # @!attribute [rw] timeout
448
+ # The function execution time at which Lambda should terminate the
449
+ # function. Because the execution time has cost implications, we
450
+ # recommend you set this value based on your expected execution time.
451
+ # The default is 3 seconds.
452
+ # @return [Integer]
453
+ #
454
+ # @!attribute [rw] memory_size
455
+ # The amount of memory, in MB, your Lambda function is given. Lambda
456
+ # uses this memory size to infer the amount of CPU allocated to your
457
+ # function. Your function use-case determines your CPU and memory
458
+ # requirements. For example, a database operation might need less
459
+ # memory compared to an image processing function. The default value
460
+ # is 128 MB. The value must be a multiple of 64 MB.
461
+ # @return [Integer]
462
+ class UpdateFunctionConfigurationRequest < Struct.new(
463
+ :function_name,
464
+ :role,
465
+ :handler,
466
+ :description,
467
+ :timeout,
468
+ :memory_size)
469
+ include Aws::Structure
470
+ end
471
+
472
+ # @note When making an API call, pass UploadFunctionRequest
473
+ # data as a hash:
474
+ #
475
+ # {
476
+ # function_name: "FunctionName", # required
477
+ # function_zip: "data", # required
478
+ # runtime: "nodejs", # required, accepts nodejs
479
+ # role: "RoleArn", # required
480
+ # handler: "Handler", # required
481
+ # mode: "event", # required, accepts event
482
+ # description: "Description",
483
+ # timeout: 1,
484
+ # memory_size: 1,
485
+ # }
486
+ # @!attribute [rw] function_name
487
+ # The name you want to assign to the function you are uploading. The
488
+ # function names appear in the console and are returned in the
489
+ # ListFunctions API. Function names are used to specify functions to
490
+ # other AWS Lambda APIs, such as InvokeAsync.
491
+ # @return [String]
492
+ #
493
+ # @!attribute [rw] function_zip
494
+ # A .zip file containing your packaged source code. For more
495
+ # information about creating a .zip file, go to [AWS LambdaL How it
496
+ # Works][1] in the AWS Lambda Developer Guide.
497
+ #
498
+ #
499
+ #
500
+ # [1]: http://docs.aws.amazon.com/lambda/latest/dg/walkthrough-custom-events.html
501
+ # @return [IO]
502
+ #
503
+ # @!attribute [rw] runtime
504
+ # The runtime environment for the Lambda function you are uploading.
505
+ # Currently, Lambda supports only "nodejs" as the runtime.
506
+ # @return [String]
507
+ #
508
+ # @!attribute [rw] role
509
+ # The Amazon Resource Name (ARN) of the IAM role that Lambda assumes
510
+ # when it executes your function to access any other Amazon Web
511
+ # Services (AWS) resources.
512
+ # @return [String]
513
+ #
514
+ # @!attribute [rw] handler
515
+ # The function that Lambda calls to begin execution. For Node.js, it
516
+ # is the *module-name*.*export* value in your function.
517
+ # @return [String]
518
+ #
519
+ # @!attribute [rw] mode
520
+ # How the Lambda function will be invoked. Lambda supports only the
521
+ # "event" mode.
522
+ # @return [String]
523
+ #
524
+ # @!attribute [rw] description
525
+ # A short, user-defined function description. Lambda does not use this
526
+ # value. Assign a meaningful description as you see fit.
527
+ # @return [String]
528
+ #
529
+ # @!attribute [rw] timeout
530
+ # The function execution time at which Lambda should terminate the
531
+ # function. Because the execution time has cost implications, we
532
+ # recommend you set this value based on your expected execution time.
533
+ # The default is 3 seconds.
534
+ # @return [Integer]
535
+ #
536
+ # @!attribute [rw] memory_size
537
+ # The amount of memory, in MB, your Lambda function is given. Lambda
538
+ # uses this memory size to infer the amount of CPU allocated to your
539
+ # function. Your function use-case determines your CPU and memory
540
+ # requirements. For example, database operation might need less memory
541
+ # compared to image processing function. The default value is 128 MB.
542
+ # The value must be a multiple of 64 MB.
543
+ # @return [Integer]
544
+ class UploadFunctionRequest < Struct.new(
545
+ :function_name,
546
+ :function_zip,
547
+ :runtime,
548
+ :role,
549
+ :handler,
550
+ :mode,
551
+ :description,
552
+ :timeout,
553
+ :memory_size)
554
+ include Aws::Structure
555
+ end
556
+
557
+ end
558
+ end
559
+ end