aws-sdk-ioteventsdata 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 323b02aa272190df67c3420bec01ca297776944e
4
+ data.tar.gz: e0b139c46c8b40d16810833ee6b525a973e49d0b
5
+ SHA512:
6
+ metadata.gz: 69d3891638dba3771df3b2cafae635ae1742ec48e109969f1022df8c89fd8b1b8a2a9e5b0d4a6c0b7a12b206b5a6c84d0c9adfbd44c0c56805c6a77fbe6e37d4
7
+ data.tar.gz: e4da7fcad26f51fba00422dbea5c2a31f0a8539be3e699cdd78c85b4177925dff5edddd63511b14067dbfa13cb63c060590486d845035297adc913e9ae580c9f
@@ -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-ioteventsdata/types'
12
+ require_relative 'aws-sdk-ioteventsdata/client_api'
13
+ require_relative 'aws-sdk-ioteventsdata/client'
14
+ require_relative 'aws-sdk-ioteventsdata/errors'
15
+ require_relative 'aws-sdk-ioteventsdata/resource'
16
+ require_relative 'aws-sdk-ioteventsdata/customizations'
17
+
18
+ # This module provides support for AWS IoT Events Data. This module is available in the
19
+ # `aws-sdk-ioteventsdata` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from AWS IoT Events Data all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::IoTEventsData::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::IoTEventsData
44
+
45
+ GEM_VERSION = '1.0.0'
46
+
47
+ end
@@ -0,0 +1,471 @@
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/rest_json.rb'
29
+
30
+ Aws::Plugins::GlobalConfiguration.add_identifier(:ioteventsdata)
31
+
32
+ module Aws::IoTEventsData
33
+ class Client < Seahorse::Client::Base
34
+
35
+ include Aws::ClientStubs
36
+
37
+ @identifier = :ioteventsdata
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::RestJson)
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 [Integer] :client_side_monitoring_port (31000)
120
+ # Required for publishing client metrics. The port that the client side monitoring
121
+ # agent is running on, where client metrics will be published via UDP.
122
+ #
123
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
124
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
125
+ # will use the Client Side Monitoring Agent Publisher.
126
+ #
127
+ # @option options [Boolean] :convert_params (true)
128
+ # When `true`, an attempt is made to coerce request parameters into
129
+ # the required types.
130
+ #
131
+ # @option options [Boolean] :disable_host_prefix_injection (false)
132
+ # Set to true to disable SDK automatically adding host prefix
133
+ # to default service endpoint when available.
134
+ #
135
+ # @option options [String] :endpoint
136
+ # The client endpoint is normally constructed from the `:region`
137
+ # option. You should only configure an `:endpoint` when connecting
138
+ # to test endpoints. This should be avalid HTTP(S) URI.
139
+ #
140
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
141
+ # Used for the maximum size limit of the LRU cache storing endpoints data
142
+ # for endpoint discovery enabled operations. Defaults to 1000.
143
+ #
144
+ # @option options [Integer] :endpoint_cache_max_threads (10)
145
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
146
+ #
147
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
148
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
149
+ # Use this option to config the time interval in seconds for making
150
+ # requests fetching endpoints information. Defaults to 60 sec.
151
+ #
152
+ # @option options [Boolean] :endpoint_discovery (false)
153
+ # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
154
+ #
155
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
156
+ # The log formatter.
157
+ #
158
+ # @option options [Symbol] :log_level (:info)
159
+ # The log level to send messages to the `:logger` at.
160
+ #
161
+ # @option options [Logger] :logger
162
+ # The Logger instance to send log messages to. If this option
163
+ # is not set, logging will be disabled.
164
+ #
165
+ # @option options [String] :profile ("default")
166
+ # Used when loading credentials from the shared credentials file
167
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
168
+ #
169
+ # @option options [Float] :retry_base_delay (0.3)
170
+ # The base delay in seconds used by the default backoff function.
171
+ #
172
+ # @option options [Symbol] :retry_jitter (:none)
173
+ # 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.
174
+ #
175
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
176
+ #
177
+ # @option options [Integer] :retry_limit (3)
178
+ # The maximum number of times to retry failed requests. Only
179
+ # ~ 500 level server errors and certain ~ 400 level client errors
180
+ # are retried. Generally, these are throttling errors, data
181
+ # checksum errors, networking errors, timeout errors and auth
182
+ # errors from expired credentials.
183
+ #
184
+ # @option options [Integer] :retry_max_delay (0)
185
+ # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
186
+ #
187
+ # @option options [String] :secret_access_key
188
+ #
189
+ # @option options [String] :session_token
190
+ #
191
+ # @option options [Boolean] :stub_responses (false)
192
+ # Causes the client to return stubbed responses. By default
193
+ # fake responses are generated and returned. You can specify
194
+ # the response data to return or errors to raise by calling
195
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
196
+ #
197
+ # ** Please note ** When response stubbing is enabled, no HTTP
198
+ # requests are made, and retries are disabled.
199
+ #
200
+ # @option options [Boolean] :validate_params (true)
201
+ # When `true`, request parameters are validated before
202
+ # sending the request.
203
+ #
204
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
205
+ # requests through. Formatted like 'http://proxy.com:123'.
206
+ #
207
+ # @option options [Float] :http_open_timeout (15) The number of
208
+ # seconds to wait when opening a HTTP session before rasing a
209
+ # `Timeout::Error`.
210
+ #
211
+ # @option options [Integer] :http_read_timeout (60) The default
212
+ # number of seconds to wait for response data. This value can
213
+ # safely be set
214
+ # per-request on the session yeidled by {#session_for}.
215
+ #
216
+ # @option options [Float] :http_idle_timeout (5) The number of
217
+ # seconds a connection is allowed to sit idble before it is
218
+ # considered stale. Stale connections are closed and removed
219
+ # from the pool before making a request.
220
+ #
221
+ # @option options [Float] :http_continue_timeout (1) The number of
222
+ # seconds to wait for a 100-continue response before sending the
223
+ # request body. This option has no effect unless the request has
224
+ # "Expect" header set to "100-continue". Defaults to `nil` which
225
+ # disables this behaviour. This value can safely be set per
226
+ # request on the session yeidled by {#session_for}.
227
+ #
228
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
229
+ # HTTP debug output will be sent to the `:logger`.
230
+ #
231
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
232
+ # SSL peer certificates are verified when establishing a
233
+ # connection.
234
+ #
235
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
236
+ # certificate authority bundle file that should be used when
237
+ # verifying peer certificates. If you do not pass
238
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
239
+ # will be used if available.
240
+ #
241
+ # @option options [String] :ssl_ca_directory Full path of the
242
+ # directory that contains the unbundled SSL certificate
243
+ # authority files for verifying peer certificates. If you do
244
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
245
+ # system default will be used if available.
246
+ #
247
+ def initialize(*args)
248
+ super
249
+ end
250
+
251
+ # @!group API Operations
252
+
253
+ # Sends a set of messages to the AWS IoT Events system. Each message
254
+ # payload will be transformed into the input you specify (`inputName`)
255
+ # and ingested into any detectors that monitor that input. If multiple
256
+ # messages are sent, the order in which the messages are processed is
257
+ # not guaranteed--you must send messages one at a time and wait for a
258
+ # successful response to guarantee ordering.
259
+ #
260
+ # @option params [required, Array<Types::Message>] :messages
261
+ # The list of messages to send. Each message has format: `'\{
262
+ # "messageId": "string", "inputName": "string", "payload": "string"\}'`.
263
+ #
264
+ # @return [Types::BatchPutMessageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
265
+ #
266
+ # * {Types::BatchPutMessageResponse#batch_put_message_error_entries #batch_put_message_error_entries} => Array&lt;Types::BatchPutMessageErrorEntry&gt;
267
+ #
268
+ # @example Request syntax with placeholder values
269
+ #
270
+ # resp = client.batch_put_message({
271
+ # messages: [ # required
272
+ # {
273
+ # message_id: "MessageId", # required
274
+ # input_name: "InputName", # required
275
+ # payload: "data", # required
276
+ # },
277
+ # ],
278
+ # })
279
+ #
280
+ # @example Response structure
281
+ #
282
+ # resp.batch_put_message_error_entries #=> Array
283
+ # resp.batch_put_message_error_entries[0].message_id #=> String
284
+ # resp.batch_put_message_error_entries[0].error_code #=> String, one of "ResourceNotFoundException", "InvalidRequestException", "InternalFailureException", "ServiceUnavailableException", "ThrottlingException"
285
+ # resp.batch_put_message_error_entries[0].error_message #=> String
286
+ #
287
+ # @overload batch_put_message(params = {})
288
+ # @param [Hash] params ({})
289
+ def batch_put_message(params = {}, options = {})
290
+ req = build_request(:batch_put_message, params)
291
+ req.send_request(options)
292
+ end
293
+
294
+ # Updates the state, variable values, and timer settings of one or more
295
+ # detectors (instances) of a specified detector model.
296
+ #
297
+ # @option params [required, Array<Types::UpdateDetectorRequest>] :detectors
298
+ # The list of detectors (instances) to be updated, along with the values
299
+ # to be updated.
300
+ #
301
+ # @return [Types::BatchUpdateDetectorResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
302
+ #
303
+ # * {Types::BatchUpdateDetectorResponse#batch_update_detector_error_entries #batch_update_detector_error_entries} => Array&lt;Types::BatchUpdateDetectorErrorEntry&gt;
304
+ #
305
+ # @example Request syntax with placeholder values
306
+ #
307
+ # resp = client.batch_update_detector({
308
+ # detectors: [ # required
309
+ # {
310
+ # message_id: "MessageId", # required
311
+ # detector_model_name: "DetectorModelName", # required
312
+ # key_value: "KeyValue",
313
+ # state: { # required
314
+ # state_name: "StateName", # required
315
+ # variables: [ # required
316
+ # {
317
+ # name: "VariableName", # required
318
+ # value: "VariableValue", # required
319
+ # },
320
+ # ],
321
+ # timers: [ # required
322
+ # {
323
+ # name: "TimerName", # required
324
+ # seconds: 1, # required
325
+ # },
326
+ # ],
327
+ # },
328
+ # },
329
+ # ],
330
+ # })
331
+ #
332
+ # @example Response structure
333
+ #
334
+ # resp.batch_update_detector_error_entries #=> Array
335
+ # resp.batch_update_detector_error_entries[0].message_id #=> String
336
+ # resp.batch_update_detector_error_entries[0].error_code #=> String, one of "ResourceNotFoundException", "InvalidRequestException", "InternalFailureException", "ServiceUnavailableException", "ThrottlingException"
337
+ # resp.batch_update_detector_error_entries[0].error_message #=> String
338
+ #
339
+ # @overload batch_update_detector(params = {})
340
+ # @param [Hash] params ({})
341
+ def batch_update_detector(params = {}, options = {})
342
+ req = build_request(:batch_update_detector, params)
343
+ req.send_request(options)
344
+ end
345
+
346
+ # Returns information about the specified detector (instance).
347
+ #
348
+ # @option params [required, String] :detector_model_name
349
+ # The name of the detector model whose detectors (instances) you want
350
+ # information about.
351
+ #
352
+ # @option params [String] :key_value
353
+ # A filter used to limit results to detectors (instances) created
354
+ # because of the given key ID.
355
+ #
356
+ # @return [Types::DescribeDetectorResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
357
+ #
358
+ # * {Types::DescribeDetectorResponse#detector #detector} => Types::Detector
359
+ #
360
+ # @example Request syntax with placeholder values
361
+ #
362
+ # resp = client.describe_detector({
363
+ # detector_model_name: "DetectorModelName", # required
364
+ # key_value: "KeyValue",
365
+ # })
366
+ #
367
+ # @example Response structure
368
+ #
369
+ # resp.detector.detector_model_name #=> String
370
+ # resp.detector.key_value #=> String
371
+ # resp.detector.detector_model_version #=> String
372
+ # resp.detector.state.state_name #=> String
373
+ # resp.detector.state.variables #=> Array
374
+ # resp.detector.state.variables[0].name #=> String
375
+ # resp.detector.state.variables[0].value #=> String
376
+ # resp.detector.state.timers #=> Array
377
+ # resp.detector.state.timers[0].name #=> String
378
+ # resp.detector.state.timers[0].timestamp #=> Time
379
+ # resp.detector.creation_time #=> Time
380
+ # resp.detector.last_update_time #=> Time
381
+ #
382
+ # @overload describe_detector(params = {})
383
+ # @param [Hash] params ({})
384
+ def describe_detector(params = {}, options = {})
385
+ req = build_request(:describe_detector, params)
386
+ req.send_request(options)
387
+ end
388
+
389
+ # Lists detectors (the instances of a detector model).
390
+ #
391
+ # @option params [required, String] :detector_model_name
392
+ # The name of the detector model whose instances you want to list.
393
+ #
394
+ # @option params [String] :state_name
395
+ # A filter that limits results to those detectors (instances) in the
396
+ # given state.
397
+ #
398
+ # @option params [String] :next_token
399
+ # The token for the next set of results.
400
+ #
401
+ # @option params [Integer] :max_results
402
+ # The maximum number of results to return at one time.
403
+ #
404
+ # @return [Types::ListDetectorsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
405
+ #
406
+ # * {Types::ListDetectorsResponse#detector_summaries #detector_summaries} => Array&lt;Types::DetectorSummary&gt;
407
+ # * {Types::ListDetectorsResponse#next_token #next_token} => String
408
+ #
409
+ # @example Request syntax with placeholder values
410
+ #
411
+ # resp = client.list_detectors({
412
+ # detector_model_name: "DetectorModelName", # required
413
+ # state_name: "StateName",
414
+ # next_token: "NextToken",
415
+ # max_results: 1,
416
+ # })
417
+ #
418
+ # @example Response structure
419
+ #
420
+ # resp.detector_summaries #=> Array
421
+ # resp.detector_summaries[0].detector_model_name #=> String
422
+ # resp.detector_summaries[0].key_value #=> String
423
+ # resp.detector_summaries[0].detector_model_version #=> String
424
+ # resp.detector_summaries[0].state.state_name #=> String
425
+ # resp.detector_summaries[0].creation_time #=> Time
426
+ # resp.detector_summaries[0].last_update_time #=> Time
427
+ # resp.next_token #=> String
428
+ #
429
+ # @overload list_detectors(params = {})
430
+ # @param [Hash] params ({})
431
+ def list_detectors(params = {}, options = {})
432
+ req = build_request(:list_detectors, params)
433
+ req.send_request(options)
434
+ end
435
+
436
+ # @!endgroup
437
+
438
+ # @param params ({})
439
+ # @api private
440
+ def build_request(operation_name, params = {})
441
+ handlers = @handlers.for(operation_name)
442
+ context = Seahorse::Client::RequestContext.new(
443
+ operation_name: operation_name,
444
+ operation: config.api.operation(operation_name),
445
+ client: self,
446
+ params: params,
447
+ config: config)
448
+ context[:gem_name] = 'aws-sdk-ioteventsdata'
449
+ context[:gem_version] = '1.0.0'
450
+ Seahorse::Client::Request.new(handlers, context)
451
+ end
452
+
453
+ # @api private
454
+ # @deprecated
455
+ def waiter_names
456
+ []
457
+ end
458
+
459
+ class << self
460
+
461
+ # @api private
462
+ attr_reader :identifier
463
+
464
+ # @api private
465
+ def errors_module
466
+ Errors
467
+ end
468
+
469
+ end
470
+ end
471
+ end