aws-sdk-iotdataplane 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/aws-sdk-iotdataplane.rb +47 -0
- data/lib/aws-sdk-iotdataplane/client.rb +285 -0
- data/lib/aws-sdk-iotdataplane/client_api.rb +151 -0
- data/lib/aws-sdk-iotdataplane/customizations.rb +7 -0
- data/lib/aws-sdk-iotdataplane/errors.rb +23 -0
- data/lib/aws-sdk-iotdataplane/resource.rb +25 -0
- data/lib/aws-sdk-iotdataplane/types.rb +119 -0
- metadata +80 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7da0df9d9e24baf6b3163fd493704fa20a991d5a
|
4
|
+
data.tar.gz: e313f94d7f23c92fac4247d9ef475036523ed87a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cdcbab9cd4575761a4de470a313dcbabc170dd03a9776b172375445585545b261aabc05b48704b2f092810edfd58878ac57fdfade908887b53d73ea486223c93
|
7
|
+
data.tar.gz: 1b4588ec771aef620f7e497c0b7d9d1f16e8feedfe7ec0f82582077b9fdc3221bdf6a1b7c5ca74a91a5cc2c279bd2e44aa9f19d8c8d57e3afb4f1782480c5c22
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'aws-sdk-core'
|
9
|
+
require 'aws-sigv4'
|
10
|
+
|
11
|
+
require_relative 'aws-sdk-iotdataplane/types'
|
12
|
+
require_relative 'aws-sdk-iotdataplane/client_api'
|
13
|
+
require_relative 'aws-sdk-iotdataplane/client'
|
14
|
+
require_relative 'aws-sdk-iotdataplane/errors'
|
15
|
+
require_relative 'aws-sdk-iotdataplane/resource'
|
16
|
+
require_relative 'aws-sdk-iotdataplane/customizations'
|
17
|
+
|
18
|
+
# This module provides support for AWS IoT Data Plane. This module is available in the
|
19
|
+
# `aws-sdk-iotdataplane` 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 Data Plane all
|
32
|
+
# extend {Errors::ServiceError}.
|
33
|
+
#
|
34
|
+
# begin
|
35
|
+
# # do stuff
|
36
|
+
# rescue Aws::IoTDataPlane::Errors::ServiceError
|
37
|
+
# # rescues all service API errors
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# See {Errors} for more information.
|
41
|
+
#
|
42
|
+
# @service
|
43
|
+
module Aws::IoTDataPlane
|
44
|
+
|
45
|
+
GEM_VERSION = '1.0.0.rc1'
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,285 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'seahorse/client/plugins/content_length.rb'
|
9
|
+
require 'aws-sdk-core/plugins/credentials_configuration.rb'
|
10
|
+
require 'aws-sdk-core/plugins/logging.rb'
|
11
|
+
require 'aws-sdk-core/plugins/param_converter.rb'
|
12
|
+
require 'aws-sdk-core/plugins/param_validator.rb'
|
13
|
+
require 'aws-sdk-core/plugins/user_agent.rb'
|
14
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
15
|
+
require 'aws-sdk-core/plugins/retry_errors.rb'
|
16
|
+
require 'aws-sdk-core/plugins/global_configuration.rb'
|
17
|
+
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
18
|
+
require 'aws-sdk-core/plugins/response_paging.rb'
|
19
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
20
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
21
|
+
require 'aws-sdk-core/plugins/signature_v4.rb'
|
22
|
+
require 'aws-sdk-core/plugins/protocols/rest_json.rb'
|
23
|
+
|
24
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:iotdataplane)
|
25
|
+
|
26
|
+
module Aws
|
27
|
+
module IoTDataPlane
|
28
|
+
class Client < Seahorse::Client::Base
|
29
|
+
|
30
|
+
include Aws::ClientStubs
|
31
|
+
|
32
|
+
@identifier = :iotdataplane
|
33
|
+
|
34
|
+
set_api(ClientApi::API)
|
35
|
+
|
36
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
37
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
38
|
+
add_plugin(Aws::Plugins::Logging)
|
39
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
40
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
41
|
+
add_plugin(Aws::Plugins::UserAgent)
|
42
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
43
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
44
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
45
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
46
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
47
|
+
add_plugin(Aws::Plugins::StubResponses)
|
48
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
49
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
50
|
+
add_plugin(Aws::Plugins::Protocols::RestJson)
|
51
|
+
|
52
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
53
|
+
# Your AWS credentials. This can be an instance of any one of the
|
54
|
+
# following classes:
|
55
|
+
#
|
56
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
57
|
+
# credentials.
|
58
|
+
#
|
59
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
60
|
+
# from an EC2 IMDS on an EC2 instance.
|
61
|
+
#
|
62
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
63
|
+
# shared file, such as `~/.aws/config`.
|
64
|
+
#
|
65
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
66
|
+
#
|
67
|
+
# When `:credentials` are not configured directly, the following
|
68
|
+
# locations will be searched for credentials:
|
69
|
+
#
|
70
|
+
# * `Aws.config[:credentials]`
|
71
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
72
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
73
|
+
# * `~/.aws/credentials`
|
74
|
+
# * `~/.aws/config`
|
75
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
76
|
+
# very aggressive. Construct and pass an instance of
|
77
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
78
|
+
# timeouts.
|
79
|
+
# @option options [required, String] :region
|
80
|
+
# The AWS region to connect to. The configured `:region` is
|
81
|
+
# used to determine the service `:endpoint`. When not passed,
|
82
|
+
# a default `:region` is search for in the following locations:
|
83
|
+
#
|
84
|
+
# * `Aws.config[:region]`
|
85
|
+
# * `ENV['AWS_REGION']`
|
86
|
+
# * `ENV['AMAZON_REGION']`
|
87
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
88
|
+
# * `~/.aws/credentials`
|
89
|
+
# * `~/.aws/config`
|
90
|
+
# @option options [String] :access_key_id
|
91
|
+
# @option options [Boolean] :convert_params (true)
|
92
|
+
# When `true`, an attempt is made to coerce request parameters into
|
93
|
+
# the required types.
|
94
|
+
# @option options [String] :endpoint
|
95
|
+
# The client endpoint is normally constructed from the `:region`
|
96
|
+
# option. You should only configure an `:endpoint` when connecting
|
97
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
98
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
99
|
+
# The log formatter.
|
100
|
+
# @option options [Symbol] :log_level (:info)
|
101
|
+
# The log level to send messages to the `:logger` at.
|
102
|
+
# @option options [Logger] :logger
|
103
|
+
# The Logger instance to send log messages to. If this option
|
104
|
+
# is not set, logging will be disabled.
|
105
|
+
# @option options [String] :profile ("default")
|
106
|
+
# Used when loading credentials from the shared credentials file
|
107
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
108
|
+
# @option options [Integer] :retry_limit (3)
|
109
|
+
# The maximum number of times to retry failed requests. Only
|
110
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
111
|
+
# are retried. Generally, these are throttling errors, data
|
112
|
+
# checksum errors, networking errors, timeout errors and auth
|
113
|
+
# errors from expired credentials.
|
114
|
+
# @option options [String] :secret_access_key
|
115
|
+
# @option options [String] :session_token
|
116
|
+
# @option options [Boolean] :stub_responses (false)
|
117
|
+
# Causes the client to return stubbed responses. By default
|
118
|
+
# fake responses are generated and returned. You can specify
|
119
|
+
# the response data to return or errors to raise by calling
|
120
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
121
|
+
#
|
122
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
123
|
+
# requests are made, and retries are disabled.
|
124
|
+
# @option options [Boolean] :validate_params (true)
|
125
|
+
# When `true`, request parameters are validated before
|
126
|
+
# sending the request.
|
127
|
+
def initialize(*args)
|
128
|
+
super
|
129
|
+
end
|
130
|
+
|
131
|
+
# @!group API Operations
|
132
|
+
|
133
|
+
# Deletes the thing shadow for the specified thing.
|
134
|
+
#
|
135
|
+
# For more information, see [DeleteThingShadow][1] in the *AWS IoT
|
136
|
+
# Developer Guide*.
|
137
|
+
#
|
138
|
+
#
|
139
|
+
#
|
140
|
+
# [1]: http://docs.aws.amazon.com/iot/latest/developerguide/API_DeleteThingShadow.html
|
141
|
+
# @option params [required, String] :thing_name
|
142
|
+
# The name of the thing.
|
143
|
+
# @return [Types::DeleteThingShadowResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
144
|
+
#
|
145
|
+
# * {Types::DeleteThingShadowResponse#payload #payload} => String
|
146
|
+
#
|
147
|
+
# @example Request syntax with placeholder values
|
148
|
+
# resp = client.delete_thing_shadow({
|
149
|
+
# thing_name: "ThingName", # required
|
150
|
+
# })
|
151
|
+
#
|
152
|
+
# @example Response structure
|
153
|
+
# resp.payload #=> String
|
154
|
+
# @overload delete_thing_shadow(params = {})
|
155
|
+
# @param [Hash] params ({})
|
156
|
+
def delete_thing_shadow(params = {}, options = {})
|
157
|
+
req = build_request(:delete_thing_shadow, params)
|
158
|
+
req.send_request(options)
|
159
|
+
end
|
160
|
+
|
161
|
+
# Gets the thing shadow for the specified thing.
|
162
|
+
#
|
163
|
+
# For more information, see [GetThingShadow][1] in the *AWS IoT
|
164
|
+
# Developer Guide*.
|
165
|
+
#
|
166
|
+
#
|
167
|
+
#
|
168
|
+
# [1]: http://docs.aws.amazon.com/iot/latest/developerguide/API_GetThingShadow.html
|
169
|
+
# @option params [required, String] :thing_name
|
170
|
+
# The name of the thing.
|
171
|
+
# @return [Types::GetThingShadowResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
172
|
+
#
|
173
|
+
# * {Types::GetThingShadowResponse#payload #payload} => String
|
174
|
+
#
|
175
|
+
# @example Request syntax with placeholder values
|
176
|
+
# resp = client.get_thing_shadow({
|
177
|
+
# thing_name: "ThingName", # required
|
178
|
+
# })
|
179
|
+
#
|
180
|
+
# @example Response structure
|
181
|
+
# resp.payload #=> String
|
182
|
+
# @overload get_thing_shadow(params = {})
|
183
|
+
# @param [Hash] params ({})
|
184
|
+
def get_thing_shadow(params = {}, options = {})
|
185
|
+
req = build_request(:get_thing_shadow, params)
|
186
|
+
req.send_request(options)
|
187
|
+
end
|
188
|
+
|
189
|
+
# Publishes state information.
|
190
|
+
#
|
191
|
+
# For more information, see [HTTP Protocol][1] in the *AWS IoT Developer
|
192
|
+
# Guide*.
|
193
|
+
#
|
194
|
+
#
|
195
|
+
#
|
196
|
+
# [1]: http://docs.aws.amazon.com/iot/latest/developerguide/protocols.html#http
|
197
|
+
# @option params [required, String] :topic
|
198
|
+
# The name of the MQTT topic.
|
199
|
+
# @option params [Integer] :qos
|
200
|
+
# The Quality of Service (QoS) level.
|
201
|
+
# @option params [String, IO] :payload
|
202
|
+
# The state information, in JSON format.
|
203
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
204
|
+
#
|
205
|
+
# @example Request syntax with placeholder values
|
206
|
+
# resp = client.publish({
|
207
|
+
# topic: "Topic", # required
|
208
|
+
# qos: 1,
|
209
|
+
# payload: "data",
|
210
|
+
# })
|
211
|
+
# @overload publish(params = {})
|
212
|
+
# @param [Hash] params ({})
|
213
|
+
def publish(params = {}, options = {})
|
214
|
+
req = build_request(:publish, params)
|
215
|
+
req.send_request(options)
|
216
|
+
end
|
217
|
+
|
218
|
+
# Updates the thing shadow for the specified thing.
|
219
|
+
#
|
220
|
+
# For more information, see [UpdateThingShadow][1] in the *AWS IoT
|
221
|
+
# Developer Guide*.
|
222
|
+
#
|
223
|
+
#
|
224
|
+
#
|
225
|
+
# [1]: http://docs.aws.amazon.com/iot/latest/developerguide/API_UpdateThingShadow.html
|
226
|
+
# @option params [required, String] :thing_name
|
227
|
+
# The name of the thing.
|
228
|
+
# @option params [required, String, IO] :payload
|
229
|
+
# The state information, in JSON format.
|
230
|
+
# @return [Types::UpdateThingShadowResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
231
|
+
#
|
232
|
+
# * {Types::UpdateThingShadowResponse#payload #payload} => String
|
233
|
+
#
|
234
|
+
# @example Request syntax with placeholder values
|
235
|
+
# resp = client.update_thing_shadow({
|
236
|
+
# thing_name: "ThingName", # required
|
237
|
+
# payload: "data", # required
|
238
|
+
# })
|
239
|
+
#
|
240
|
+
# @example Response structure
|
241
|
+
# resp.payload #=> String
|
242
|
+
# @overload update_thing_shadow(params = {})
|
243
|
+
# @param [Hash] params ({})
|
244
|
+
def update_thing_shadow(params = {}, options = {})
|
245
|
+
req = build_request(:update_thing_shadow, params)
|
246
|
+
req.send_request(options)
|
247
|
+
end
|
248
|
+
|
249
|
+
# @!endgroup
|
250
|
+
|
251
|
+
# @param params ({})
|
252
|
+
# @api private
|
253
|
+
def build_request(operation_name, params = {})
|
254
|
+
handlers = @handlers.for(operation_name)
|
255
|
+
context = Seahorse::Client::RequestContext.new(
|
256
|
+
operation_name: operation_name,
|
257
|
+
operation: config.api.operation(operation_name),
|
258
|
+
client: self,
|
259
|
+
params: params,
|
260
|
+
config: config)
|
261
|
+
context[:gem_name] = 'aws-sdk-iotdataplane'
|
262
|
+
context[:gem_version] = '1.0.0.rc1'
|
263
|
+
Seahorse::Client::Request.new(handlers, context)
|
264
|
+
end
|
265
|
+
|
266
|
+
# @api private
|
267
|
+
# @deprecated
|
268
|
+
def waiter_names
|
269
|
+
[]
|
270
|
+
end
|
271
|
+
|
272
|
+
class << self
|
273
|
+
|
274
|
+
# @api private
|
275
|
+
attr_reader :identifier
|
276
|
+
|
277
|
+
# @api private
|
278
|
+
def errors_module
|
279
|
+
Errors
|
280
|
+
end
|
281
|
+
|
282
|
+
end
|
283
|
+
end
|
284
|
+
end
|
285
|
+
end
|
@@ -0,0 +1,151 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws
|
9
|
+
module IoTDataPlane
|
10
|
+
# @api private
|
11
|
+
module ClientApi
|
12
|
+
|
13
|
+
include Seahorse::Model
|
14
|
+
|
15
|
+
ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
|
16
|
+
DeleteThingShadowRequest = Shapes::StructureShape.new(name: 'DeleteThingShadowRequest')
|
17
|
+
DeleteThingShadowResponse = Shapes::StructureShape.new(name: 'DeleteThingShadowResponse')
|
18
|
+
ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
|
19
|
+
GetThingShadowRequest = Shapes::StructureShape.new(name: 'GetThingShadowRequest')
|
20
|
+
GetThingShadowResponse = Shapes::StructureShape.new(name: 'GetThingShadowResponse')
|
21
|
+
InternalFailureException = Shapes::StructureShape.new(name: 'InternalFailureException')
|
22
|
+
InvalidRequestException = Shapes::StructureShape.new(name: 'InvalidRequestException')
|
23
|
+
JsonDocument = Shapes::BlobShape.new(name: 'JsonDocument')
|
24
|
+
MethodNotAllowedException = Shapes::StructureShape.new(name: 'MethodNotAllowedException')
|
25
|
+
Payload = Shapes::BlobShape.new(name: 'Payload')
|
26
|
+
PublishRequest = Shapes::StructureShape.new(name: 'PublishRequest')
|
27
|
+
Qos = Shapes::IntegerShape.new(name: 'Qos')
|
28
|
+
RequestEntityTooLargeException = Shapes::StructureShape.new(name: 'RequestEntityTooLargeException')
|
29
|
+
ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
|
30
|
+
ServiceUnavailableException = Shapes::StructureShape.new(name: 'ServiceUnavailableException')
|
31
|
+
ThingName = Shapes::StringShape.new(name: 'ThingName')
|
32
|
+
ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
|
33
|
+
Topic = Shapes::StringShape.new(name: 'Topic')
|
34
|
+
UnauthorizedException = Shapes::StructureShape.new(name: 'UnauthorizedException')
|
35
|
+
UnsupportedDocumentEncodingException = Shapes::StructureShape.new(name: 'UnsupportedDocumentEncodingException')
|
36
|
+
UpdateThingShadowRequest = Shapes::StructureShape.new(name: 'UpdateThingShadowRequest')
|
37
|
+
UpdateThingShadowResponse = Shapes::StructureShape.new(name: 'UpdateThingShadowResponse')
|
38
|
+
errorMessage = Shapes::StringShape.new(name: 'errorMessage')
|
39
|
+
|
40
|
+
DeleteThingShadowRequest.add_member(:thing_name, Shapes::ShapeRef.new(shape: ThingName, required: true, location: "uri", location_name: "thingName"))
|
41
|
+
DeleteThingShadowRequest.struct_class = Types::DeleteThingShadowRequest
|
42
|
+
|
43
|
+
DeleteThingShadowResponse.add_member(:payload, Shapes::ShapeRef.new(shape: JsonDocument, required: true, location_name: "payload"))
|
44
|
+
DeleteThingShadowResponse.struct_class = Types::DeleteThingShadowResponse
|
45
|
+
DeleteThingShadowResponse[:payload] = :payload
|
46
|
+
DeleteThingShadowResponse[:payload_member] = DeleteThingShadowResponse.member(:payload)
|
47
|
+
|
48
|
+
GetThingShadowRequest.add_member(:thing_name, Shapes::ShapeRef.new(shape: ThingName, required: true, location: "uri", location_name: "thingName"))
|
49
|
+
GetThingShadowRequest.struct_class = Types::GetThingShadowRequest
|
50
|
+
|
51
|
+
GetThingShadowResponse.add_member(:payload, Shapes::ShapeRef.new(shape: JsonDocument, location_name: "payload"))
|
52
|
+
GetThingShadowResponse.struct_class = Types::GetThingShadowResponse
|
53
|
+
GetThingShadowResponse[:payload] = :payload
|
54
|
+
GetThingShadowResponse[:payload_member] = GetThingShadowResponse.member(:payload)
|
55
|
+
|
56
|
+
PublishRequest.add_member(:topic, Shapes::ShapeRef.new(shape: Topic, required: true, location: "uri", location_name: "topic"))
|
57
|
+
PublishRequest.add_member(:qos, Shapes::ShapeRef.new(shape: Qos, location: "querystring", location_name: "qos"))
|
58
|
+
PublishRequest.add_member(:payload, Shapes::ShapeRef.new(shape: Payload, location_name: "payload"))
|
59
|
+
PublishRequest.struct_class = Types::PublishRequest
|
60
|
+
PublishRequest[:payload] = :payload
|
61
|
+
PublishRequest[:payload_member] = PublishRequest.member(:payload)
|
62
|
+
|
63
|
+
UpdateThingShadowRequest.add_member(:thing_name, Shapes::ShapeRef.new(shape: ThingName, required: true, location: "uri", location_name: "thingName"))
|
64
|
+
UpdateThingShadowRequest.add_member(:payload, Shapes::ShapeRef.new(shape: JsonDocument, required: true, location_name: "payload"))
|
65
|
+
UpdateThingShadowRequest.struct_class = Types::UpdateThingShadowRequest
|
66
|
+
UpdateThingShadowRequest[:payload] = :payload
|
67
|
+
UpdateThingShadowRequest[:payload_member] = UpdateThingShadowRequest.member(:payload)
|
68
|
+
|
69
|
+
UpdateThingShadowResponse.add_member(:payload, Shapes::ShapeRef.new(shape: JsonDocument, location_name: "payload"))
|
70
|
+
UpdateThingShadowResponse.struct_class = Types::UpdateThingShadowResponse
|
71
|
+
UpdateThingShadowResponse[:payload] = :payload
|
72
|
+
UpdateThingShadowResponse[:payload_member] = UpdateThingShadowResponse.member(:payload)
|
73
|
+
|
74
|
+
|
75
|
+
# @api private
|
76
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
77
|
+
|
78
|
+
api.version = "2015-05-28"
|
79
|
+
|
80
|
+
api.metadata = {
|
81
|
+
"protocol" => "rest-json",
|
82
|
+
"serviceFullName" => "AWS IoT Data Plane",
|
83
|
+
"signatureVersion" => "v4",
|
84
|
+
"signingName" => "iotdata",
|
85
|
+
}
|
86
|
+
|
87
|
+
api.add_operation(:delete_thing_shadow, Seahorse::Model::Operation.new.tap do |o|
|
88
|
+
o.name = "DeleteThingShadow"
|
89
|
+
o.http_method = "DELETE"
|
90
|
+
o.http_request_uri = "/things/{thingName}/shadow"
|
91
|
+
o.input = Shapes::ShapeRef.new(shape: DeleteThingShadowRequest)
|
92
|
+
o.output = Shapes::ShapeRef.new(shape: DeleteThingShadowResponse)
|
93
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
94
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
95
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
96
|
+
o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
|
97
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
|
98
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
|
99
|
+
o.errors << Shapes::ShapeRef.new(shape: MethodNotAllowedException)
|
100
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentEncodingException)
|
101
|
+
end)
|
102
|
+
|
103
|
+
api.add_operation(:get_thing_shadow, Seahorse::Model::Operation.new.tap do |o|
|
104
|
+
o.name = "GetThingShadow"
|
105
|
+
o.http_method = "GET"
|
106
|
+
o.http_request_uri = "/things/{thingName}/shadow"
|
107
|
+
o.input = Shapes::ShapeRef.new(shape: GetThingShadowRequest)
|
108
|
+
o.output = Shapes::ShapeRef.new(shape: GetThingShadowResponse)
|
109
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
110
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
111
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
112
|
+
o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
|
113
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
|
114
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
|
115
|
+
o.errors << Shapes::ShapeRef.new(shape: MethodNotAllowedException)
|
116
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentEncodingException)
|
117
|
+
end)
|
118
|
+
|
119
|
+
api.add_operation(:publish, Seahorse::Model::Operation.new.tap do |o|
|
120
|
+
o.name = "Publish"
|
121
|
+
o.http_method = "POST"
|
122
|
+
o.http_request_uri = "/topics/{topic}"
|
123
|
+
o.input = Shapes::ShapeRef.new(shape: PublishRequest)
|
124
|
+
o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
|
125
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
|
126
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
127
|
+
o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
|
128
|
+
o.errors << Shapes::ShapeRef.new(shape: MethodNotAllowedException)
|
129
|
+
end)
|
130
|
+
|
131
|
+
api.add_operation(:update_thing_shadow, Seahorse::Model::Operation.new.tap do |o|
|
132
|
+
o.name = "UpdateThingShadow"
|
133
|
+
o.http_method = "POST"
|
134
|
+
o.http_request_uri = "/things/{thingName}/shadow"
|
135
|
+
o.input = Shapes::ShapeRef.new(shape: UpdateThingShadowRequest)
|
136
|
+
o.output = Shapes::ShapeRef.new(shape: UpdateThingShadowResponse)
|
137
|
+
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
138
|
+
o.errors << Shapes::ShapeRef.new(shape: RequestEntityTooLargeException)
|
139
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
140
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
141
|
+
o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
|
142
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
|
143
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
|
144
|
+
o.errors << Shapes::ShapeRef.new(shape: MethodNotAllowedException)
|
145
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentEncodingException)
|
146
|
+
end)
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws
|
9
|
+
module IoTDataPlane
|
10
|
+
module Errors
|
11
|
+
|
12
|
+
extend Aws::Errors::DynamicErrors
|
13
|
+
|
14
|
+
# Raised when calling #load or #data on a resource class that can not be
|
15
|
+
# loaded. This can happen when:
|
16
|
+
#
|
17
|
+
# * A resource class has identifiers, but no data attributes.
|
18
|
+
# * Resource data is only available when making an API call that
|
19
|
+
# enumerates all resources of that type.
|
20
|
+
class ResourceNotLoadable < RuntimeError; end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws
|
9
|
+
module IoTDataPlane
|
10
|
+
class Resource
|
11
|
+
|
12
|
+
# @param options ({})
|
13
|
+
# @option options [Client] :client
|
14
|
+
def initialize(options = {})
|
15
|
+
@client = options[:client] || Client.new(options)
|
16
|
+
end
|
17
|
+
|
18
|
+
# @return [Client]
|
19
|
+
def client
|
20
|
+
@client
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws
|
9
|
+
module IoTDataPlane
|
10
|
+
module Types
|
11
|
+
|
12
|
+
# The input for the DeleteThingShadow operation.
|
13
|
+
# @note When making an API call, pass DeleteThingShadowRequest
|
14
|
+
# data as a hash:
|
15
|
+
#
|
16
|
+
# {
|
17
|
+
# thing_name: "ThingName", # required
|
18
|
+
# }
|
19
|
+
# @!attribute [rw] thing_name
|
20
|
+
# The name of the thing.
|
21
|
+
# @return [String]
|
22
|
+
class DeleteThingShadowRequest < Struct.new(
|
23
|
+
:thing_name)
|
24
|
+
include Aws::Structure
|
25
|
+
end
|
26
|
+
|
27
|
+
# The output from the DeleteThingShadow operation.
|
28
|
+
# @!attribute [rw] payload
|
29
|
+
# The state information, in JSON format.
|
30
|
+
# @return [String]
|
31
|
+
class DeleteThingShadowResponse < Struct.new(
|
32
|
+
:payload)
|
33
|
+
include Aws::Structure
|
34
|
+
end
|
35
|
+
|
36
|
+
# The input for the GetThingShadow operation.
|
37
|
+
# @note When making an API call, pass GetThingShadowRequest
|
38
|
+
# data as a hash:
|
39
|
+
#
|
40
|
+
# {
|
41
|
+
# thing_name: "ThingName", # required
|
42
|
+
# }
|
43
|
+
# @!attribute [rw] thing_name
|
44
|
+
# The name of the thing.
|
45
|
+
# @return [String]
|
46
|
+
class GetThingShadowRequest < Struct.new(
|
47
|
+
:thing_name)
|
48
|
+
include Aws::Structure
|
49
|
+
end
|
50
|
+
|
51
|
+
# The output from the GetThingShadow operation.
|
52
|
+
# @!attribute [rw] payload
|
53
|
+
# The state information, in JSON format.
|
54
|
+
# @return [String]
|
55
|
+
class GetThingShadowResponse < Struct.new(
|
56
|
+
:payload)
|
57
|
+
include Aws::Structure
|
58
|
+
end
|
59
|
+
|
60
|
+
# The input for the Publish operation.
|
61
|
+
# @note When making an API call, pass PublishRequest
|
62
|
+
# data as a hash:
|
63
|
+
#
|
64
|
+
# {
|
65
|
+
# topic: "Topic", # required
|
66
|
+
# qos: 1,
|
67
|
+
# payload: "data",
|
68
|
+
# }
|
69
|
+
# @!attribute [rw] topic
|
70
|
+
# The name of the MQTT topic.
|
71
|
+
# @return [String]
|
72
|
+
#
|
73
|
+
# @!attribute [rw] qos
|
74
|
+
# The Quality of Service (QoS) level.
|
75
|
+
# @return [Integer]
|
76
|
+
#
|
77
|
+
# @!attribute [rw] payload
|
78
|
+
# The state information, in JSON format.
|
79
|
+
# @return [String]
|
80
|
+
class PublishRequest < Struct.new(
|
81
|
+
:topic,
|
82
|
+
:qos,
|
83
|
+
:payload)
|
84
|
+
include Aws::Structure
|
85
|
+
end
|
86
|
+
|
87
|
+
# The input for the UpdateThingShadow operation.
|
88
|
+
# @note When making an API call, pass UpdateThingShadowRequest
|
89
|
+
# data as a hash:
|
90
|
+
#
|
91
|
+
# {
|
92
|
+
# thing_name: "ThingName", # required
|
93
|
+
# payload: "data", # required
|
94
|
+
# }
|
95
|
+
# @!attribute [rw] thing_name
|
96
|
+
# The name of the thing.
|
97
|
+
# @return [String]
|
98
|
+
#
|
99
|
+
# @!attribute [rw] payload
|
100
|
+
# The state information, in JSON format.
|
101
|
+
# @return [String]
|
102
|
+
class UpdateThingShadowRequest < Struct.new(
|
103
|
+
:thing_name,
|
104
|
+
:payload)
|
105
|
+
include Aws::Structure
|
106
|
+
end
|
107
|
+
|
108
|
+
# The output from the UpdateThingShadow operation.
|
109
|
+
# @!attribute [rw] payload
|
110
|
+
# The state information, in JSON format.
|
111
|
+
# @return [String]
|
112
|
+
class UpdateThingShadowResponse < Struct.new(
|
113
|
+
:payload)
|
114
|
+
include Aws::Structure
|
115
|
+
end
|
116
|
+
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aws-sdk-iotdataplane
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.rc1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Amazon Web Services
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-12-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aws-sdk-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.0.0.rc1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.0.rc1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: aws-sigv4
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
41
|
+
description: Official AWS Ruby gem for AWS IoT Data Plane. This gem is part of the
|
42
|
+
AWS SDK for Ruby.
|
43
|
+
email:
|
44
|
+
- trevrowe@amazon.com
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- lib/aws-sdk-iotdataplane.rb
|
50
|
+
- lib/aws-sdk-iotdataplane/client.rb
|
51
|
+
- lib/aws-sdk-iotdataplane/client_api.rb
|
52
|
+
- lib/aws-sdk-iotdataplane/customizations.rb
|
53
|
+
- lib/aws-sdk-iotdataplane/errors.rb
|
54
|
+
- lib/aws-sdk-iotdataplane/resource.rb
|
55
|
+
- lib/aws-sdk-iotdataplane/types.rb
|
56
|
+
homepage: http://github.com/aws/aws-sdk-ruby
|
57
|
+
licenses:
|
58
|
+
- Apache-2.0
|
59
|
+
metadata: {}
|
60
|
+
post_install_message:
|
61
|
+
rdoc_options: []
|
62
|
+
require_paths:
|
63
|
+
- lib
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: 1.3.1
|
74
|
+
requirements: []
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 2.5.1
|
77
|
+
signing_key:
|
78
|
+
specification_version: 4
|
79
|
+
summary: AWS SDK for Ruby - AWS IoT Data Plane
|
80
|
+
test_files: []
|