aws-sdk-cloudwatchevents 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.
@@ -0,0 +1,25 @@
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 CloudWatchEvents
10
+ class Resource
11
+
12
+ # @param options ({})
13
+ # @option options [Client] :client
14
+ def initialize(options = {})
15
+ @client = options[:client] || Client.new(options)
16
+ end
17
+
18
+ # @return [Client]
19
+ def client
20
+ @client
21
+ end
22
+
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,663 @@
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 CloudWatchEvents
10
+ module Types
11
+
12
+ # Container for the parameters to the DeleteRule operation.
13
+ # @note When making an API call, pass DeleteRuleRequest
14
+ # data as a hash:
15
+ #
16
+ # {
17
+ # name: "RuleName", # required
18
+ # }
19
+ # @!attribute [rw] name
20
+ # The name of the rule to be deleted.
21
+ # @return [String]
22
+ class DeleteRuleRequest < Struct.new(
23
+ :name)
24
+ include Aws::Structure
25
+ end
26
+
27
+ # Container for the parameters to the DescribeRule operation.
28
+ # @note When making an API call, pass DescribeRuleRequest
29
+ # data as a hash:
30
+ #
31
+ # {
32
+ # name: "RuleName", # required
33
+ # }
34
+ # @!attribute [rw] name
35
+ # The name of the rule you want to describe details for.
36
+ # @return [String]
37
+ class DescribeRuleRequest < Struct.new(
38
+ :name)
39
+ include Aws::Structure
40
+ end
41
+
42
+ # The result of the DescribeRule operation.
43
+ # @!attribute [rw] name
44
+ # The rule's name.
45
+ # @return [String]
46
+ #
47
+ # @!attribute [rw] arn
48
+ # The Amazon Resource Name (ARN) associated with the rule.
49
+ # @return [String]
50
+ #
51
+ # @!attribute [rw] event_pattern
52
+ # The event pattern.
53
+ # @return [String]
54
+ #
55
+ # @!attribute [rw] schedule_expression
56
+ # The scheduling expression. For example, "cron(0 20 * * ? *)",
57
+ # "rate(5 minutes)".
58
+ # @return [String]
59
+ #
60
+ # @!attribute [rw] state
61
+ # Specifies whether the rule is enabled or disabled.
62
+ # @return [String]
63
+ #
64
+ # @!attribute [rw] description
65
+ # The rule's description.
66
+ # @return [String]
67
+ #
68
+ # @!attribute [rw] role_arn
69
+ # The Amazon Resource Name (ARN) of the IAM role associated with the
70
+ # rule.
71
+ # @return [String]
72
+ class DescribeRuleResponse < Struct.new(
73
+ :name,
74
+ :arn,
75
+ :event_pattern,
76
+ :schedule_expression,
77
+ :state,
78
+ :description,
79
+ :role_arn)
80
+ include Aws::Structure
81
+ end
82
+
83
+ # Container for the parameters to the DisableRule operation.
84
+ # @note When making an API call, pass DisableRuleRequest
85
+ # data as a hash:
86
+ #
87
+ # {
88
+ # name: "RuleName", # required
89
+ # }
90
+ # @!attribute [rw] name
91
+ # The name of the rule you want to disable.
92
+ # @return [String]
93
+ class DisableRuleRequest < Struct.new(
94
+ :name)
95
+ include Aws::Structure
96
+ end
97
+
98
+ # Container for the parameters to the EnableRule operation.
99
+ # @note When making an API call, pass EnableRuleRequest
100
+ # data as a hash:
101
+ #
102
+ # {
103
+ # name: "RuleName", # required
104
+ # }
105
+ # @!attribute [rw] name
106
+ # The name of the rule that you want to enable.
107
+ # @return [String]
108
+ class EnableRuleRequest < Struct.new(
109
+ :name)
110
+ include Aws::Structure
111
+ end
112
+
113
+ # Container for the parameters to the ListRuleNamesByTarget operation.
114
+ # @note When making an API call, pass ListRuleNamesByTargetRequest
115
+ # data as a hash:
116
+ #
117
+ # {
118
+ # target_arn: "TargetArn", # required
119
+ # next_token: "NextToken",
120
+ # limit: 1,
121
+ # }
122
+ # @!attribute [rw] target_arn
123
+ # The Amazon Resource Name (ARN) of the target resource that you want
124
+ # to list the rules for.
125
+ # @return [String]
126
+ #
127
+ # @!attribute [rw] next_token
128
+ # The token returned by a previous call to indicate that there is more
129
+ # data available.
130
+ # @return [String]
131
+ #
132
+ # @!attribute [rw] limit
133
+ # The maximum number of results to return.
134
+ # @return [Integer]
135
+ class ListRuleNamesByTargetRequest < Struct.new(
136
+ :target_arn,
137
+ :next_token,
138
+ :limit)
139
+ include Aws::Structure
140
+ end
141
+
142
+ # The result of the ListRuleNamesByTarget operation.
143
+ # @!attribute [rw] rule_names
144
+ # List of rules names that can invoke the given target.
145
+ # @return [Array<String>]
146
+ #
147
+ # @!attribute [rw] next_token
148
+ # Indicates that there are additional results to retrieve.
149
+ # @return [String]
150
+ class ListRuleNamesByTargetResponse < Struct.new(
151
+ :rule_names,
152
+ :next_token)
153
+ include Aws::Structure
154
+ end
155
+
156
+ # Container for the parameters to the ListRules operation.
157
+ # @note When making an API call, pass ListRulesRequest
158
+ # data as a hash:
159
+ #
160
+ # {
161
+ # name_prefix: "RuleName",
162
+ # next_token: "NextToken",
163
+ # limit: 1,
164
+ # }
165
+ # @!attribute [rw] name_prefix
166
+ # The prefix matching the rule name.
167
+ # @return [String]
168
+ #
169
+ # @!attribute [rw] next_token
170
+ # The token returned by a previous call to indicate that there is more
171
+ # data available.
172
+ # @return [String]
173
+ #
174
+ # @!attribute [rw] limit
175
+ # The maximum number of results to return.
176
+ # @return [Integer]
177
+ class ListRulesRequest < Struct.new(
178
+ :name_prefix,
179
+ :next_token,
180
+ :limit)
181
+ include Aws::Structure
182
+ end
183
+
184
+ # The result of the ListRules operation.
185
+ # @!attribute [rw] rules
186
+ # List of rules matching the specified criteria.
187
+ # @return [Array<Types::Rule>]
188
+ #
189
+ # @!attribute [rw] next_token
190
+ # Indicates that there are additional results to retrieve.
191
+ # @return [String]
192
+ class ListRulesResponse < Struct.new(
193
+ :rules,
194
+ :next_token)
195
+ include Aws::Structure
196
+ end
197
+
198
+ # Container for the parameters to the ListTargetsByRule operation.
199
+ # @note When making an API call, pass ListTargetsByRuleRequest
200
+ # data as a hash:
201
+ #
202
+ # {
203
+ # rule: "RuleName", # required
204
+ # next_token: "NextToken",
205
+ # limit: 1,
206
+ # }
207
+ # @!attribute [rw] rule
208
+ # The name of the rule whose targets you want to list.
209
+ # @return [String]
210
+ #
211
+ # @!attribute [rw] next_token
212
+ # The token returned by a previous call to indicate that there is more
213
+ # data available.
214
+ # @return [String]
215
+ #
216
+ # @!attribute [rw] limit
217
+ # The maximum number of results to return.
218
+ # @return [Integer]
219
+ class ListTargetsByRuleRequest < Struct.new(
220
+ :rule,
221
+ :next_token,
222
+ :limit)
223
+ include Aws::Structure
224
+ end
225
+
226
+ # The result of the ListTargetsByRule operation.
227
+ # @!attribute [rw] targets
228
+ # Lists the targets assigned to the rule.
229
+ # @return [Array<Types::Target>]
230
+ #
231
+ # @!attribute [rw] next_token
232
+ # Indicates that there are additional results to retrieve.
233
+ # @return [String]
234
+ class ListTargetsByRuleResponse < Struct.new(
235
+ :targets,
236
+ :next_token)
237
+ include Aws::Structure
238
+ end
239
+
240
+ # Container for the parameters to the PutEvents operation.
241
+ # @note When making an API call, pass PutEventsRequest
242
+ # data as a hash:
243
+ #
244
+ # {
245
+ # entries: [ # required
246
+ # {
247
+ # time: Time.now,
248
+ # source: "String",
249
+ # resources: ["EventResource"],
250
+ # detail_type: "String",
251
+ # detail: "String",
252
+ # },
253
+ # ],
254
+ # }
255
+ # @!attribute [rw] entries
256
+ # The entry that defines an event in your system. You can specify
257
+ # several parameters for the entry such as the source and type of the
258
+ # event, resources associated with the event, and so on.
259
+ # @return [Array<Types::PutEventsRequestEntry>]
260
+ class PutEventsRequest < Struct.new(
261
+ :entries)
262
+ include Aws::Structure
263
+ end
264
+
265
+ # Contains information about the event to be used in PutEvents.
266
+ # @note When making an API call, pass PutEventsRequestEntry
267
+ # data as a hash:
268
+ #
269
+ # {
270
+ # time: Time.now,
271
+ # source: "String",
272
+ # resources: ["EventResource"],
273
+ # detail_type: "String",
274
+ # detail: "String",
275
+ # }
276
+ # @!attribute [rw] time
277
+ # Timestamp of event, per [RFC3339][1]. If no timestamp is provided,
278
+ # the timestamp of the PutEvents call will be used.
279
+ #
280
+ #
281
+ #
282
+ # [1]: https://www.rfc-editor.org/rfc/rfc3339.txt
283
+ # @return [Time]
284
+ #
285
+ # @!attribute [rw] source
286
+ # The source of the event.
287
+ # @return [String]
288
+ #
289
+ # @!attribute [rw] resources
290
+ # AWS resources, identified by Amazon Resource Name (ARN), which the
291
+ # event primarily concerns. Any number, including zero, may be
292
+ # present.
293
+ # @return [Array<String>]
294
+ #
295
+ # @!attribute [rw] detail_type
296
+ # Free-form string used to decide what fields to expect in the event
297
+ # detail.
298
+ # @return [String]
299
+ #
300
+ # @!attribute [rw] detail
301
+ # In the JSON sense, an object containing fields, which may also
302
+ # contain nested sub-objects. No constraints are imposed on its
303
+ # contents.
304
+ # @return [String]
305
+ class PutEventsRequestEntry < Struct.new(
306
+ :time,
307
+ :source,
308
+ :resources,
309
+ :detail_type,
310
+ :detail)
311
+ include Aws::Structure
312
+ end
313
+
314
+ # The result of the PutEvents operation.
315
+ # @!attribute [rw] failed_entry_count
316
+ # The number of failed entries.
317
+ # @return [Integer]
318
+ #
319
+ # @!attribute [rw] entries
320
+ # A list of successfully and unsuccessfully ingested events results.
321
+ # If the ingestion was successful, the entry will have the event ID in
322
+ # it. If not, then the ErrorCode and ErrorMessage can be used to
323
+ # identify the problem with the entry.
324
+ # @return [Array<Types::PutEventsResultEntry>]
325
+ class PutEventsResponse < Struct.new(
326
+ :failed_entry_count,
327
+ :entries)
328
+ include Aws::Structure
329
+ end
330
+
331
+ # A PutEventsResult contains a list of PutEventsResultEntry.
332
+ # @!attribute [rw] event_id
333
+ # The ID of the event submitted to Amazon CloudWatch Events.
334
+ # @return [String]
335
+ #
336
+ # @!attribute [rw] error_code
337
+ # The error code representing why the event submission failed on this
338
+ # entry.
339
+ # @return [String]
340
+ #
341
+ # @!attribute [rw] error_message
342
+ # The error message explaining why the event submission failed on this
343
+ # entry.
344
+ # @return [String]
345
+ class PutEventsResultEntry < Struct.new(
346
+ :event_id,
347
+ :error_code,
348
+ :error_message)
349
+ include Aws::Structure
350
+ end
351
+
352
+ # Container for the parameters to the PutRule operation.
353
+ # @note When making an API call, pass PutRuleRequest
354
+ # data as a hash:
355
+ #
356
+ # {
357
+ # name: "RuleName", # required
358
+ # schedule_expression: "ScheduleExpression",
359
+ # event_pattern: "EventPattern",
360
+ # state: "ENABLED", # accepts ENABLED, DISABLED
361
+ # description: "RuleDescription",
362
+ # role_arn: "RoleArn",
363
+ # }
364
+ # @!attribute [rw] name
365
+ # The name of the rule that you are creating or updating.
366
+ # @return [String]
367
+ #
368
+ # @!attribute [rw] schedule_expression
369
+ # The scheduling expression. For example, "cron(0 20 * * ? *)",
370
+ # "rate(5 minutes)".
371
+ # @return [String]
372
+ #
373
+ # @!attribute [rw] event_pattern
374
+ # The event pattern.
375
+ # @return [String]
376
+ #
377
+ # @!attribute [rw] state
378
+ # Indicates whether the rule is enabled or disabled.
379
+ # @return [String]
380
+ #
381
+ # @!attribute [rw] description
382
+ # A description of the rule.
383
+ # @return [String]
384
+ #
385
+ # @!attribute [rw] role_arn
386
+ # The Amazon Resource Name (ARN) of the IAM role associated with the
387
+ # rule.
388
+ # @return [String]
389
+ class PutRuleRequest < Struct.new(
390
+ :name,
391
+ :schedule_expression,
392
+ :event_pattern,
393
+ :state,
394
+ :description,
395
+ :role_arn)
396
+ include Aws::Structure
397
+ end
398
+
399
+ # The result of the PutRule operation.
400
+ # @!attribute [rw] rule_arn
401
+ # The Amazon Resource Name (ARN) that identifies the rule.
402
+ # @return [String]
403
+ class PutRuleResponse < Struct.new(
404
+ :rule_arn)
405
+ include Aws::Structure
406
+ end
407
+
408
+ # Container for the parameters to the PutTargets operation.
409
+ # @note When making an API call, pass PutTargetsRequest
410
+ # data as a hash:
411
+ #
412
+ # {
413
+ # rule: "RuleName", # required
414
+ # targets: [ # required
415
+ # {
416
+ # id: "TargetId", # required
417
+ # arn: "TargetArn", # required
418
+ # input: "TargetInput",
419
+ # input_path: "TargetInputPath",
420
+ # },
421
+ # ],
422
+ # }
423
+ # @!attribute [rw] rule
424
+ # The name of the rule you want to add targets to.
425
+ # @return [String]
426
+ #
427
+ # @!attribute [rw] targets
428
+ # List of targets you want to update or add to the rule.
429
+ # @return [Array<Types::Target>]
430
+ class PutTargetsRequest < Struct.new(
431
+ :rule,
432
+ :targets)
433
+ include Aws::Structure
434
+ end
435
+
436
+ # The result of the PutTargets operation.
437
+ # @!attribute [rw] failed_entry_count
438
+ # The number of failed entries.
439
+ # @return [Integer]
440
+ #
441
+ # @!attribute [rw] failed_entries
442
+ # An array of failed target entries.
443
+ # @return [Array<Types::PutTargetsResultEntry>]
444
+ class PutTargetsResponse < Struct.new(
445
+ :failed_entry_count,
446
+ :failed_entries)
447
+ include Aws::Structure
448
+ end
449
+
450
+ # A PutTargetsResult contains a list of PutTargetsResultEntry.
451
+ # @!attribute [rw] target_id
452
+ # The ID of the target submitted to Amazon CloudWatch Events.
453
+ # @return [String]
454
+ #
455
+ # @!attribute [rw] error_code
456
+ # The error code representing why the target submission failed on this
457
+ # entry.
458
+ # @return [String]
459
+ #
460
+ # @!attribute [rw] error_message
461
+ # The error message explaining why the target submission failed on
462
+ # this entry.
463
+ # @return [String]
464
+ class PutTargetsResultEntry < Struct.new(
465
+ :target_id,
466
+ :error_code,
467
+ :error_message)
468
+ include Aws::Structure
469
+ end
470
+
471
+ # Container for the parameters to the RemoveTargets operation.
472
+ # @note When making an API call, pass RemoveTargetsRequest
473
+ # data as a hash:
474
+ #
475
+ # {
476
+ # rule: "RuleName", # required
477
+ # ids: ["TargetId"], # required
478
+ # }
479
+ # @!attribute [rw] rule
480
+ # The name of the rule you want to remove targets from.
481
+ # @return [String]
482
+ #
483
+ # @!attribute [rw] ids
484
+ # The list of target IDs to remove from the rule.
485
+ # @return [Array<String>]
486
+ class RemoveTargetsRequest < Struct.new(
487
+ :rule,
488
+ :ids)
489
+ include Aws::Structure
490
+ end
491
+
492
+ # The result of the RemoveTargets operation.
493
+ # @!attribute [rw] failed_entry_count
494
+ # The number of failed entries.
495
+ # @return [Integer]
496
+ #
497
+ # @!attribute [rw] failed_entries
498
+ # An array of failed target entries.
499
+ # @return [Array<Types::RemoveTargetsResultEntry>]
500
+ class RemoveTargetsResponse < Struct.new(
501
+ :failed_entry_count,
502
+ :failed_entries)
503
+ include Aws::Structure
504
+ end
505
+
506
+ # The ID of the target requested to be removed from the rule by Amazon
507
+ # CloudWatch Events.
508
+ # @!attribute [rw] target_id
509
+ # The ID of the target requested to be removed by Amazon CloudWatch
510
+ # Events.
511
+ # @return [String]
512
+ #
513
+ # @!attribute [rw] error_code
514
+ # The error code representing why the target removal failed on this
515
+ # entry.
516
+ # @return [String]
517
+ #
518
+ # @!attribute [rw] error_message
519
+ # The error message explaining why the target removal failed on this
520
+ # entry.
521
+ # @return [String]
522
+ class RemoveTargetsResultEntry < Struct.new(
523
+ :target_id,
524
+ :error_code,
525
+ :error_message)
526
+ include Aws::Structure
527
+ end
528
+
529
+ # Contains information about a rule in Amazon CloudWatch Events. A
530
+ # ListRulesResult contains a list of Rules.
531
+ # @!attribute [rw] name
532
+ # The rule's name.
533
+ # @return [String]
534
+ #
535
+ # @!attribute [rw] arn
536
+ # The Amazon Resource Name (ARN) of the rule.
537
+ # @return [String]
538
+ #
539
+ # @!attribute [rw] event_pattern
540
+ # The event pattern of the rule.
541
+ # @return [String]
542
+ #
543
+ # @!attribute [rw] state
544
+ # The rule's state.
545
+ # @return [String]
546
+ #
547
+ # @!attribute [rw] description
548
+ # The description of the rule.
549
+ # @return [String]
550
+ #
551
+ # @!attribute [rw] schedule_expression
552
+ # The scheduling expression. For example, "cron(0 20 * * ? *)",
553
+ # "rate(5 minutes)".
554
+ # @return [String]
555
+ #
556
+ # @!attribute [rw] role_arn
557
+ # The Amazon Resource Name (ARN) associated with the role that is used
558
+ # for target invocation.
559
+ # @return [String]
560
+ class Rule < Struct.new(
561
+ :name,
562
+ :arn,
563
+ :event_pattern,
564
+ :state,
565
+ :description,
566
+ :schedule_expression,
567
+ :role_arn)
568
+ include Aws::Structure
569
+ end
570
+
571
+ # Targets are the resources that can be invoked when a rule is
572
+ # triggered. For example, AWS Lambda functions, Amazon Kinesis streams,
573
+ # and built-in targets.
574
+ #
575
+ # **Input** and **InputPath** are mutually-exclusive and optional
576
+ # parameters of a target. When a rule is triggered due to a matched
577
+ # event, if for a target:
578
+ #
579
+ # * Neither **Input** nor **InputPath** is specified, then the entire
580
+ # event is passed to the target in JSON form.
581
+ # * **InputPath** is specified in the form of JSONPath (e.g.
582
+ # **$.detail**), then only the part of the event specified in the path
583
+ # is passed to the target (e.g. only the detail part of the event is
584
+ # passed).
585
+ # * **Input** is specified in the form of a valid JSON, then the matched
586
+ # event is overridden with this constant.
587
+ # @note When making an API call, pass Target
588
+ # data as a hash:
589
+ #
590
+ # {
591
+ # id: "TargetId", # required
592
+ # arn: "TargetArn", # required
593
+ # input: "TargetInput",
594
+ # input_path: "TargetInputPath",
595
+ # }
596
+ # @!attribute [rw] id
597
+ # The unique target assignment ID.
598
+ # @return [String]
599
+ #
600
+ # @!attribute [rw] arn
601
+ # The Amazon Resource Name (ARN) associated of the target.
602
+ # @return [String]
603
+ #
604
+ # @!attribute [rw] input
605
+ # Valid JSON text passed to the target. For more information about
606
+ # JSON text, see [The JavaScript Object Notation (JSON) Data
607
+ # Interchange Format][1].
608
+ #
609
+ #
610
+ #
611
+ # [1]: http://www.rfc-editor.org/rfc/rfc7159.txt
612
+ # @return [String]
613
+ #
614
+ # @!attribute [rw] input_path
615
+ # The value of the JSONPath that is used for extracting part of the
616
+ # matched event when passing it to the target. For more information
617
+ # about JSON paths, see [JSONPath][1].
618
+ #
619
+ #
620
+ #
621
+ # [1]: http://goessner.net/articles/JsonPath/
622
+ # @return [String]
623
+ class Target < Struct.new(
624
+ :id,
625
+ :arn,
626
+ :input,
627
+ :input_path)
628
+ include Aws::Structure
629
+ end
630
+
631
+ # Container for the parameters to the TestEventPattern operation.
632
+ # @note When making an API call, pass TestEventPatternRequest
633
+ # data as a hash:
634
+ #
635
+ # {
636
+ # event_pattern: "EventPattern", # required
637
+ # event: "String", # required
638
+ # }
639
+ # @!attribute [rw] event_pattern
640
+ # The event pattern you want to test.
641
+ # @return [String]
642
+ #
643
+ # @!attribute [rw] event
644
+ # The event in the JSON format to test against the event pattern.
645
+ # @return [String]
646
+ class TestEventPatternRequest < Struct.new(
647
+ :event_pattern,
648
+ :event)
649
+ include Aws::Structure
650
+ end
651
+
652
+ # The result of the TestEventPattern operation.
653
+ # @!attribute [rw] result
654
+ # Indicates whether the event matches the event pattern.
655
+ # @return [Boolean]
656
+ class TestEventPatternResponse < Struct.new(
657
+ :result)
658
+ include Aws::Structure
659
+ end
660
+
661
+ end
662
+ end
663
+ end