aws-sdk-eventbridge 1.0.0

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,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3bdea84974ed6af0005ceaaa82292ec009286cfc
4
+ data.tar.gz: 6a16df7867001cb9d19efac46a114fded338733c
5
+ SHA512:
6
+ metadata.gz: 9ac1621b1c81c8d191c8fd789f67df5933670194a9fc150d64427e8c024e4478fc7c6997a79acc8f4e4c639558eee9a8925d9d8e4c3203df7e3dd46b6887269d
7
+ data.tar.gz: 7358ecc3c84f988be79e04b30a2025091a92521974b955b5dded03c41f1db24ec5952e59b0ca84d170c74d99976806111d47dcb87001177114d2d46cd2dc8744
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
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-eventbridge/types'
12
+ require_relative 'aws-sdk-eventbridge/client_api'
13
+ require_relative 'aws-sdk-eventbridge/client'
14
+ require_relative 'aws-sdk-eventbridge/errors'
15
+ require_relative 'aws-sdk-eventbridge/resource'
16
+ require_relative 'aws-sdk-eventbridge/customizations'
17
+
18
+ # This module provides support for Amazon EventBridge. This module is available in the
19
+ # `aws-sdk-eventbridge` 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 Amazon EventBridge all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::EventBridge::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::EventBridge
44
+
45
+ GEM_VERSION = '1.0.0'
46
+
47
+ end
@@ -0,0 +1,1967 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
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/endpoint_discovery.rb'
19
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
20
+ require 'aws-sdk-core/plugins/response_paging.rb'
21
+ require 'aws-sdk-core/plugins/stub_responses.rb'
22
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
23
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
27
+ require 'aws-sdk-core/plugins/signature_v4.rb'
28
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
29
+
30
+ Aws::Plugins::GlobalConfiguration.add_identifier(:eventbridge)
31
+
32
+ module Aws::EventBridge
33
+ class Client < Seahorse::Client::Base
34
+
35
+ include Aws::ClientStubs
36
+
37
+ @identifier = :eventbridge
38
+
39
+ set_api(ClientApi::API)
40
+
41
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
42
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
43
+ add_plugin(Aws::Plugins::Logging)
44
+ add_plugin(Aws::Plugins::ParamConverter)
45
+ add_plugin(Aws::Plugins::ParamValidator)
46
+ add_plugin(Aws::Plugins::UserAgent)
47
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
48
+ add_plugin(Aws::Plugins::RetryErrors)
49
+ add_plugin(Aws::Plugins::GlobalConfiguration)
50
+ add_plugin(Aws::Plugins::RegionalEndpoint)
51
+ add_plugin(Aws::Plugins::EndpointDiscovery)
52
+ add_plugin(Aws::Plugins::EndpointPattern)
53
+ add_plugin(Aws::Plugins::ResponsePaging)
54
+ add_plugin(Aws::Plugins::StubResponses)
55
+ add_plugin(Aws::Plugins::IdempotencyToken)
56
+ add_plugin(Aws::Plugins::JsonvalueConverter)
57
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
58
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
59
+ add_plugin(Aws::Plugins::TransferEncoding)
60
+ add_plugin(Aws::Plugins::SignatureV4)
61
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
62
+
63
+ # @overload initialize(options)
64
+ # @param [Hash] options
65
+ # @option options [required, Aws::CredentialProvider] :credentials
66
+ # Your AWS credentials. This can be an instance of any one of the
67
+ # following classes:
68
+ #
69
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
70
+ # credentials.
71
+ #
72
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
73
+ # from an EC2 IMDS on an EC2 instance.
74
+ #
75
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
76
+ # shared file, such as `~/.aws/config`.
77
+ #
78
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
79
+ #
80
+ # When `:credentials` are not configured directly, the following
81
+ # locations will be searched for credentials:
82
+ #
83
+ # * `Aws.config[:credentials]`
84
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
85
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
86
+ # * `~/.aws/credentials`
87
+ # * `~/.aws/config`
88
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
89
+ # very aggressive. Construct and pass an instance of
90
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
91
+ # timeouts.
92
+ #
93
+ # @option options [required, String] :region
94
+ # The AWS region to connect to. The configured `:region` is
95
+ # used to determine the service `:endpoint`. When not passed,
96
+ # a default `:region` is search for in the following locations:
97
+ #
98
+ # * `Aws.config[:region]`
99
+ # * `ENV['AWS_REGION']`
100
+ # * `ENV['AMAZON_REGION']`
101
+ # * `ENV['AWS_DEFAULT_REGION']`
102
+ # * `~/.aws/credentials`
103
+ # * `~/.aws/config`
104
+ #
105
+ # @option options [String] :access_key_id
106
+ #
107
+ # @option options [Boolean] :active_endpoint_cache (false)
108
+ # When set to `true`, a thread polling for endpoints will be running in
109
+ # the background every 60 secs (default). Defaults to `false`.
110
+ #
111
+ # @option options [Boolean] :client_side_monitoring (false)
112
+ # When `true`, client-side metrics will be collected for all API requests from
113
+ # this client.
114
+ #
115
+ # @option options [String] :client_side_monitoring_client_id ("")
116
+ # Allows you to provide an identifier for this client which will be attached to
117
+ # all generated client side metrics. Defaults to an empty string.
118
+ #
119
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
120
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
121
+ # side monitoring agent is running on, where client metrics will be published via UDP.
122
+ #
123
+ # @option options [Integer] :client_side_monitoring_port (31000)
124
+ # Required for publishing client metrics. The port that the client side monitoring
125
+ # agent is running on, where client metrics will be published via UDP.
126
+ #
127
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
128
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
129
+ # will use the Client Side Monitoring Agent Publisher.
130
+ #
131
+ # @option options [Boolean] :convert_params (true)
132
+ # When `true`, an attempt is made to coerce request parameters into
133
+ # the required types.
134
+ #
135
+ # @option options [Boolean] :disable_host_prefix_injection (false)
136
+ # Set to true to disable SDK automatically adding host prefix
137
+ # to default service endpoint when available.
138
+ #
139
+ # @option options [String] :endpoint
140
+ # The client endpoint is normally constructed from the `:region`
141
+ # option. You should only configure an `:endpoint` when connecting
142
+ # to test endpoints. This should be avalid HTTP(S) URI.
143
+ #
144
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
145
+ # Used for the maximum size limit of the LRU cache storing endpoints data
146
+ # for endpoint discovery enabled operations. Defaults to 1000.
147
+ #
148
+ # @option options [Integer] :endpoint_cache_max_threads (10)
149
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
150
+ #
151
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
152
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
153
+ # Use this option to config the time interval in seconds for making
154
+ # requests fetching endpoints information. Defaults to 60 sec.
155
+ #
156
+ # @option options [Boolean] :endpoint_discovery (false)
157
+ # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
158
+ #
159
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
160
+ # The log formatter.
161
+ #
162
+ # @option options [Symbol] :log_level (:info)
163
+ # The log level to send messages to the `:logger` at.
164
+ #
165
+ # @option options [Logger] :logger
166
+ # The Logger instance to send log messages to. If this option
167
+ # is not set, logging will be disabled.
168
+ #
169
+ # @option options [String] :profile ("default")
170
+ # Used when loading credentials from the shared credentials file
171
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
172
+ #
173
+ # @option options [Float] :retry_base_delay (0.3)
174
+ # The base delay in seconds used by the default backoff function.
175
+ #
176
+ # @option options [Symbol] :retry_jitter (:none)
177
+ # A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
178
+ #
179
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
180
+ #
181
+ # @option options [Integer] :retry_limit (3)
182
+ # The maximum number of times to retry failed requests. Only
183
+ # ~ 500 level server errors and certain ~ 400 level client errors
184
+ # are retried. Generally, these are throttling errors, data
185
+ # checksum errors, networking errors, timeout errors and auth
186
+ # errors from expired credentials.
187
+ #
188
+ # @option options [Integer] :retry_max_delay (0)
189
+ # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
190
+ #
191
+ # @option options [String] :secret_access_key
192
+ #
193
+ # @option options [String] :session_token
194
+ #
195
+ # @option options [Boolean] :simple_json (false)
196
+ # Disables request parameter conversion, validation, and formatting.
197
+ # Also disable response data type conversions. This option is useful
198
+ # when you want to ensure the highest level of performance by
199
+ # avoiding overhead of walking request parameters and response data
200
+ # structures.
201
+ #
202
+ # When `:simple_json` is enabled, the request parameters hash must
203
+ # be formatted exactly as the DynamoDB API expects.
204
+ #
205
+ # @option options [Boolean] :stub_responses (false)
206
+ # Causes the client to return stubbed responses. By default
207
+ # fake responses are generated and returned. You can specify
208
+ # the response data to return or errors to raise by calling
209
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
210
+ #
211
+ # ** Please note ** When response stubbing is enabled, no HTTP
212
+ # requests are made, and retries are disabled.
213
+ #
214
+ # @option options [Boolean] :validate_params (true)
215
+ # When `true`, request parameters are validated before
216
+ # sending the request.
217
+ #
218
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
219
+ # requests through. Formatted like 'http://proxy.com:123'.
220
+ #
221
+ # @option options [Float] :http_open_timeout (15) The number of
222
+ # seconds to wait when opening a HTTP session before rasing a
223
+ # `Timeout::Error`.
224
+ #
225
+ # @option options [Integer] :http_read_timeout (60) The default
226
+ # number of seconds to wait for response data. This value can
227
+ # safely be set
228
+ # per-request on the session yeidled by {#session_for}.
229
+ #
230
+ # @option options [Float] :http_idle_timeout (5) The number of
231
+ # seconds a connection is allowed to sit idble before it is
232
+ # considered stale. Stale connections are closed and removed
233
+ # from the pool before making a request.
234
+ #
235
+ # @option options [Float] :http_continue_timeout (1) The number of
236
+ # seconds to wait for a 100-continue response before sending the
237
+ # request body. This option has no effect unless the request has
238
+ # "Expect" header set to "100-continue". Defaults to `nil` which
239
+ # disables this behaviour. This value can safely be set per
240
+ # request on the session yeidled by {#session_for}.
241
+ #
242
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
243
+ # HTTP debug output will be sent to the `:logger`.
244
+ #
245
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
246
+ # SSL peer certificates are verified when establishing a
247
+ # connection.
248
+ #
249
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
250
+ # certificate authority bundle file that should be used when
251
+ # verifying peer certificates. If you do not pass
252
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
253
+ # will be used if available.
254
+ #
255
+ # @option options [String] :ssl_ca_directory Full path of the
256
+ # directory that contains the unbundled SSL certificate
257
+ # authority files for verifying peer certificates. If you do
258
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
259
+ # system default will be used if available.
260
+ #
261
+ def initialize(*args)
262
+ super
263
+ end
264
+
265
+ # @!group API Operations
266
+
267
+ # Activates a partner event source that has been deactivated. Once
268
+ # activated, your matching event bus will start receiving events from
269
+ # the event source.
270
+ #
271
+ # <note markdown="1"> This operation is performed by AWS customers, not by SaaS partners.
272
+ #
273
+ # </note>
274
+ #
275
+ # @option params [required, String] :name
276
+ # The name of the partner event source to activate.
277
+ #
278
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
279
+ #
280
+ # @example Request syntax with placeholder values
281
+ #
282
+ # resp = client.activate_event_source({
283
+ # name: "EventSourceName", # required
284
+ # })
285
+ #
286
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ActivateEventSource AWS API Documentation
287
+ #
288
+ # @overload activate_event_source(params = {})
289
+ # @param [Hash] params ({})
290
+ def activate_event_source(params = {}, options = {})
291
+ req = build_request(:activate_event_source, params)
292
+ req.send_request(options)
293
+ end
294
+
295
+ # Creates a new event bus within your account. This can be a custom
296
+ # event bus which you can use to receive events from your own custom
297
+ # applications and services, or it can be a partner event bus which can
298
+ # be matched to a partner event source.
299
+ #
300
+ # <note markdown="1"> This operation is used by AWS customers, not by SaaS partners.
301
+ #
302
+ # </note>
303
+ #
304
+ # @option params [required, String] :name
305
+ # The name of the new event bus.
306
+ #
307
+ # The names of custom event buses can't contain the `/` character. You
308
+ # can't use the name `default` for a custom event bus because this name
309
+ # is already used for your account's default event bus.
310
+ #
311
+ # If this is a partner event bus, the name must exactly match the name
312
+ # of the partner event source that this event bus is matched to. This
313
+ # name will include the `/` character.
314
+ #
315
+ # @option params [String] :event_source_name
316
+ # If you're creating a partner event bus, this specifies the partner
317
+ # event source that the new event bus will be matched with.
318
+ #
319
+ # @return [Types::CreateEventBusResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
320
+ #
321
+ # * {Types::CreateEventBusResponse#event_bus_arn #event_bus_arn} => String
322
+ #
323
+ # @example Request syntax with placeholder values
324
+ #
325
+ # resp = client.create_event_bus({
326
+ # name: "EventBusName", # required
327
+ # event_source_name: "EventSourceName",
328
+ # })
329
+ #
330
+ # @example Response structure
331
+ #
332
+ # resp.event_bus_arn #=> String
333
+ #
334
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/CreateEventBus AWS API Documentation
335
+ #
336
+ # @overload create_event_bus(params = {})
337
+ # @param [Hash] params ({})
338
+ def create_event_bus(params = {}, options = {})
339
+ req = build_request(:create_event_bus, params)
340
+ req.send_request(options)
341
+ end
342
+
343
+ # Called by an SaaS partner to create a partner event source.
344
+ #
345
+ # <note markdown="1"> This operation is not used by AWS customers.
346
+ #
347
+ # </note>
348
+ #
349
+ # Each partner event source can be used by one AWS account to create a
350
+ # matching partner event bus in that AWS account. A SaaS partner must
351
+ # create one partner event source for each AWS account that wants to
352
+ # receive those event types.
353
+ #
354
+ # A partner event source creates events based on resources in the SaaS
355
+ # partner's service or application.
356
+ #
357
+ # An AWS account that creates a partner event bus that matches the
358
+ # partner event source can use that event bus to receive events from the
359
+ # partner, and then process them using AWS Events rules and targets.
360
+ #
361
+ # Partner event source names follow this format:
362
+ #
363
+ # `aws.partner/partner_name/event_namespace/event_name `
364
+ #
365
+ # * *partner\_name* is determined during partner registration and
366
+ # identifies the partner to AWS customers.
367
+ #
368
+ # * For *event\_namespace*, we recommend that partners use a string that
369
+ # identifies the AWS customer within the partner's system. This
370
+ # should not be the customer's AWS account ID.
371
+ #
372
+ # * *event\_name* is determined by the partner, and should uniquely
373
+ # identify an event-generating resource within the partner system.
374
+ # This should help AWS customers decide whether to create an event bus
375
+ # to receive these events.
376
+ #
377
+ # @option params [required, String] :name
378
+ # The name of the partner event source. This name must be unique and
379
+ # must be in the format ` partner_name/event_namespace/event_name `. The
380
+ # AWS account that wants to use this partner event source must create a
381
+ # partner event bus with a name that matches the name of the partner
382
+ # event source.
383
+ #
384
+ # @option params [required, String] :account
385
+ # The AWS account ID of the customer who is permitted to create a
386
+ # matching partner event bus for this partner event source.
387
+ #
388
+ # @return [Types::CreatePartnerEventSourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
389
+ #
390
+ # * {Types::CreatePartnerEventSourceResponse#event_source_arn #event_source_arn} => String
391
+ #
392
+ # @example Request syntax with placeholder values
393
+ #
394
+ # resp = client.create_partner_event_source({
395
+ # name: "EventSourceName", # required
396
+ # account: "AccountId", # required
397
+ # })
398
+ #
399
+ # @example Response structure
400
+ #
401
+ # resp.event_source_arn #=> String
402
+ #
403
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/CreatePartnerEventSource AWS API Documentation
404
+ #
405
+ # @overload create_partner_event_source(params = {})
406
+ # @param [Hash] params ({})
407
+ def create_partner_event_source(params = {}, options = {})
408
+ req = build_request(:create_partner_event_source, params)
409
+ req.send_request(options)
410
+ end
411
+
412
+ # An AWS customer uses this operation to temporarily stop receiving
413
+ # events from the specified partner event source. The matching event bus
414
+ # isn't deleted.
415
+ #
416
+ # When you deactivate a partner event source, the source goes into
417
+ # `PENDING` state. If it remains in `PENDING` state for more than two
418
+ # weeks, it's deleted.
419
+ #
420
+ # To activate a deactivated partner event source, use
421
+ # ActivateEventSource.
422
+ #
423
+ # @option params [required, String] :name
424
+ # The name of the partner event source to deactivate.
425
+ #
426
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
427
+ #
428
+ # @example Request syntax with placeholder values
429
+ #
430
+ # resp = client.deactivate_event_source({
431
+ # name: "EventSourceName", # required
432
+ # })
433
+ #
434
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeactivateEventSource AWS API Documentation
435
+ #
436
+ # @overload deactivate_event_source(params = {})
437
+ # @param [Hash] params ({})
438
+ def deactivate_event_source(params = {}, options = {})
439
+ req = build_request(:deactivate_event_source, params)
440
+ req.send_request(options)
441
+ end
442
+
443
+ # Deletes the specified custom event bus or partner event bus. All rules
444
+ # associated with this event bus are also deleted. You can't delete
445
+ # your account's default event bus.
446
+ #
447
+ # <note markdown="1"> This operation is performed by AWS customers, not by SaaS partners.
448
+ #
449
+ # </note>
450
+ #
451
+ # @option params [required, String] :name
452
+ # The name of the event bus to delete.
453
+ #
454
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
455
+ #
456
+ # @example Request syntax with placeholder values
457
+ #
458
+ # resp = client.delete_event_bus({
459
+ # name: "EventBusName", # required
460
+ # })
461
+ #
462
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeleteEventBus AWS API Documentation
463
+ #
464
+ # @overload delete_event_bus(params = {})
465
+ # @param [Hash] params ({})
466
+ def delete_event_bus(params = {}, options = {})
467
+ req = build_request(:delete_event_bus, params)
468
+ req.send_request(options)
469
+ end
470
+
471
+ # This operation is used by SaaS partners to delete a partner event
472
+ # source. AWS customers don't use this operation.
473
+ #
474
+ # When you delete an event source, the status of the corresponding
475
+ # partner event bus in the AWS customer account becomes `DELETED`.
476
+ #
477
+ # @option params [required, String] :name
478
+ # The name of the event source to delete.
479
+ #
480
+ # @option params [required, String] :account
481
+ # The AWS account ID of the AWS customer that the event source was
482
+ # created for.
483
+ #
484
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
485
+ #
486
+ # @example Request syntax with placeholder values
487
+ #
488
+ # resp = client.delete_partner_event_source({
489
+ # name: "EventSourceName", # required
490
+ # account: "AccountId", # required
491
+ # })
492
+ #
493
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeletePartnerEventSource AWS API Documentation
494
+ #
495
+ # @overload delete_partner_event_source(params = {})
496
+ # @param [Hash] params ({})
497
+ def delete_partner_event_source(params = {}, options = {})
498
+ req = build_request(:delete_partner_event_source, params)
499
+ req.send_request(options)
500
+ end
501
+
502
+ # Deletes the specified rule.
503
+ #
504
+ # Before you can delete the rule, you must remove all targets, using
505
+ # RemoveTargets.
506
+ #
507
+ # When you delete a rule, incoming events might continue to match to the
508
+ # deleted rule. Allow a short period of time for changes to take effect.
509
+ #
510
+ # Managed rules are rules created and managed by another AWS service on
511
+ # your behalf. These rules are created by those other AWS services to
512
+ # support functionality in those services. You can delete these rules
513
+ # using the `Force` option, but you should do so only if you're sure
514
+ # that the other service isn't still using that rule.
515
+ #
516
+ # @option params [required, String] :name
517
+ # The name of the rule.
518
+ #
519
+ # @option params [String] :event_bus_name
520
+ # The event bus associated with the rule. If you omit this, the default
521
+ # event bus is used.
522
+ #
523
+ # @option params [Boolean] :force
524
+ # If this is a managed rule, created by an AWS service on your behalf,
525
+ # you must specify `Force` as `True` to delete the rule. This parameter
526
+ # is ignored for rules that are not managed rules. You can check whether
527
+ # a rule is a managed rule by using `DescribeRule` or `ListRules` and
528
+ # checking the `ManagedBy` field of the response.
529
+ #
530
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
531
+ #
532
+ # @example Request syntax with placeholder values
533
+ #
534
+ # resp = client.delete_rule({
535
+ # name: "RuleName", # required
536
+ # event_bus_name: "EventBusName",
537
+ # force: false,
538
+ # })
539
+ #
540
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeleteRule AWS API Documentation
541
+ #
542
+ # @overload delete_rule(params = {})
543
+ # @param [Hash] params ({})
544
+ def delete_rule(params = {}, options = {})
545
+ req = build_request(:delete_rule, params)
546
+ req.send_request(options)
547
+ end
548
+
549
+ # Displays details about an event bus in your account. This can include
550
+ # the external AWS accounts that are permitted to write events to your
551
+ # default event bus, and the associated policy. For custom event buses
552
+ # and partner event buses, it displays the name, ARN, policy, state, and
553
+ # creation time.
554
+ #
555
+ # To enable your account to receive events from other accounts on its
556
+ # default event bus, use PutPermission.
557
+ #
558
+ # For more information about partner event buses, see CreateEventBus.
559
+ #
560
+ # @option params [String] :name
561
+ # The name of the event bus to show details for. If you omit this, the
562
+ # default event bus is displayed.
563
+ #
564
+ # @return [Types::DescribeEventBusResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
565
+ #
566
+ # * {Types::DescribeEventBusResponse#name #name} => String
567
+ # * {Types::DescribeEventBusResponse#arn #arn} => String
568
+ # * {Types::DescribeEventBusResponse#policy #policy} => String
569
+ #
570
+ # @example Request syntax with placeholder values
571
+ #
572
+ # resp = client.describe_event_bus({
573
+ # name: "EventBusName",
574
+ # })
575
+ #
576
+ # @example Response structure
577
+ #
578
+ # resp.name #=> String
579
+ # resp.arn #=> String
580
+ # resp.policy #=> String
581
+ #
582
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeEventBus AWS API Documentation
583
+ #
584
+ # @overload describe_event_bus(params = {})
585
+ # @param [Hash] params ({})
586
+ def describe_event_bus(params = {}, options = {})
587
+ req = build_request(:describe_event_bus, params)
588
+ req.send_request(options)
589
+ end
590
+
591
+ # This operation lists details about a partner event source that is
592
+ # shared with your account.
593
+ #
594
+ # <note markdown="1"> This operation is run by AWS customers, not by SaaS partners.
595
+ #
596
+ # </note>
597
+ #
598
+ # @option params [required, String] :name
599
+ # The name of the partner event source to display the details of.
600
+ #
601
+ # @return [Types::DescribeEventSourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
602
+ #
603
+ # * {Types::DescribeEventSourceResponse#arn #arn} => String
604
+ # * {Types::DescribeEventSourceResponse#created_by #created_by} => String
605
+ # * {Types::DescribeEventSourceResponse#creation_time #creation_time} => Time
606
+ # * {Types::DescribeEventSourceResponse#expiration_time #expiration_time} => Time
607
+ # * {Types::DescribeEventSourceResponse#name #name} => String
608
+ # * {Types::DescribeEventSourceResponse#state #state} => String
609
+ #
610
+ # @example Request syntax with placeholder values
611
+ #
612
+ # resp = client.describe_event_source({
613
+ # name: "EventSourceName", # required
614
+ # })
615
+ #
616
+ # @example Response structure
617
+ #
618
+ # resp.arn #=> String
619
+ # resp.created_by #=> String
620
+ # resp.creation_time #=> Time
621
+ # resp.expiration_time #=> Time
622
+ # resp.name #=> String
623
+ # resp.state #=> String, one of "PENDING", "ACTIVE", "DELETED"
624
+ #
625
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeEventSource AWS API Documentation
626
+ #
627
+ # @overload describe_event_source(params = {})
628
+ # @param [Hash] params ({})
629
+ def describe_event_source(params = {}, options = {})
630
+ req = build_request(:describe_event_source, params)
631
+ req.send_request(options)
632
+ end
633
+
634
+ # An SaaS partner can use this operation to list details about a partner
635
+ # event source that they have created.
636
+ #
637
+ # <note markdown="1"> AWS customers do not use this operation. Instead, AWS customers can
638
+ # use DescribeEventSource to see details about a partner event source
639
+ # that is shared with them.
640
+ #
641
+ # </note>
642
+ #
643
+ # @option params [required, String] :name
644
+ # The name of the event source to display.
645
+ #
646
+ # @return [Types::DescribePartnerEventSourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
647
+ #
648
+ # * {Types::DescribePartnerEventSourceResponse#arn #arn} => String
649
+ # * {Types::DescribePartnerEventSourceResponse#name #name} => String
650
+ #
651
+ # @example Request syntax with placeholder values
652
+ #
653
+ # resp = client.describe_partner_event_source({
654
+ # name: "EventSourceName", # required
655
+ # })
656
+ #
657
+ # @example Response structure
658
+ #
659
+ # resp.arn #=> String
660
+ # resp.name #=> String
661
+ #
662
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribePartnerEventSource AWS API Documentation
663
+ #
664
+ # @overload describe_partner_event_source(params = {})
665
+ # @param [Hash] params ({})
666
+ def describe_partner_event_source(params = {}, options = {})
667
+ req = build_request(:describe_partner_event_source, params)
668
+ req.send_request(options)
669
+ end
670
+
671
+ # Describes the specified rule.
672
+ #
673
+ # `DescribeRule` doesn't list the targets of a rule. To see the targets
674
+ # associated with a rule, use ListTargetsByRule.
675
+ #
676
+ # @option params [required, String] :name
677
+ # The name of the rule.
678
+ #
679
+ # @option params [String] :event_bus_name
680
+ # The event bus associated with the rule. If you omit this, the default
681
+ # event bus is used.
682
+ #
683
+ # @return [Types::DescribeRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
684
+ #
685
+ # * {Types::DescribeRuleResponse#name #name} => String
686
+ # * {Types::DescribeRuleResponse#arn #arn} => String
687
+ # * {Types::DescribeRuleResponse#event_pattern #event_pattern} => String
688
+ # * {Types::DescribeRuleResponse#schedule_expression #schedule_expression} => String
689
+ # * {Types::DescribeRuleResponse#state #state} => String
690
+ # * {Types::DescribeRuleResponse#description #description} => String
691
+ # * {Types::DescribeRuleResponse#role_arn #role_arn} => String
692
+ # * {Types::DescribeRuleResponse#managed_by #managed_by} => String
693
+ # * {Types::DescribeRuleResponse#event_bus_name #event_bus_name} => String
694
+ #
695
+ # @example Request syntax with placeholder values
696
+ #
697
+ # resp = client.describe_rule({
698
+ # name: "RuleName", # required
699
+ # event_bus_name: "EventBusName",
700
+ # })
701
+ #
702
+ # @example Response structure
703
+ #
704
+ # resp.name #=> String
705
+ # resp.arn #=> String
706
+ # resp.event_pattern #=> String
707
+ # resp.schedule_expression #=> String
708
+ # resp.state #=> String, one of "ENABLED", "DISABLED"
709
+ # resp.description #=> String
710
+ # resp.role_arn #=> String
711
+ # resp.managed_by #=> String
712
+ # resp.event_bus_name #=> String
713
+ #
714
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeRule AWS API Documentation
715
+ #
716
+ # @overload describe_rule(params = {})
717
+ # @param [Hash] params ({})
718
+ def describe_rule(params = {}, options = {})
719
+ req = build_request(:describe_rule, params)
720
+ req.send_request(options)
721
+ end
722
+
723
+ # Disables the specified rule. A disabled rule won't match any events
724
+ # and won't self-trigger if it has a schedule expression.
725
+ #
726
+ # When you disable a rule, incoming events might continue to match to
727
+ # the disabled rule. Allow a short period of time for changes to take
728
+ # effect.
729
+ #
730
+ # @option params [required, String] :name
731
+ # The name of the rule.
732
+ #
733
+ # @option params [String] :event_bus_name
734
+ # The event bus associated with the rule. If you omit this, the default
735
+ # event bus is used.
736
+ #
737
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
738
+ #
739
+ # @example Request syntax with placeholder values
740
+ #
741
+ # resp = client.disable_rule({
742
+ # name: "RuleName", # required
743
+ # event_bus_name: "EventBusName",
744
+ # })
745
+ #
746
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DisableRule AWS API Documentation
747
+ #
748
+ # @overload disable_rule(params = {})
749
+ # @param [Hash] params ({})
750
+ def disable_rule(params = {}, options = {})
751
+ req = build_request(:disable_rule, params)
752
+ req.send_request(options)
753
+ end
754
+
755
+ # Enables the specified rule. If the rule doesn't exist, the operation
756
+ # fails.
757
+ #
758
+ # When you enable a rule, incoming events might not immediately start
759
+ # matching to a newly enabled rule. Allow a short period of time for
760
+ # changes to take effect.
761
+ #
762
+ # @option params [required, String] :name
763
+ # The name of the rule.
764
+ #
765
+ # @option params [String] :event_bus_name
766
+ # The event bus associated with the rule. If you omit this, the default
767
+ # event bus is used.
768
+ #
769
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
770
+ #
771
+ # @example Request syntax with placeholder values
772
+ #
773
+ # resp = client.enable_rule({
774
+ # name: "RuleName", # required
775
+ # event_bus_name: "EventBusName",
776
+ # })
777
+ #
778
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/EnableRule AWS API Documentation
779
+ #
780
+ # @overload enable_rule(params = {})
781
+ # @param [Hash] params ({})
782
+ def enable_rule(params = {}, options = {})
783
+ req = build_request(:enable_rule, params)
784
+ req.send_request(options)
785
+ end
786
+
787
+ # Lists all the event buses in your account, including the default event
788
+ # bus, custom event buses, and partner event buses.
789
+ #
790
+ # <note markdown="1"> This operation is run by AWS customers, not by SaaS partners.
791
+ #
792
+ # </note>
793
+ #
794
+ # @option params [String] :name_prefix
795
+ # Specifying this limits the results to only those event buses with
796
+ # names that start with the specified prefix.
797
+ #
798
+ # @option params [String] :next_token
799
+ # The token returned by a previous call to retrieve the next set of
800
+ # results.
801
+ #
802
+ # @option params [Integer] :limit
803
+ # Specifying this limits the number of results returned by this
804
+ # operation. The operation also returns a `NextToken` that you can use
805
+ # in a subsequent operation to retrieve the next set of results.
806
+ #
807
+ # @return [Types::ListEventBusesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
808
+ #
809
+ # * {Types::ListEventBusesResponse#event_buses #event_buses} => Array&lt;Types::EventBus&gt;
810
+ # * {Types::ListEventBusesResponse#next_token #next_token} => String
811
+ #
812
+ # @example Request syntax with placeholder values
813
+ #
814
+ # resp = client.list_event_buses({
815
+ # name_prefix: "EventBusName",
816
+ # next_token: "NextToken",
817
+ # limit: 1,
818
+ # })
819
+ #
820
+ # @example Response structure
821
+ #
822
+ # resp.event_buses #=> Array
823
+ # resp.event_buses[0].name #=> String
824
+ # resp.event_buses[0].arn #=> String
825
+ # resp.event_buses[0].policy #=> String
826
+ # resp.next_token #=> String
827
+ #
828
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListEventBuses AWS API Documentation
829
+ #
830
+ # @overload list_event_buses(params = {})
831
+ # @param [Hash] params ({})
832
+ def list_event_buses(params = {}, options = {})
833
+ req = build_request(:list_event_buses, params)
834
+ req.send_request(options)
835
+ end
836
+
837
+ # You can use this to see all the partner event sources that have been
838
+ # shared with your AWS account. For more information about partner event
839
+ # sources, see CreateEventBus.
840
+ #
841
+ # <note markdown="1"> This operation is run by AWS customers, not by SaaS partners.
842
+ #
843
+ # </note>
844
+ #
845
+ # @option params [String] :name_prefix
846
+ # Specifying this limits the results to only those partner event sources
847
+ # with names that start with the specified prefix.
848
+ #
849
+ # @option params [String] :next_token
850
+ # The token returned by a previous call to retrieve the next set of
851
+ # results.
852
+ #
853
+ # @option params [Integer] :limit
854
+ # Specifying this limits the number of results returned by this
855
+ # operation. The operation also returns a `NextToken` that you can use
856
+ # in a subsequent operation to retrieve the next set of results.
857
+ #
858
+ # @return [Types::ListEventSourcesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
859
+ #
860
+ # * {Types::ListEventSourcesResponse#event_sources #event_sources} => Array&lt;Types::EventSource&gt;
861
+ # * {Types::ListEventSourcesResponse#next_token #next_token} => String
862
+ #
863
+ # @example Request syntax with placeholder values
864
+ #
865
+ # resp = client.list_event_sources({
866
+ # name_prefix: "EventSourceNamePrefix",
867
+ # next_token: "NextToken",
868
+ # limit: 1,
869
+ # })
870
+ #
871
+ # @example Response structure
872
+ #
873
+ # resp.event_sources #=> Array
874
+ # resp.event_sources[0].arn #=> String
875
+ # resp.event_sources[0].created_by #=> String
876
+ # resp.event_sources[0].creation_time #=> Time
877
+ # resp.event_sources[0].expiration_time #=> Time
878
+ # resp.event_sources[0].name #=> String
879
+ # resp.event_sources[0].state #=> String, one of "PENDING", "ACTIVE", "DELETED"
880
+ # resp.next_token #=> String
881
+ #
882
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListEventSources AWS API Documentation
883
+ #
884
+ # @overload list_event_sources(params = {})
885
+ # @param [Hash] params ({})
886
+ def list_event_sources(params = {}, options = {})
887
+ req = build_request(:list_event_sources, params)
888
+ req.send_request(options)
889
+ end
890
+
891
+ # An SaaS partner can use this operation to display the AWS account ID
892
+ # that a particular partner event source name is associated with.
893
+ #
894
+ # <note markdown="1"> This operation is used by SaaS partners, not by AWS customers.
895
+ #
896
+ # </note>
897
+ #
898
+ # @option params [required, String] :event_source_name
899
+ # The name of the partner event source to display account information
900
+ # about.
901
+ #
902
+ # @option params [String] :next_token
903
+ # The token returned by a previous call to this operation. Specifying
904
+ # this retrieves the next set of results.
905
+ #
906
+ # @option params [Integer] :limit
907
+ # Specifying this limits the number of results returned by this
908
+ # operation. The operation also returns a `NextToken` that you can use
909
+ # in a subsequent operation to retrieve the next set of results.
910
+ #
911
+ # @return [Types::ListPartnerEventSourceAccountsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
912
+ #
913
+ # * {Types::ListPartnerEventSourceAccountsResponse#partner_event_source_accounts #partner_event_source_accounts} => Array&lt;Types::PartnerEventSourceAccount&gt;
914
+ # * {Types::ListPartnerEventSourceAccountsResponse#next_token #next_token} => String
915
+ #
916
+ # @example Request syntax with placeholder values
917
+ #
918
+ # resp = client.list_partner_event_source_accounts({
919
+ # event_source_name: "EventSourceName", # required
920
+ # next_token: "NextToken",
921
+ # limit: 1,
922
+ # })
923
+ #
924
+ # @example Response structure
925
+ #
926
+ # resp.partner_event_source_accounts #=> Array
927
+ # resp.partner_event_source_accounts[0].account #=> String
928
+ # resp.partner_event_source_accounts[0].creation_time #=> Time
929
+ # resp.partner_event_source_accounts[0].expiration_time #=> Time
930
+ # resp.partner_event_source_accounts[0].state #=> String, one of "PENDING", "ACTIVE", "DELETED"
931
+ # resp.next_token #=> String
932
+ #
933
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListPartnerEventSourceAccounts AWS API Documentation
934
+ #
935
+ # @overload list_partner_event_source_accounts(params = {})
936
+ # @param [Hash] params ({})
937
+ def list_partner_event_source_accounts(params = {}, options = {})
938
+ req = build_request(:list_partner_event_source_accounts, params)
939
+ req.send_request(options)
940
+ end
941
+
942
+ # An SaaS partner can use this operation to list all the partner event
943
+ # source names that they have created.
944
+ #
945
+ # <note markdown="1"> This operation is not used by AWS customers.
946
+ #
947
+ # </note>
948
+ #
949
+ # @option params [required, String] :name_prefix
950
+ # If you specify this, the results are limited to only those partner
951
+ # event sources that start with the string you specify.
952
+ #
953
+ # @option params [String] :next_token
954
+ # The token returned by a previous call to this operation. Specifying
955
+ # this retrieves the next set of results.
956
+ #
957
+ # @option params [Integer] :limit
958
+ # pecifying this limits the number of results returned by this
959
+ # operation. The operation also returns a `NextToken` that you can use
960
+ # in a subsequent operation to retrieve the next set of results.
961
+ #
962
+ # @return [Types::ListPartnerEventSourcesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
963
+ #
964
+ # * {Types::ListPartnerEventSourcesResponse#partner_event_sources #partner_event_sources} => Array&lt;Types::PartnerEventSource&gt;
965
+ # * {Types::ListPartnerEventSourcesResponse#next_token #next_token} => String
966
+ #
967
+ # @example Request syntax with placeholder values
968
+ #
969
+ # resp = client.list_partner_event_sources({
970
+ # name_prefix: "PartnerEventSourceNamePrefix", # required
971
+ # next_token: "NextToken",
972
+ # limit: 1,
973
+ # })
974
+ #
975
+ # @example Response structure
976
+ #
977
+ # resp.partner_event_sources #=> Array
978
+ # resp.partner_event_sources[0].arn #=> String
979
+ # resp.partner_event_sources[0].name #=> String
980
+ # resp.next_token #=> String
981
+ #
982
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListPartnerEventSources AWS API Documentation
983
+ #
984
+ # @overload list_partner_event_sources(params = {})
985
+ # @param [Hash] params ({})
986
+ def list_partner_event_sources(params = {}, options = {})
987
+ req = build_request(:list_partner_event_sources, params)
988
+ req.send_request(options)
989
+ end
990
+
991
+ # Lists the rules for the specified target. You can see which rules can
992
+ # invoke a specific target in your account.
993
+ #
994
+ # @option params [required, String] :target_arn
995
+ # The Amazon Resource Name (ARN) of the target resource.
996
+ #
997
+ # @option params [String] :event_bus_name
998
+ # Limits the results to show only the rules associated with the
999
+ # specified event bus.
1000
+ #
1001
+ # @option params [String] :next_token
1002
+ # The token returned by a previous call to retrieve the next set of
1003
+ # results.
1004
+ #
1005
+ # @option params [Integer] :limit
1006
+ # The maximum number of results to return.
1007
+ #
1008
+ # @return [Types::ListRuleNamesByTargetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1009
+ #
1010
+ # * {Types::ListRuleNamesByTargetResponse#rule_names #rule_names} => Array&lt;String&gt;
1011
+ # * {Types::ListRuleNamesByTargetResponse#next_token #next_token} => String
1012
+ #
1013
+ # @example Request syntax with placeholder values
1014
+ #
1015
+ # resp = client.list_rule_names_by_target({
1016
+ # target_arn: "TargetArn", # required
1017
+ # event_bus_name: "EventBusName",
1018
+ # next_token: "NextToken",
1019
+ # limit: 1,
1020
+ # })
1021
+ #
1022
+ # @example Response structure
1023
+ #
1024
+ # resp.rule_names #=> Array
1025
+ # resp.rule_names[0] #=> String
1026
+ # resp.next_token #=> String
1027
+ #
1028
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListRuleNamesByTarget AWS API Documentation
1029
+ #
1030
+ # @overload list_rule_names_by_target(params = {})
1031
+ # @param [Hash] params ({})
1032
+ def list_rule_names_by_target(params = {}, options = {})
1033
+ req = build_request(:list_rule_names_by_target, params)
1034
+ req.send_request(options)
1035
+ end
1036
+
1037
+ # Lists your EventBridge rules. You can either list all the rules or
1038
+ # provide a prefix to match to the rule names.
1039
+ #
1040
+ # `ListRules` doesn't list the targets of a rule. To see the targets
1041
+ # associated with a rule, use ListTargetsByRule.
1042
+ #
1043
+ # @option params [String] :name_prefix
1044
+ # The prefix matching the rule name.
1045
+ #
1046
+ # @option params [String] :event_bus_name
1047
+ # Limits the results to show only the rules associated with the
1048
+ # specified event bus.
1049
+ #
1050
+ # @option params [String] :next_token
1051
+ # The token returned by a previous call to retrieve the next set of
1052
+ # results.
1053
+ #
1054
+ # @option params [Integer] :limit
1055
+ # The maximum number of results to return.
1056
+ #
1057
+ # @return [Types::ListRulesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1058
+ #
1059
+ # * {Types::ListRulesResponse#rules #rules} => Array&lt;Types::Rule&gt;
1060
+ # * {Types::ListRulesResponse#next_token #next_token} => String
1061
+ #
1062
+ # @example Request syntax with placeholder values
1063
+ #
1064
+ # resp = client.list_rules({
1065
+ # name_prefix: "RuleName",
1066
+ # event_bus_name: "EventBusName",
1067
+ # next_token: "NextToken",
1068
+ # limit: 1,
1069
+ # })
1070
+ #
1071
+ # @example Response structure
1072
+ #
1073
+ # resp.rules #=> Array
1074
+ # resp.rules[0].name #=> String
1075
+ # resp.rules[0].arn #=> String
1076
+ # resp.rules[0].event_pattern #=> String
1077
+ # resp.rules[0].state #=> String, one of "ENABLED", "DISABLED"
1078
+ # resp.rules[0].description #=> String
1079
+ # resp.rules[0].schedule_expression #=> String
1080
+ # resp.rules[0].role_arn #=> String
1081
+ # resp.rules[0].managed_by #=> String
1082
+ # resp.rules[0].event_bus_name #=> String
1083
+ # resp.next_token #=> String
1084
+ #
1085
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListRules AWS API Documentation
1086
+ #
1087
+ # @overload list_rules(params = {})
1088
+ # @param [Hash] params ({})
1089
+ def list_rules(params = {}, options = {})
1090
+ req = build_request(:list_rules, params)
1091
+ req.send_request(options)
1092
+ end
1093
+
1094
+ # Displays the tags associated with an EventBridge resource. In
1095
+ # EventBridge, rules can be tagged.
1096
+ #
1097
+ # @option params [required, String] :resource_arn
1098
+ # The ARN of the rule for which you want to view tags.
1099
+ #
1100
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1101
+ #
1102
+ # * {Types::ListTagsForResourceResponse#tags #tags} => Array&lt;Types::Tag&gt;
1103
+ #
1104
+ # @example Request syntax with placeholder values
1105
+ #
1106
+ # resp = client.list_tags_for_resource({
1107
+ # resource_arn: "Arn", # required
1108
+ # })
1109
+ #
1110
+ # @example Response structure
1111
+ #
1112
+ # resp.tags #=> Array
1113
+ # resp.tags[0].key #=> String
1114
+ # resp.tags[0].value #=> String
1115
+ #
1116
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListTagsForResource AWS API Documentation
1117
+ #
1118
+ # @overload list_tags_for_resource(params = {})
1119
+ # @param [Hash] params ({})
1120
+ def list_tags_for_resource(params = {}, options = {})
1121
+ req = build_request(:list_tags_for_resource, params)
1122
+ req.send_request(options)
1123
+ end
1124
+
1125
+ # Lists the targets assigned to the specified rule.
1126
+ #
1127
+ # @option params [required, String] :rule
1128
+ # The name of the rule.
1129
+ #
1130
+ # @option params [String] :event_bus_name
1131
+ # The event bus associated with the rule. If you omit this, the default
1132
+ # event bus is used.
1133
+ #
1134
+ # @option params [String] :next_token
1135
+ # The token returned by a previous call to retrieve the next set of
1136
+ # results.
1137
+ #
1138
+ # @option params [Integer] :limit
1139
+ # The maximum number of results to return.
1140
+ #
1141
+ # @return [Types::ListTargetsByRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1142
+ #
1143
+ # * {Types::ListTargetsByRuleResponse#targets #targets} => Array&lt;Types::Target&gt;
1144
+ # * {Types::ListTargetsByRuleResponse#next_token #next_token} => String
1145
+ #
1146
+ # @example Request syntax with placeholder values
1147
+ #
1148
+ # resp = client.list_targets_by_rule({
1149
+ # rule: "RuleName", # required
1150
+ # event_bus_name: "EventBusName",
1151
+ # next_token: "NextToken",
1152
+ # limit: 1,
1153
+ # })
1154
+ #
1155
+ # @example Response structure
1156
+ #
1157
+ # resp.targets #=> Array
1158
+ # resp.targets[0].id #=> String
1159
+ # resp.targets[0].arn #=> String
1160
+ # resp.targets[0].role_arn #=> String
1161
+ # resp.targets[0].input #=> String
1162
+ # resp.targets[0].input_path #=> String
1163
+ # resp.targets[0].input_transformer.input_paths_map #=> Hash
1164
+ # resp.targets[0].input_transformer.input_paths_map["InputTransformerPathKey"] #=> String
1165
+ # resp.targets[0].input_transformer.input_template #=> String
1166
+ # resp.targets[0].kinesis_parameters.partition_key_path #=> String
1167
+ # resp.targets[0].run_command_parameters.run_command_targets #=> Array
1168
+ # resp.targets[0].run_command_parameters.run_command_targets[0].key #=> String
1169
+ # resp.targets[0].run_command_parameters.run_command_targets[0].values #=> Array
1170
+ # resp.targets[0].run_command_parameters.run_command_targets[0].values[0] #=> String
1171
+ # resp.targets[0].ecs_parameters.task_definition_arn #=> String
1172
+ # resp.targets[0].ecs_parameters.task_count #=> Integer
1173
+ # resp.targets[0].ecs_parameters.launch_type #=> String, one of "EC2", "FARGATE"
1174
+ # resp.targets[0].ecs_parameters.network_configuration.awsvpc_configuration.subnets #=> Array
1175
+ # resp.targets[0].ecs_parameters.network_configuration.awsvpc_configuration.subnets[0] #=> String
1176
+ # resp.targets[0].ecs_parameters.network_configuration.awsvpc_configuration.security_groups #=> Array
1177
+ # resp.targets[0].ecs_parameters.network_configuration.awsvpc_configuration.security_groups[0] #=> String
1178
+ # resp.targets[0].ecs_parameters.network_configuration.awsvpc_configuration.assign_public_ip #=> String, one of "ENABLED", "DISABLED"
1179
+ # resp.targets[0].ecs_parameters.platform_version #=> String
1180
+ # resp.targets[0].ecs_parameters.group #=> String
1181
+ # resp.targets[0].batch_parameters.job_definition #=> String
1182
+ # resp.targets[0].batch_parameters.job_name #=> String
1183
+ # resp.targets[0].batch_parameters.array_properties.size #=> Integer
1184
+ # resp.targets[0].batch_parameters.retry_strategy.attempts #=> Integer
1185
+ # resp.targets[0].sqs_parameters.message_group_id #=> String
1186
+ # resp.next_token #=> String
1187
+ #
1188
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListTargetsByRule AWS API Documentation
1189
+ #
1190
+ # @overload list_targets_by_rule(params = {})
1191
+ # @param [Hash] params ({})
1192
+ def list_targets_by_rule(params = {}, options = {})
1193
+ req = build_request(:list_targets_by_rule, params)
1194
+ req.send_request(options)
1195
+ end
1196
+
1197
+ # Sends custom events to EventBridge so that they can be matched to
1198
+ # rules. These events can be from your custom applications and services.
1199
+ #
1200
+ # @option params [required, Array<Types::PutEventsRequestEntry>] :entries
1201
+ # The entry that defines an event in your system. You can specify
1202
+ # several parameters for the entry such as the source and type of the
1203
+ # event, resources associated with the event, and so on.
1204
+ #
1205
+ # @return [Types::PutEventsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1206
+ #
1207
+ # * {Types::PutEventsResponse#failed_entry_count #failed_entry_count} => Integer
1208
+ # * {Types::PutEventsResponse#entries #entries} => Array&lt;Types::PutEventsResultEntry&gt;
1209
+ #
1210
+ # @example Request syntax with placeholder values
1211
+ #
1212
+ # resp = client.put_events({
1213
+ # entries: [ # required
1214
+ # {
1215
+ # time: Time.now,
1216
+ # source: "String",
1217
+ # resources: ["EventResource"],
1218
+ # detail_type: "String",
1219
+ # detail: "String",
1220
+ # event_bus_name: "NonPartnerEventBusName",
1221
+ # },
1222
+ # ],
1223
+ # })
1224
+ #
1225
+ # @example Response structure
1226
+ #
1227
+ # resp.failed_entry_count #=> Integer
1228
+ # resp.entries #=> Array
1229
+ # resp.entries[0].event_id #=> String
1230
+ # resp.entries[0].error_code #=> String
1231
+ # resp.entries[0].error_message #=> String
1232
+ #
1233
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutEvents AWS API Documentation
1234
+ #
1235
+ # @overload put_events(params = {})
1236
+ # @param [Hash] params ({})
1237
+ def put_events(params = {}, options = {})
1238
+ req = build_request(:put_events, params)
1239
+ req.send_request(options)
1240
+ end
1241
+
1242
+ # This is used by SaaS partners to write events to a customer's partner
1243
+ # event bus.
1244
+ #
1245
+ # <note markdown="1"> AWS customers do not use this operation. Instead, AWS customers can
1246
+ # use PutEvents to write custom events from their own applications to an
1247
+ # event bus.
1248
+ #
1249
+ # </note>
1250
+ #
1251
+ # @option params [required, Array<Types::PutPartnerEventsRequestEntry>] :entries
1252
+ # The list of events to write to the event bus.
1253
+ #
1254
+ # @return [Types::PutPartnerEventsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1255
+ #
1256
+ # * {Types::PutPartnerEventsResponse#failed_entry_count #failed_entry_count} => Integer
1257
+ # * {Types::PutPartnerEventsResponse#entries #entries} => Array&lt;Types::PutPartnerEventsResultEntry&gt;
1258
+ #
1259
+ # @example Request syntax with placeholder values
1260
+ #
1261
+ # resp = client.put_partner_events({
1262
+ # entries: [ # required
1263
+ # {
1264
+ # time: Time.now,
1265
+ # source: "String",
1266
+ # resources: ["EventResource"],
1267
+ # detail_type: "String",
1268
+ # detail: "String",
1269
+ # },
1270
+ # ],
1271
+ # })
1272
+ #
1273
+ # @example Response structure
1274
+ #
1275
+ # resp.failed_entry_count #=> Integer
1276
+ # resp.entries #=> Array
1277
+ # resp.entries[0].event_id #=> String
1278
+ # resp.entries[0].error_code #=> String
1279
+ # resp.entries[0].error_message #=> String
1280
+ #
1281
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutPartnerEvents AWS API Documentation
1282
+ #
1283
+ # @overload put_partner_events(params = {})
1284
+ # @param [Hash] params ({})
1285
+ def put_partner_events(params = {}, options = {})
1286
+ req = build_request(:put_partner_events, params)
1287
+ req.send_request(options)
1288
+ end
1289
+
1290
+ # Running `PutPermission` permits the specified AWS account or AWS
1291
+ # organization to put events to the specified *event bus*. Rules in your
1292
+ # account are triggered by these events arriving to an event bus in your
1293
+ # account.
1294
+ #
1295
+ # For another account to send events to your account, that external
1296
+ # account must have a rule with your account's event bus as a target.
1297
+ #
1298
+ # To enable multiple AWS accounts to put events to an event bus, run
1299
+ # `PutPermission` once for each of these accounts. Or, if all the
1300
+ # accounts are members of the same AWS organization, you can run
1301
+ # `PutPermission` once specifying `Principal` as "*" and specifying
1302
+ # the AWS organization ID in `Condition`, to grant permissions to all
1303
+ # accounts in that organization.
1304
+ #
1305
+ # If you grant permissions using an organization, then accounts in that
1306
+ # organization must specify a `RoleArn` with proper permissions when
1307
+ # they use `PutTarget` to add your account's event bus as a target. For
1308
+ # more information, see [Sending and Receiving Events Between AWS
1309
+ # Accounts][1] in the *Amazon EventBridge User Guide*.
1310
+ #
1311
+ # The permission policy on an event bus can't exceed 10 KB in size.
1312
+ #
1313
+ #
1314
+ #
1315
+ # [1]: https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html
1316
+ #
1317
+ # @option params [String] :event_bus_name
1318
+ # The event bus associated with the rule. If you omit this, the default
1319
+ # event bus is used.
1320
+ #
1321
+ # @option params [required, String] :action
1322
+ # The action that you're enabling the other account to perform.
1323
+ # Currently, this must be `events:PutEvents`.
1324
+ #
1325
+ # @option params [required, String] :principal
1326
+ # The 12-digit AWS account ID that you are permitting to put events to
1327
+ # your default event bus. Specify "*" to permit any account to put
1328
+ # events to your default event bus.
1329
+ #
1330
+ # If you specify "*" without specifying `Condition`, avoid creating
1331
+ # rules that might match undesirable events. To create more secure
1332
+ # rules, make sure that the event pattern for each rule contains an
1333
+ # `account` field with a specific account ID to receive events from.
1334
+ # Rules with an account field don't match any events sent from other
1335
+ # accounts.
1336
+ #
1337
+ # @option params [required, String] :statement_id
1338
+ # An identifier string for the external account that you're granting
1339
+ # permissions to. If you later want to revoke the permission for this
1340
+ # external account, specify this `StatementId` when you run
1341
+ # RemovePermission.
1342
+ #
1343
+ # @option params [Types::Condition] :condition
1344
+ # This parameter enables you to limit the permission to accounts that
1345
+ # fulfill a certain condition, such as being a member of a certain AWS
1346
+ # organization. For more information about AWS Organizations, see [What
1347
+ # Is AWS Organizations?][1] in the *AWS Organizations User Guide*.
1348
+ #
1349
+ # If you specify `Condition` with an AWS organization ID and specify
1350
+ # "*" as the value for `Principal`, you grant permission to all the
1351
+ # accounts in the named organization.
1352
+ #
1353
+ # The `Condition` is a JSON string that must contain `Type`, `Key`, and
1354
+ # `Value` fields.
1355
+ #
1356
+ #
1357
+ #
1358
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html
1359
+ #
1360
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1361
+ #
1362
+ # @example Request syntax with placeholder values
1363
+ #
1364
+ # resp = client.put_permission({
1365
+ # event_bus_name: "NonPartnerEventBusName",
1366
+ # action: "Action", # required
1367
+ # principal: "Principal", # required
1368
+ # statement_id: "StatementId", # required
1369
+ # condition: {
1370
+ # type: "String", # required
1371
+ # key: "String", # required
1372
+ # value: "String", # required
1373
+ # },
1374
+ # })
1375
+ #
1376
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutPermission AWS API Documentation
1377
+ #
1378
+ # @overload put_permission(params = {})
1379
+ # @param [Hash] params ({})
1380
+ def put_permission(params = {}, options = {})
1381
+ req = build_request(:put_permission, params)
1382
+ req.send_request(options)
1383
+ end
1384
+
1385
+ # Creates or updates the specified rule. Rules are enabled by default or
1386
+ # based on value of the state. You can disable a rule using DisableRule.
1387
+ #
1388
+ # A single rule watches for events from a single event bus. Events
1389
+ # generated by AWS services go to your account's default event bus.
1390
+ # Events generated by SaaS partner services or applications go to the
1391
+ # matching partner event bus. If you have custom applications or
1392
+ # services, you can specify whether their events go to your default
1393
+ # event bus or a custom event bus that you have created. For more
1394
+ # information, see CreateEventBus.
1395
+ #
1396
+ # If you're updating an existing rule, the rule is replaced with what
1397
+ # you specify in this `PutRule` command. If you omit arguments in
1398
+ # `PutRule`, the old values for those arguments aren't kept. Instead,
1399
+ # they're replaced with null values.
1400
+ #
1401
+ # When you create or update a rule, incoming events might not
1402
+ # immediately start matching to new or updated rules. Allow a short
1403
+ # period of time for changes to take effect.
1404
+ #
1405
+ # A rule must contain at least an `EventPattern` or
1406
+ # `ScheduleExpression`. Rules with `EventPatterns` are triggered when a
1407
+ # matching event is observed. Rules with `ScheduleExpressions`
1408
+ # self-trigger based on the given schedule. A rule can have both an
1409
+ # `EventPattern` and a `ScheduleExpression`, in which case the rule
1410
+ # triggers on matching events as well as on a schedule.
1411
+ #
1412
+ # When you initially create a rule, you can optionally assign one or
1413
+ # more tags to the rule. Tags can help you organize and categorize your
1414
+ # resources. You can also use them to scope user permissions, by
1415
+ # granting a user permission to access or change only rules with certain
1416
+ # tag values. To use the `PutRule` operation and assign tags, you must
1417
+ # have both the `events:PutRule` and `events:TagResource` permissions.
1418
+ #
1419
+ # If you are updating an existing rule, any tags you specify in the
1420
+ # `PutRule` operation are ignored. To update the tags of an existing
1421
+ # rule, use TagResource and UntagResource.
1422
+ #
1423
+ # Most services in AWS treat `:` or `/` as the same character in Amazon
1424
+ # Resource Names (ARNs). However, EventBridge uses an exact match in
1425
+ # event patterns and rules. Be sure to use the correct ARN characters
1426
+ # when creating event patterns so that they match the ARN syntax in the
1427
+ # event that you want to match.
1428
+ #
1429
+ # In EventBridge, you could create rules that lead to infinite loops,
1430
+ # where a rule is fired repeatedly. For example, a rule might detect
1431
+ # that ACLs have changed on an S3 bucket, and trigger software to change
1432
+ # them to the desired state. If you don't write the rule carefully, the
1433
+ # subsequent change to the ACLs fires the rule again, creating an
1434
+ # infinite loop.
1435
+ #
1436
+ # To prevent this, write the rules so that the triggered actions don't
1437
+ # refire the same rule. For example, your rule could fire only if ACLs
1438
+ # are found to be in a bad state, instead of after any change.
1439
+ #
1440
+ # An infinite loop can quickly cause higher than expected charges. We
1441
+ # recommend that you use budgeting, which alerts you when charges exceed
1442
+ # your specified limit. For more information, see [Managing Your Costs
1443
+ # with Budgets][1].
1444
+ #
1445
+ #
1446
+ #
1447
+ # [1]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-managing-costs.html
1448
+ #
1449
+ # @option params [required, String] :name
1450
+ # The name of the rule that you're creating or updating.
1451
+ #
1452
+ # @option params [String] :schedule_expression
1453
+ # The scheduling expression: for example, `"cron(0 20 * * ? *)"` or
1454
+ # `"rate(5 minutes)"`.
1455
+ #
1456
+ # @option params [String] :event_pattern
1457
+ # The event pattern. For more information, see [Event Patterns][1] in
1458
+ # the *Amazon EventBridge User Guide*.
1459
+ #
1460
+ #
1461
+ #
1462
+ # [1]: https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html
1463
+ #
1464
+ # @option params [String] :state
1465
+ # Indicates whether the rule is enabled or disabled.
1466
+ #
1467
+ # @option params [String] :description
1468
+ # A description of the rule.
1469
+ #
1470
+ # @option params [String] :role_arn
1471
+ # The Amazon Resource Name (ARN) of the IAM role associated with the
1472
+ # rule.
1473
+ #
1474
+ # @option params [Array<Types::Tag>] :tags
1475
+ # The list of key-value pairs to associate with the rule.
1476
+ #
1477
+ # @option params [String] :event_bus_name
1478
+ # The event bus to associate with this rule. If you omit this, the
1479
+ # default event bus is used.
1480
+ #
1481
+ # @return [Types::PutRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1482
+ #
1483
+ # * {Types::PutRuleResponse#rule_arn #rule_arn} => String
1484
+ #
1485
+ # @example Request syntax with placeholder values
1486
+ #
1487
+ # resp = client.put_rule({
1488
+ # name: "RuleName", # required
1489
+ # schedule_expression: "ScheduleExpression",
1490
+ # event_pattern: "EventPattern",
1491
+ # state: "ENABLED", # accepts ENABLED, DISABLED
1492
+ # description: "RuleDescription",
1493
+ # role_arn: "RoleArn",
1494
+ # tags: [
1495
+ # {
1496
+ # key: "TagKey", # required
1497
+ # value: "TagValue", # required
1498
+ # },
1499
+ # ],
1500
+ # event_bus_name: "EventBusName",
1501
+ # })
1502
+ #
1503
+ # @example Response structure
1504
+ #
1505
+ # resp.rule_arn #=> String
1506
+ #
1507
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutRule AWS API Documentation
1508
+ #
1509
+ # @overload put_rule(params = {})
1510
+ # @param [Hash] params ({})
1511
+ def put_rule(params = {}, options = {})
1512
+ req = build_request(:put_rule, params)
1513
+ req.send_request(options)
1514
+ end
1515
+
1516
+ # Adds the specified targets to the specified rule, or updates the
1517
+ # targets if they're already associated with the rule.
1518
+ #
1519
+ # Targets are the resources that are invoked when a rule is triggered.
1520
+ #
1521
+ # You can configure the following as targets in EventBridge:
1522
+ #
1523
+ # * EC2 instances
1524
+ #
1525
+ # * SSM Run Command
1526
+ #
1527
+ # * SSM Automation
1528
+ #
1529
+ # * AWS Lambda functions
1530
+ #
1531
+ # * Data streams in Amazon Kinesis Data Streams
1532
+ #
1533
+ # * Data delivery streams in Amazon Kinesis Data Firehose
1534
+ #
1535
+ # * Amazon ECS tasks
1536
+ #
1537
+ # * AWS Step Functions state machines
1538
+ #
1539
+ # * AWS Batch jobs
1540
+ #
1541
+ # * AWS CodeBuild projects
1542
+ #
1543
+ # * Pipelines in AWS CodePipeline
1544
+ #
1545
+ # * Amazon Inspector assessment templates
1546
+ #
1547
+ # * Amazon SNS topics
1548
+ #
1549
+ # * Amazon SQS queues, including FIFO queues
1550
+ #
1551
+ # * The default event bus of another AWS account
1552
+ #
1553
+ # Creating rules with built-in targets is supported only on the AWS
1554
+ # Management Console. The built-in targets are `EC2 CreateSnapshot API
1555
+ # call`, `EC2 RebootInstances API call`, `EC2 StopInstances API call`,
1556
+ # and `EC2 TerminateInstances API call`.
1557
+ #
1558
+ # For some target types, `PutTargets` provides target-specific
1559
+ # parameters. If the target is a Kinesis data stream, you can optionally
1560
+ # specify which shard the event goes to by using the `KinesisParameters`
1561
+ # argument. To invoke a command on multiple EC2 instances with one rule,
1562
+ # you can use the `RunCommandParameters` field.
1563
+ #
1564
+ # To be able to make API calls against the resources that you own,
1565
+ # Amazon EventBridge needs the appropriate permissions. For AWS Lambda
1566
+ # and Amazon SNS resources, EventBridge relies on resource-based
1567
+ # policies. For EC2 instances, Kinesis data streams, and AWS Step
1568
+ # Functions state machines, EventBridge relies on IAM roles that you
1569
+ # specify in the `RoleARN` argument in `PutTargets`. For more
1570
+ # information, see [Authentication and Access Control][1] in the *Amazon
1571
+ # EventBridge User Guide*.
1572
+ #
1573
+ # If another AWS account is in the same Region and has granted you
1574
+ # permission (using `PutPermission`), you can send events to that
1575
+ # account. Set that account's event bus as a target of the rules in
1576
+ # your account. To send the matched events to the other account, specify
1577
+ # that account's event bus as the `Arn` value when you run
1578
+ # `PutTargets`. If your account sends events to another account, your
1579
+ # account is charged for each sent event. Each event sent to another
1580
+ # account is charged as a custom event. The account receiving the event
1581
+ # isn't charged. For more information, see [Amazon EventBridge
1582
+ # Pricing][2].
1583
+ #
1584
+ # If you're setting an event bus in another account as the target and
1585
+ # that account granted permission to your account through an
1586
+ # organization instead of directly by the account ID, you must specify a
1587
+ # `RoleArn` with proper permissions in the `Target` structure. For more
1588
+ # information, see [Sending and Receiving Events Between AWS
1589
+ # Accounts][3] in the *Amazon EventBridge User Guide*.
1590
+ #
1591
+ # For more information about enabling cross-account events, see
1592
+ # PutPermission.
1593
+ #
1594
+ # `Input`, `InputPath`, and `InputTransformer` are mutually exclusive
1595
+ # and optional parameters of a target. When a rule is triggered due to a
1596
+ # matched event:
1597
+ #
1598
+ # * If none of the following arguments are specified for a target, the
1599
+ # entire event is passed to the target in JSON format (unless the
1600
+ # target is Amazon EC2 Run Command or Amazon ECS task, in which case
1601
+ # nothing from the event is passed to the target).
1602
+ #
1603
+ # * If `Input` is specified in the form of valid JSON, then the matched
1604
+ # event is overridden with this constant.
1605
+ #
1606
+ # * If `InputPath` is specified in the form of JSONPath (for example,
1607
+ # `$.detail`), only the part of the event specified in the path is
1608
+ # passed to the target (for example, only the detail part of the event
1609
+ # is passed).
1610
+ #
1611
+ # * If `InputTransformer` is specified, one or more specified JSONPaths
1612
+ # are extracted from the event and used as values in a template that
1613
+ # you specify as the input to the target.
1614
+ #
1615
+ # When you specify `InputPath` or `InputTransformer`, you must use JSON
1616
+ # dot notation, not bracket notation.
1617
+ #
1618
+ # When you add targets to a rule and the associated rule triggers soon
1619
+ # after, new or updated targets might not be immediately invoked. Allow
1620
+ # a short period of time for changes to take effect.
1621
+ #
1622
+ # This action can partially fail if too many requests are made at the
1623
+ # same time. If that happens, `FailedEntryCount` is nonzero in the
1624
+ # response, and each entry in `FailedEntries` provides the ID of the
1625
+ # failed target and the error code.
1626
+ #
1627
+ #
1628
+ #
1629
+ # [1]: https://docs.aws.amazon.com/eventbridge/latest/userguide/auth-and-access-control-eventbridge.html
1630
+ # [2]: https://aws.amazon.com/eventbridge/pricing/
1631
+ # [3]: https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html
1632
+ #
1633
+ # @option params [required, String] :rule
1634
+ # The name of the rule.
1635
+ #
1636
+ # @option params [String] :event_bus_name
1637
+ # The name of the event bus associated with the rule. If you omit this,
1638
+ # the default event bus is used.
1639
+ #
1640
+ # @option params [required, Array<Types::Target>] :targets
1641
+ # The targets to update or add to the rule.
1642
+ #
1643
+ # @return [Types::PutTargetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1644
+ #
1645
+ # * {Types::PutTargetsResponse#failed_entry_count #failed_entry_count} => Integer
1646
+ # * {Types::PutTargetsResponse#failed_entries #failed_entries} => Array&lt;Types::PutTargetsResultEntry&gt;
1647
+ #
1648
+ # @example Request syntax with placeholder values
1649
+ #
1650
+ # resp = client.put_targets({
1651
+ # rule: "RuleName", # required
1652
+ # event_bus_name: "EventBusName",
1653
+ # targets: [ # required
1654
+ # {
1655
+ # id: "TargetId", # required
1656
+ # arn: "TargetArn", # required
1657
+ # role_arn: "RoleArn",
1658
+ # input: "TargetInput",
1659
+ # input_path: "TargetInputPath",
1660
+ # input_transformer: {
1661
+ # input_paths_map: {
1662
+ # "InputTransformerPathKey" => "TargetInputPath",
1663
+ # },
1664
+ # input_template: "TransformerInput", # required
1665
+ # },
1666
+ # kinesis_parameters: {
1667
+ # partition_key_path: "TargetPartitionKeyPath", # required
1668
+ # },
1669
+ # run_command_parameters: {
1670
+ # run_command_targets: [ # required
1671
+ # {
1672
+ # key: "RunCommandTargetKey", # required
1673
+ # values: ["RunCommandTargetValue"], # required
1674
+ # },
1675
+ # ],
1676
+ # },
1677
+ # ecs_parameters: {
1678
+ # task_definition_arn: "Arn", # required
1679
+ # task_count: 1,
1680
+ # launch_type: "EC2", # accepts EC2, FARGATE
1681
+ # network_configuration: {
1682
+ # awsvpc_configuration: {
1683
+ # subnets: ["String"], # required
1684
+ # security_groups: ["String"],
1685
+ # assign_public_ip: "ENABLED", # accepts ENABLED, DISABLED
1686
+ # },
1687
+ # },
1688
+ # platform_version: "String",
1689
+ # group: "String",
1690
+ # },
1691
+ # batch_parameters: {
1692
+ # job_definition: "String", # required
1693
+ # job_name: "String", # required
1694
+ # array_properties: {
1695
+ # size: 1,
1696
+ # },
1697
+ # retry_strategy: {
1698
+ # attempts: 1,
1699
+ # },
1700
+ # },
1701
+ # sqs_parameters: {
1702
+ # message_group_id: "MessageGroupId",
1703
+ # },
1704
+ # },
1705
+ # ],
1706
+ # })
1707
+ #
1708
+ # @example Response structure
1709
+ #
1710
+ # resp.failed_entry_count #=> Integer
1711
+ # resp.failed_entries #=> Array
1712
+ # resp.failed_entries[0].target_id #=> String
1713
+ # resp.failed_entries[0].error_code #=> String
1714
+ # resp.failed_entries[0].error_message #=> String
1715
+ #
1716
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutTargets AWS API Documentation
1717
+ #
1718
+ # @overload put_targets(params = {})
1719
+ # @param [Hash] params ({})
1720
+ def put_targets(params = {}, options = {})
1721
+ req = build_request(:put_targets, params)
1722
+ req.send_request(options)
1723
+ end
1724
+
1725
+ # Revokes the permission of another AWS account to be able to put events
1726
+ # to the specified event bus. Specify the account to revoke by the
1727
+ # `StatementId` value that you associated with the account when you
1728
+ # granted it permission with `PutPermission`. You can find the
1729
+ # `StatementId` by using DescribeEventBus.
1730
+ #
1731
+ # @option params [required, String] :statement_id
1732
+ # The statement ID corresponding to the account that is no longer
1733
+ # allowed to put events to the default event bus.
1734
+ #
1735
+ # @option params [String] :event_bus_name
1736
+ # The name of the event bus to revoke permissions for. If you omit this,
1737
+ # the default event bus is used.
1738
+ #
1739
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1740
+ #
1741
+ # @example Request syntax with placeholder values
1742
+ #
1743
+ # resp = client.remove_permission({
1744
+ # statement_id: "StatementId", # required
1745
+ # event_bus_name: "NonPartnerEventBusName",
1746
+ # })
1747
+ #
1748
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/RemovePermission AWS API Documentation
1749
+ #
1750
+ # @overload remove_permission(params = {})
1751
+ # @param [Hash] params ({})
1752
+ def remove_permission(params = {}, options = {})
1753
+ req = build_request(:remove_permission, params)
1754
+ req.send_request(options)
1755
+ end
1756
+
1757
+ # Removes the specified targets from the specified rule. When the rule
1758
+ # is triggered, those targets are no longer be invoked.
1759
+ #
1760
+ # When you remove a target, when the associated rule triggers, removed
1761
+ # targets might continue to be invoked. Allow a short period of time for
1762
+ # changes to take effect.
1763
+ #
1764
+ # This action can partially fail if too many requests are made at the
1765
+ # same time. If that happens, `FailedEntryCount` is non-zero in the
1766
+ # response and each entry in `FailedEntries` provides the ID of the
1767
+ # failed target and the error code.
1768
+ #
1769
+ # @option params [required, String] :rule
1770
+ # The name of the rule.
1771
+ #
1772
+ # @option params [String] :event_bus_name
1773
+ # The name of the event bus associated with the rule.
1774
+ #
1775
+ # @option params [required, Array<String>] :ids
1776
+ # The IDs of the targets to remove from the rule.
1777
+ #
1778
+ # @option params [Boolean] :force
1779
+ # If this is a managed rule created by an AWS service on your behalf,
1780
+ # you must specify `Force` as `True` to remove targets. This parameter
1781
+ # is ignored for rules that aren't managed rules. You can check whether
1782
+ # a rule is a managed rule by using `DescribeRule` or `ListRules` and
1783
+ # checking the `ManagedBy` field of the response.
1784
+ #
1785
+ # @return [Types::RemoveTargetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1786
+ #
1787
+ # * {Types::RemoveTargetsResponse#failed_entry_count #failed_entry_count} => Integer
1788
+ # * {Types::RemoveTargetsResponse#failed_entries #failed_entries} => Array&lt;Types::RemoveTargetsResultEntry&gt;
1789
+ #
1790
+ # @example Request syntax with placeholder values
1791
+ #
1792
+ # resp = client.remove_targets({
1793
+ # rule: "RuleName", # required
1794
+ # event_bus_name: "EventBusName",
1795
+ # ids: ["TargetId"], # required
1796
+ # force: false,
1797
+ # })
1798
+ #
1799
+ # @example Response structure
1800
+ #
1801
+ # resp.failed_entry_count #=> Integer
1802
+ # resp.failed_entries #=> Array
1803
+ # resp.failed_entries[0].target_id #=> String
1804
+ # resp.failed_entries[0].error_code #=> String
1805
+ # resp.failed_entries[0].error_message #=> String
1806
+ #
1807
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/RemoveTargets AWS API Documentation
1808
+ #
1809
+ # @overload remove_targets(params = {})
1810
+ # @param [Hash] params ({})
1811
+ def remove_targets(params = {}, options = {})
1812
+ req = build_request(:remove_targets, params)
1813
+ req.send_request(options)
1814
+ end
1815
+
1816
+ # Assigns one or more tags (key-value pairs) to the specified
1817
+ # EventBridge resource. Tags can help you organize and categorize your
1818
+ # resources. You can also use them to scope user permissions by granting
1819
+ # a user permission to access or change only resources with certain tag
1820
+ # values. In EventBridge, rules can be tagged.
1821
+ #
1822
+ # Tags don't have any semantic meaning to AWS and are interpreted
1823
+ # strictly as strings of characters.
1824
+ #
1825
+ # You can use the `TagResource` action with a rule that already has
1826
+ # tags. If you specify a new tag key for the rule, this tag is appended
1827
+ # to the list of tags associated with the rule. If you specify a tag key
1828
+ # that is already associated with the rule, the new tag value that you
1829
+ # specify replaces the previous value for that tag.
1830
+ #
1831
+ # You can associate as many as 50 tags with a resource.
1832
+ #
1833
+ # @option params [required, String] :resource_arn
1834
+ # The ARN of the rule that you're adding tags to.
1835
+ #
1836
+ # @option params [required, Array<Types::Tag>] :tags
1837
+ # The list of key-value pairs to associate with the rule.
1838
+ #
1839
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1840
+ #
1841
+ # @example Request syntax with placeholder values
1842
+ #
1843
+ # resp = client.tag_resource({
1844
+ # resource_arn: "Arn", # required
1845
+ # tags: [ # required
1846
+ # {
1847
+ # key: "TagKey", # required
1848
+ # value: "TagValue", # required
1849
+ # },
1850
+ # ],
1851
+ # })
1852
+ #
1853
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/TagResource AWS API Documentation
1854
+ #
1855
+ # @overload tag_resource(params = {})
1856
+ # @param [Hash] params ({})
1857
+ def tag_resource(params = {}, options = {})
1858
+ req = build_request(:tag_resource, params)
1859
+ req.send_request(options)
1860
+ end
1861
+
1862
+ # Tests whether the specified event pattern matches the provided event.
1863
+ #
1864
+ # Most services in AWS treat `:` or `/` as the same character in Amazon
1865
+ # Resource Names (ARNs). However, EventBridge uses an exact match in
1866
+ # event patterns and rules. Be sure to use the correct ARN characters
1867
+ # when creating event patterns so that they match the ARN syntax in the
1868
+ # event that you want to match.
1869
+ #
1870
+ # @option params [required, String] :event_pattern
1871
+ # The event pattern. For more information, see [Event Patterns][1] in
1872
+ # the *Amazon EventBridge User Guide*.
1873
+ #
1874
+ #
1875
+ #
1876
+ # [1]: https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html
1877
+ #
1878
+ # @option params [required, String] :event
1879
+ # The event, in JSON format, to test against the event pattern.
1880
+ #
1881
+ # @return [Types::TestEventPatternResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1882
+ #
1883
+ # * {Types::TestEventPatternResponse#result #result} => Boolean
1884
+ #
1885
+ # @example Request syntax with placeholder values
1886
+ #
1887
+ # resp = client.test_event_pattern({
1888
+ # event_pattern: "EventPattern", # required
1889
+ # event: "String", # required
1890
+ # })
1891
+ #
1892
+ # @example Response structure
1893
+ #
1894
+ # resp.result #=> Boolean
1895
+ #
1896
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/TestEventPattern AWS API Documentation
1897
+ #
1898
+ # @overload test_event_pattern(params = {})
1899
+ # @param [Hash] params ({})
1900
+ def test_event_pattern(params = {}, options = {})
1901
+ req = build_request(:test_event_pattern, params)
1902
+ req.send_request(options)
1903
+ end
1904
+
1905
+ # Removes one or more tags from the specified EventBridge resource. In
1906
+ # EventBridge, rules can be tagged.
1907
+ #
1908
+ # @option params [required, String] :resource_arn
1909
+ # The ARN of the rule that you're removing tags from.
1910
+ #
1911
+ # @option params [required, Array<String>] :tag_keys
1912
+ # The list of tag keys to remove from the resource.
1913
+ #
1914
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1915
+ #
1916
+ # @example Request syntax with placeholder values
1917
+ #
1918
+ # resp = client.untag_resource({
1919
+ # resource_arn: "Arn", # required
1920
+ # tag_keys: ["TagKey"], # required
1921
+ # })
1922
+ #
1923
+ # @see http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/UntagResource AWS API Documentation
1924
+ #
1925
+ # @overload untag_resource(params = {})
1926
+ # @param [Hash] params ({})
1927
+ def untag_resource(params = {}, options = {})
1928
+ req = build_request(:untag_resource, params)
1929
+ req.send_request(options)
1930
+ end
1931
+
1932
+ # @!endgroup
1933
+
1934
+ # @param params ({})
1935
+ # @api private
1936
+ def build_request(operation_name, params = {})
1937
+ handlers = @handlers.for(operation_name)
1938
+ context = Seahorse::Client::RequestContext.new(
1939
+ operation_name: operation_name,
1940
+ operation: config.api.operation(operation_name),
1941
+ client: self,
1942
+ params: params,
1943
+ config: config)
1944
+ context[:gem_name] = 'aws-sdk-eventbridge'
1945
+ context[:gem_version] = '1.0.0'
1946
+ Seahorse::Client::Request.new(handlers, context)
1947
+ end
1948
+
1949
+ # @api private
1950
+ # @deprecated
1951
+ def waiter_names
1952
+ []
1953
+ end
1954
+
1955
+ class << self
1956
+
1957
+ # @api private
1958
+ attr_reader :identifier
1959
+
1960
+ # @api private
1961
+ def errors_module
1962
+ Errors
1963
+ end
1964
+
1965
+ end
1966
+ end
1967
+ end