@aws-sdk/client-iot-data-plane 3.35.0 → 3.38.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.
Files changed (130) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist-cjs/IoTDataPlane.js +0 -14
  3. package/dist-cjs/IoTDataPlaneClient.js +0 -19
  4. package/dist-cjs/commands/DeleteThingShadowCommand.js +0 -27
  5. package/dist-cjs/commands/GetRetainedMessageCommand.js +0 -31
  6. package/dist-cjs/commands/GetThingShadowCommand.js +0 -28
  7. package/dist-cjs/commands/ListNamedShadowsForThingCommand.js +0 -26
  8. package/dist-cjs/commands/ListRetainedMessagesCommand.js +0 -34
  9. package/dist-cjs/commands/PublishCommand.js +0 -31
  10. package/dist-cjs/commands/UpdateThingShadowCommand.js +0 -28
  11. package/dist-cjs/commands/index.js +10 -0
  12. package/dist-cjs/endpoints.js +1 -2
  13. package/dist-cjs/index.js +4 -12
  14. package/dist-cjs/models/index.js +0 -1
  15. package/dist-cjs/models/models_0.js +0 -73
  16. package/dist-cjs/pagination/Interfaces.js +0 -1
  17. package/dist-cjs/pagination/ListRetainedMessagesPaginator.js +0 -11
  18. package/dist-cjs/pagination/index.js +5 -0
  19. package/dist-cjs/protocols/Aws_restJson1.js +0 -6
  20. package/dist-cjs/runtimeConfig.browser.js +1 -6
  21. package/dist-cjs/runtimeConfig.js +2 -7
  22. package/dist-cjs/runtimeConfig.native.js +0 -4
  23. package/dist-cjs/runtimeConfig.shared.js +0 -4
  24. package/dist-es/IoTDataPlane.js +0 -1
  25. package/dist-es/IoTDataPlaneClient.js +0 -1
  26. package/dist-es/commands/DeleteThingShadowCommand.js +0 -1
  27. package/dist-es/commands/GetRetainedMessageCommand.js +0 -1
  28. package/dist-es/commands/GetThingShadowCommand.js +0 -1
  29. package/dist-es/commands/ListNamedShadowsForThingCommand.js +0 -1
  30. package/dist-es/commands/ListRetainedMessagesCommand.js +0 -1
  31. package/dist-es/commands/PublishCommand.js +0 -1
  32. package/dist-es/commands/UpdateThingShadowCommand.js +0 -1
  33. package/dist-es/commands/index.js +7 -0
  34. package/dist-es/endpoints.js +1 -2
  35. package/dist-es/index.js +4 -12
  36. package/dist-es/models/index.js +0 -1
  37. package/dist-es/models/models_0.js +0 -1
  38. package/dist-es/pagination/Interfaces.js +0 -1
  39. package/dist-es/pagination/ListRetainedMessagesPaginator.js +0 -1
  40. package/dist-es/pagination/index.js +2 -0
  41. package/dist-es/protocols/Aws_restJson1.js +0 -1
  42. package/dist-es/runtimeConfig.browser.js +1 -2
  43. package/dist-es/runtimeConfig.js +2 -3
  44. package/dist-es/runtimeConfig.native.js +0 -1
  45. package/dist-es/runtimeConfig.shared.js +0 -1
  46. package/dist-types/commands/index.d.ts +7 -0
  47. package/dist-types/index.d.ts +4 -11
  48. package/dist-types/pagination/index.d.ts +2 -0
  49. package/dist-types/ts3.4/IoTDataPlane.d.ts +8 -64
  50. package/dist-types/ts3.4/IoTDataPlaneClient.d.ts +24 -99
  51. package/dist-types/ts3.4/commands/DeleteThingShadowCommand.d.ts +2 -22
  52. package/dist-types/ts3.4/commands/GetRetainedMessageCommand.d.ts +2 -26
  53. package/dist-types/ts3.4/commands/GetThingShadowCommand.d.ts +2 -23
  54. package/dist-types/ts3.4/commands/ListNamedShadowsForThingCommand.d.ts +2 -21
  55. package/dist-types/ts3.4/commands/ListRetainedMessagesCommand.d.ts +2 -29
  56. package/dist-types/ts3.4/commands/PublishCommand.d.ts +2 -26
  57. package/dist-types/ts3.4/commands/UpdateThingShadowCommand.d.ts +2 -23
  58. package/dist-types/ts3.4/commands/index.d.ts +7 -0
  59. package/dist-types/ts3.4/index.d.ts +4 -11
  60. package/dist-types/ts3.4/models/models_0.d.ts +87 -271
  61. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  62. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  63. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  64. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  65. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  66. package/package.json +33 -30
  67. package/dist-cjs/IoTDataPlane.js.map +0 -1
  68. package/dist-cjs/IoTDataPlaneClient.js.map +0 -1
  69. package/dist-cjs/commands/DeleteThingShadowCommand.js.map +0 -1
  70. package/dist-cjs/commands/GetRetainedMessageCommand.js.map +0 -1
  71. package/dist-cjs/commands/GetThingShadowCommand.js.map +0 -1
  72. package/dist-cjs/commands/ListNamedShadowsForThingCommand.js.map +0 -1
  73. package/dist-cjs/commands/ListRetainedMessagesCommand.js.map +0 -1
  74. package/dist-cjs/commands/PublishCommand.js.map +0 -1
  75. package/dist-cjs/commands/UpdateThingShadowCommand.js.map +0 -1
  76. package/dist-cjs/endpoints.js.map +0 -1
  77. package/dist-cjs/index.js.map +0 -1
  78. package/dist-cjs/models/index.js.map +0 -1
  79. package/dist-cjs/models/models_0.js.map +0 -1
  80. package/dist-cjs/pagination/Interfaces.js.map +0 -1
  81. package/dist-cjs/pagination/ListRetainedMessagesPaginator.js.map +0 -1
  82. package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
  83. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  84. package/dist-cjs/runtimeConfig.js.map +0 -1
  85. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  86. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  87. package/dist-es/IoTDataPlane.js.map +0 -1
  88. package/dist-es/IoTDataPlaneClient.js.map +0 -1
  89. package/dist-es/commands/DeleteThingShadowCommand.js.map +0 -1
  90. package/dist-es/commands/GetRetainedMessageCommand.js.map +0 -1
  91. package/dist-es/commands/GetThingShadowCommand.js.map +0 -1
  92. package/dist-es/commands/ListNamedShadowsForThingCommand.js.map +0 -1
  93. package/dist-es/commands/ListRetainedMessagesCommand.js.map +0 -1
  94. package/dist-es/commands/PublishCommand.js.map +0 -1
  95. package/dist-es/commands/UpdateThingShadowCommand.js.map +0 -1
  96. package/dist-es/endpoints.js.map +0 -1
  97. package/dist-es/index.js.map +0 -1
  98. package/dist-es/models/index.js.map +0 -1
  99. package/dist-es/models/models_0.js.map +0 -1
  100. package/dist-es/pagination/Interfaces.js.map +0 -1
  101. package/dist-es/pagination/ListRetainedMessagesPaginator.js.map +0 -1
  102. package/dist-es/protocols/Aws_restJson1.js.map +0 -1
  103. package/dist-es/runtimeConfig.browser.js.map +0 -1
  104. package/dist-es/runtimeConfig.js.map +0 -1
  105. package/dist-es/runtimeConfig.native.js.map +0 -1
  106. package/dist-es/runtimeConfig.shared.js.map +0 -1
  107. package/jest.config.js +0 -4
  108. package/src/IoTDataPlane.ts +0 -297
  109. package/src/IoTDataPlaneClient.ts +0 -273
  110. package/src/commands/DeleteThingShadowCommand.ts +0 -97
  111. package/src/commands/GetRetainedMessageCommand.ts +0 -101
  112. package/src/commands/GetThingShadowCommand.ts +0 -98
  113. package/src/commands/ListNamedShadowsForThingCommand.ts +0 -96
  114. package/src/commands/ListRetainedMessagesCommand.ts +0 -104
  115. package/src/commands/PublishCommand.ts +0 -101
  116. package/src/commands/UpdateThingShadowCommand.ts +0 -98
  117. package/src/endpoints.ts +0 -91
  118. package/src/index.ts +0 -12
  119. package/src/models/index.ts +0 -1
  120. package/src/models/models_0.ts +0 -570
  121. package/src/pagination/Interfaces.ts +0 -8
  122. package/src/pagination/ListRetainedMessagesPaginator.ts +0 -59
  123. package/src/protocols/Aws_restJson1.ts +0 -1281
  124. package/src/runtimeConfig.browser.ts +0 -41
  125. package/src/runtimeConfig.native.ts +0 -17
  126. package/src/runtimeConfig.shared.ts +0 -17
  127. package/src/runtimeConfig.ts +0 -46
  128. package/tsconfig.es.json +0 -10
  129. package/tsconfig.json +0 -33
  130. package/tsconfig.types.json +0 -9
@@ -1,297 +0,0 @@
1
- import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
-
3
- import {
4
- DeleteThingShadowCommand,
5
- DeleteThingShadowCommandInput,
6
- DeleteThingShadowCommandOutput,
7
- } from "./commands/DeleteThingShadowCommand";
8
- import {
9
- GetRetainedMessageCommand,
10
- GetRetainedMessageCommandInput,
11
- GetRetainedMessageCommandOutput,
12
- } from "./commands/GetRetainedMessageCommand";
13
- import {
14
- GetThingShadowCommand,
15
- GetThingShadowCommandInput,
16
- GetThingShadowCommandOutput,
17
- } from "./commands/GetThingShadowCommand";
18
- import {
19
- ListNamedShadowsForThingCommand,
20
- ListNamedShadowsForThingCommandInput,
21
- ListNamedShadowsForThingCommandOutput,
22
- } from "./commands/ListNamedShadowsForThingCommand";
23
- import {
24
- ListRetainedMessagesCommand,
25
- ListRetainedMessagesCommandInput,
26
- ListRetainedMessagesCommandOutput,
27
- } from "./commands/ListRetainedMessagesCommand";
28
- import { PublishCommand, PublishCommandInput, PublishCommandOutput } from "./commands/PublishCommand";
29
- import {
30
- UpdateThingShadowCommand,
31
- UpdateThingShadowCommandInput,
32
- UpdateThingShadowCommandOutput,
33
- } from "./commands/UpdateThingShadowCommand";
34
- import { IoTDataPlaneClient } from "./IoTDataPlaneClient";
35
-
36
- /**
37
- * <fullname>IoT data</fullname>
38
- * <p>IoT data enables secure, bi-directional communication between Internet-connected things (such as sensors,
39
- * actuators, embedded devices, or smart appliances) and the Amazon Web Services cloud. It implements a broker for applications and
40
- * things to publish messages over HTTP (Publish) and retrieve, update, and delete shadows. A shadow is a
41
- * persistent representation of your things and their state in the Amazon Web Services cloud.</p>
42
- * <p>Find the endpoint address for actions in IoT data by running this CLI command:</p>
43
- * <p>
44
- * <code>aws iot describe-endpoint --endpoint-type iot:Data-ATS</code>
45
- * </p>
46
- * <p>The service name used by <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Amazon Web ServicesSignature Version 4</a>
47
- * to sign requests is: <i>iotdevicegateway</i>.</p>
48
- */
49
- export class IoTDataPlane extends IoTDataPlaneClient {
50
- /**
51
- * <p>Deletes the shadow for the specified thing.</p>
52
- * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">DeleteThingShadow</a> action.</p>
53
- * <p>For more information, see <a href="http://docs.aws.amazon.com/iot/latest/developerguide/API_DeleteThingShadow.html">DeleteThingShadow</a> in the IoT Developer Guide.</p>
54
- */
55
- public deleteThingShadow(
56
- args: DeleteThingShadowCommandInput,
57
- options?: __HttpHandlerOptions
58
- ): Promise<DeleteThingShadowCommandOutput>;
59
- public deleteThingShadow(
60
- args: DeleteThingShadowCommandInput,
61
- cb: (err: any, data?: DeleteThingShadowCommandOutput) => void
62
- ): void;
63
- public deleteThingShadow(
64
- args: DeleteThingShadowCommandInput,
65
- options: __HttpHandlerOptions,
66
- cb: (err: any, data?: DeleteThingShadowCommandOutput) => void
67
- ): void;
68
- public deleteThingShadow(
69
- args: DeleteThingShadowCommandInput,
70
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteThingShadowCommandOutput) => void),
71
- cb?: (err: any, data?: DeleteThingShadowCommandOutput) => void
72
- ): Promise<DeleteThingShadowCommandOutput> | void {
73
- const command = new DeleteThingShadowCommand(args);
74
- if (typeof optionsOrCb === "function") {
75
- this.send(command, optionsOrCb);
76
- } else if (typeof cb === "function") {
77
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
78
- this.send(command, optionsOrCb || {}, cb);
79
- } else {
80
- return this.send(command, optionsOrCb);
81
- }
82
- }
83
-
84
- /**
85
- * <p>Gets the details of a single retained message for the specified topic.</p>
86
- * <p>This action returns the message payload of the retained message, which can
87
- * incur messaging costs. To list only the topic names of the retained messages, call
88
- * <a href="/iot/latest/developerguide/API_iotdata_ListRetainedMessages.html">ListRetainedMessages</a>.</p>
89
- * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotfleethubfordevicemanagement.html#awsiotfleethubfordevicemanagement-actions-as-permissions">GetRetainedMessage</a> action.</p>
90
- * <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">IoT Core
91
- * pricing - Messaging</a>.</p>
92
- */
93
- public getRetainedMessage(
94
- args: GetRetainedMessageCommandInput,
95
- options?: __HttpHandlerOptions
96
- ): Promise<GetRetainedMessageCommandOutput>;
97
- public getRetainedMessage(
98
- args: GetRetainedMessageCommandInput,
99
- cb: (err: any, data?: GetRetainedMessageCommandOutput) => void
100
- ): void;
101
- public getRetainedMessage(
102
- args: GetRetainedMessageCommandInput,
103
- options: __HttpHandlerOptions,
104
- cb: (err: any, data?: GetRetainedMessageCommandOutput) => void
105
- ): void;
106
- public getRetainedMessage(
107
- args: GetRetainedMessageCommandInput,
108
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetRetainedMessageCommandOutput) => void),
109
- cb?: (err: any, data?: GetRetainedMessageCommandOutput) => void
110
- ): Promise<GetRetainedMessageCommandOutput> | void {
111
- const command = new GetRetainedMessageCommand(args);
112
- if (typeof optionsOrCb === "function") {
113
- this.send(command, optionsOrCb);
114
- } else if (typeof cb === "function") {
115
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
116
- this.send(command, optionsOrCb || {}, cb);
117
- } else {
118
- return this.send(command, optionsOrCb);
119
- }
120
- }
121
-
122
- /**
123
- * <p>Gets the shadow for the specified thing.</p>
124
- * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">GetThingShadow</a> action.</p>
125
- * <p>For more information, see <a href="http://docs.aws.amazon.com/iot/latest/developerguide/API_GetThingShadow.html">GetThingShadow</a> in the
126
- * IoT Developer Guide.</p>
127
- */
128
- public getThingShadow(
129
- args: GetThingShadowCommandInput,
130
- options?: __HttpHandlerOptions
131
- ): Promise<GetThingShadowCommandOutput>;
132
- public getThingShadow(
133
- args: GetThingShadowCommandInput,
134
- cb: (err: any, data?: GetThingShadowCommandOutput) => void
135
- ): void;
136
- public getThingShadow(
137
- args: GetThingShadowCommandInput,
138
- options: __HttpHandlerOptions,
139
- cb: (err: any, data?: GetThingShadowCommandOutput) => void
140
- ): void;
141
- public getThingShadow(
142
- args: GetThingShadowCommandInput,
143
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetThingShadowCommandOutput) => void),
144
- cb?: (err: any, data?: GetThingShadowCommandOutput) => void
145
- ): Promise<GetThingShadowCommandOutput> | void {
146
- const command = new GetThingShadowCommand(args);
147
- if (typeof optionsOrCb === "function") {
148
- this.send(command, optionsOrCb);
149
- } else if (typeof cb === "function") {
150
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
151
- this.send(command, optionsOrCb || {}, cb);
152
- } else {
153
- return this.send(command, optionsOrCb);
154
- }
155
- }
156
-
157
- /**
158
- * <p>Lists the shadows for the specified thing.</p>
159
- * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">ListNamedShadowsForThing</a> action.</p>
160
- */
161
- public listNamedShadowsForThing(
162
- args: ListNamedShadowsForThingCommandInput,
163
- options?: __HttpHandlerOptions
164
- ): Promise<ListNamedShadowsForThingCommandOutput>;
165
- public listNamedShadowsForThing(
166
- args: ListNamedShadowsForThingCommandInput,
167
- cb: (err: any, data?: ListNamedShadowsForThingCommandOutput) => void
168
- ): void;
169
- public listNamedShadowsForThing(
170
- args: ListNamedShadowsForThingCommandInput,
171
- options: __HttpHandlerOptions,
172
- cb: (err: any, data?: ListNamedShadowsForThingCommandOutput) => void
173
- ): void;
174
- public listNamedShadowsForThing(
175
- args: ListNamedShadowsForThingCommandInput,
176
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListNamedShadowsForThingCommandOutput) => void),
177
- cb?: (err: any, data?: ListNamedShadowsForThingCommandOutput) => void
178
- ): Promise<ListNamedShadowsForThingCommandOutput> | void {
179
- const command = new ListNamedShadowsForThingCommand(args);
180
- if (typeof optionsOrCb === "function") {
181
- this.send(command, optionsOrCb);
182
- } else if (typeof cb === "function") {
183
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
184
- this.send(command, optionsOrCb || {}, cb);
185
- } else {
186
- return this.send(command, optionsOrCb);
187
- }
188
- }
189
-
190
- /**
191
- * <p>Lists summary information about the retained messages stored for the account.</p>
192
- * <p>This action returns only the topic names of the retained messages. It doesn't
193
- * return any message payloads. Although this action doesn't return a message payload,
194
- * it can still incur messaging costs.</p>
195
- * <p>To get the message payload of a retained message, call
196
- * <a href="https://docs.aws.amazon.com/iot/latest/developerguide/API_iotdata_GetRetainedMessage.html">GetRetainedMessage</a>
197
- * with the topic name of the retained message.</p>
198
- * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotfleethubfordevicemanagement.html#awsiotfleethubfordevicemanagement-actions-as-permissions">ListRetainedMessages</a> action.</p>
199
- * <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">IoT Core
200
- * pricing - Messaging</a>.</p>
201
- */
202
- public listRetainedMessages(
203
- args: ListRetainedMessagesCommandInput,
204
- options?: __HttpHandlerOptions
205
- ): Promise<ListRetainedMessagesCommandOutput>;
206
- public listRetainedMessages(
207
- args: ListRetainedMessagesCommandInput,
208
- cb: (err: any, data?: ListRetainedMessagesCommandOutput) => void
209
- ): void;
210
- public listRetainedMessages(
211
- args: ListRetainedMessagesCommandInput,
212
- options: __HttpHandlerOptions,
213
- cb: (err: any, data?: ListRetainedMessagesCommandOutput) => void
214
- ): void;
215
- public listRetainedMessages(
216
- args: ListRetainedMessagesCommandInput,
217
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListRetainedMessagesCommandOutput) => void),
218
- cb?: (err: any, data?: ListRetainedMessagesCommandOutput) => void
219
- ): Promise<ListRetainedMessagesCommandOutput> | void {
220
- const command = new ListRetainedMessagesCommand(args);
221
- if (typeof optionsOrCb === "function") {
222
- this.send(command, optionsOrCb);
223
- } else if (typeof cb === "function") {
224
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
225
- this.send(command, optionsOrCb || {}, cb);
226
- } else {
227
- return this.send(command, optionsOrCb);
228
- }
229
- }
230
-
231
- /**
232
- * <p>Publishes an MQTT message.</p>
233
- * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">Publish</a> action.</p>
234
- * <p>For more information about MQTT messages, see
235
- * <a href="http://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html">MQTT Protocol</a> in the
236
- * IoT Developer Guide.</p>
237
- * <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">IoT Core
238
- * pricing - Messaging</a>.</p>
239
- */
240
- public publish(args: PublishCommandInput, options?: __HttpHandlerOptions): Promise<PublishCommandOutput>;
241
- public publish(args: PublishCommandInput, cb: (err: any, data?: PublishCommandOutput) => void): void;
242
- public publish(
243
- args: PublishCommandInput,
244
- options: __HttpHandlerOptions,
245
- cb: (err: any, data?: PublishCommandOutput) => void
246
- ): void;
247
- public publish(
248
- args: PublishCommandInput,
249
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PublishCommandOutput) => void),
250
- cb?: (err: any, data?: PublishCommandOutput) => void
251
- ): Promise<PublishCommandOutput> | void {
252
- const command = new PublishCommand(args);
253
- if (typeof optionsOrCb === "function") {
254
- this.send(command, optionsOrCb);
255
- } else if (typeof cb === "function") {
256
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
257
- this.send(command, optionsOrCb || {}, cb);
258
- } else {
259
- return this.send(command, optionsOrCb);
260
- }
261
- }
262
-
263
- /**
264
- * <p>Updates the shadow for the specified thing.</p>
265
- * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">UpdateThingShadow</a> action.</p>
266
- * <p>For more information, see <a href="http://docs.aws.amazon.com/iot/latest/developerguide/API_UpdateThingShadow.html">UpdateThingShadow</a> in the
267
- * IoT Developer Guide.</p>
268
- */
269
- public updateThingShadow(
270
- args: UpdateThingShadowCommandInput,
271
- options?: __HttpHandlerOptions
272
- ): Promise<UpdateThingShadowCommandOutput>;
273
- public updateThingShadow(
274
- args: UpdateThingShadowCommandInput,
275
- cb: (err: any, data?: UpdateThingShadowCommandOutput) => void
276
- ): void;
277
- public updateThingShadow(
278
- args: UpdateThingShadowCommandInput,
279
- options: __HttpHandlerOptions,
280
- cb: (err: any, data?: UpdateThingShadowCommandOutput) => void
281
- ): void;
282
- public updateThingShadow(
283
- args: UpdateThingShadowCommandInput,
284
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateThingShadowCommandOutput) => void),
285
- cb?: (err: any, data?: UpdateThingShadowCommandOutput) => void
286
- ): Promise<UpdateThingShadowCommandOutput> | void {
287
- const command = new UpdateThingShadowCommand(args);
288
- if (typeof optionsOrCb === "function") {
289
- this.send(command, optionsOrCb);
290
- } else if (typeof cb === "function") {
291
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
292
- this.send(command, optionsOrCb || {}, cb);
293
- } else {
294
- return this.send(command, optionsOrCb);
295
- }
296
- }
297
- }
@@ -1,273 +0,0 @@
1
- import {
2
- EndpointsInputConfig,
3
- EndpointsResolvedConfig,
4
- RegionInputConfig,
5
- RegionResolvedConfig,
6
- resolveEndpointsConfig,
7
- resolveRegionConfig,
8
- } from "@aws-sdk/config-resolver";
9
- import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
10
- import {
11
- getHostHeaderPlugin,
12
- HostHeaderInputConfig,
13
- HostHeaderResolvedConfig,
14
- resolveHostHeaderConfig,
15
- } from "@aws-sdk/middleware-host-header";
16
- import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
17
- import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry";
18
- import {
19
- AwsAuthInputConfig,
20
- AwsAuthResolvedConfig,
21
- getAwsAuthPlugin,
22
- resolveAwsAuthConfig,
23
- } from "@aws-sdk/middleware-signing";
24
- import {
25
- getUserAgentPlugin,
26
- resolveUserAgentConfig,
27
- UserAgentInputConfig,
28
- UserAgentResolvedConfig,
29
- } from "@aws-sdk/middleware-user-agent";
30
- import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
31
- import {
32
- Client as __Client,
33
- SmithyConfiguration as __SmithyConfiguration,
34
- SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
35
- } from "@aws-sdk/smithy-client";
36
- import {
37
- Credentials as __Credentials,
38
- Decoder as __Decoder,
39
- Encoder as __Encoder,
40
- Hash as __Hash,
41
- HashConstructor as __HashConstructor,
42
- HttpHandlerOptions as __HttpHandlerOptions,
43
- Logger as __Logger,
44
- Provider as __Provider,
45
- Provider,
46
- RegionInfoProvider,
47
- StreamCollector as __StreamCollector,
48
- UrlParser as __UrlParser,
49
- UserAgent as __UserAgent,
50
- } from "@aws-sdk/types";
51
-
52
- import { DeleteThingShadowCommandInput, DeleteThingShadowCommandOutput } from "./commands/DeleteThingShadowCommand";
53
- import { GetRetainedMessageCommandInput, GetRetainedMessageCommandOutput } from "./commands/GetRetainedMessageCommand";
54
- import { GetThingShadowCommandInput, GetThingShadowCommandOutput } from "./commands/GetThingShadowCommand";
55
- import {
56
- ListNamedShadowsForThingCommandInput,
57
- ListNamedShadowsForThingCommandOutput,
58
- } from "./commands/ListNamedShadowsForThingCommand";
59
- import {
60
- ListRetainedMessagesCommandInput,
61
- ListRetainedMessagesCommandOutput,
62
- } from "./commands/ListRetainedMessagesCommand";
63
- import { PublishCommandInput, PublishCommandOutput } from "./commands/PublishCommand";
64
- import { UpdateThingShadowCommandInput, UpdateThingShadowCommandOutput } from "./commands/UpdateThingShadowCommand";
65
- import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
66
-
67
- export type ServiceInputTypes =
68
- | DeleteThingShadowCommandInput
69
- | GetRetainedMessageCommandInput
70
- | GetThingShadowCommandInput
71
- | ListNamedShadowsForThingCommandInput
72
- | ListRetainedMessagesCommandInput
73
- | PublishCommandInput
74
- | UpdateThingShadowCommandInput;
75
-
76
- export type ServiceOutputTypes =
77
- | DeleteThingShadowCommandOutput
78
- | GetRetainedMessageCommandOutput
79
- | GetThingShadowCommandOutput
80
- | ListNamedShadowsForThingCommandOutput
81
- | ListRetainedMessagesCommandOutput
82
- | PublishCommandOutput
83
- | UpdateThingShadowCommandOutput;
84
-
85
- export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
86
- /**
87
- * The HTTP handler to use. Fetch in browser and Https in Nodejs.
88
- */
89
- requestHandler?: __HttpHandler;
90
-
91
- /**
92
- * A constructor for a class implementing the {@link __Hash} interface
93
- * that computes the SHA-256 HMAC or checksum of a string or binary buffer.
94
- * @internal
95
- */
96
- sha256?: __HashConstructor;
97
-
98
- /**
99
- * The function that will be used to convert strings into HTTP endpoints.
100
- * @internal
101
- */
102
- urlParser?: __UrlParser;
103
-
104
- /**
105
- * A function that can calculate the length of a request body.
106
- * @internal
107
- */
108
- bodyLengthChecker?: (body: any) => number | undefined;
109
-
110
- /**
111
- * A function that converts a stream into an array of bytes.
112
- * @internal
113
- */
114
- streamCollector?: __StreamCollector;
115
-
116
- /**
117
- * The function that will be used to convert a base64-encoded string to a byte array.
118
- * @internal
119
- */
120
- base64Decoder?: __Decoder;
121
-
122
- /**
123
- * The function that will be used to convert binary data to a base64-encoded string.
124
- * @internal
125
- */
126
- base64Encoder?: __Encoder;
127
-
128
- /**
129
- * The function that will be used to convert a UTF8-encoded string to a byte array.
130
- * @internal
131
- */
132
- utf8Decoder?: __Decoder;
133
-
134
- /**
135
- * The function that will be used to convert binary data to a UTF-8 encoded string.
136
- * @internal
137
- */
138
- utf8Encoder?: __Encoder;
139
-
140
- /**
141
- * The runtime environment.
142
- * @internal
143
- */
144
- runtime?: string;
145
-
146
- /**
147
- * Disable dyanamically changing the endpoint of the client based on the hostPrefix
148
- * trait of an operation.
149
- */
150
- disableHostPrefix?: boolean;
151
-
152
- /**
153
- * Value for how many times a request will be made at most in case of retry.
154
- */
155
- maxAttempts?: number | __Provider<number>;
156
-
157
- /**
158
- * Specifies which retry algorithm to use.
159
- */
160
- retryMode?: string | __Provider<string>;
161
-
162
- /**
163
- * Optional logger for logging debug/info/warn/error.
164
- */
165
- logger?: __Logger;
166
-
167
- /**
168
- * Unique service identifier.
169
- * @internal
170
- */
171
- serviceId?: string;
172
-
173
- /**
174
- * The AWS region to which this client will send requests
175
- */
176
- region?: string | __Provider<string>;
177
-
178
- /**
179
- * Default credentials provider; Not available in browser runtime.
180
- * @internal
181
- */
182
- credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
183
-
184
- /**
185
- * Fetch related hostname, signing name or signing region with given region.
186
- * @internal
187
- */
188
- regionInfoProvider?: RegionInfoProvider;
189
-
190
- /**
191
- * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
192
- * @internal
193
- */
194
- defaultUserAgentProvider?: Provider<__UserAgent>;
195
- }
196
-
197
- type IoTDataPlaneClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
198
- ClientDefaults &
199
- RegionInputConfig &
200
- EndpointsInputConfig &
201
- RetryInputConfig &
202
- HostHeaderInputConfig &
203
- AwsAuthInputConfig &
204
- UserAgentInputConfig;
205
- /**
206
- * The configuration interface of IoTDataPlaneClient class constructor that set the region, credentials and other options.
207
- */
208
- export interface IoTDataPlaneClientConfig extends IoTDataPlaneClientConfigType {}
209
-
210
- type IoTDataPlaneClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
211
- Required<ClientDefaults> &
212
- RegionResolvedConfig &
213
- EndpointsResolvedConfig &
214
- RetryResolvedConfig &
215
- HostHeaderResolvedConfig &
216
- AwsAuthResolvedConfig &
217
- UserAgentResolvedConfig;
218
- /**
219
- * The resolved configuration interface of IoTDataPlaneClient class. This is resolved and normalized from the {@link IoTDataPlaneClientConfig | constructor configuration interface}.
220
- */
221
- export interface IoTDataPlaneClientResolvedConfig extends IoTDataPlaneClientResolvedConfigType {}
222
-
223
- /**
224
- * <fullname>IoT data</fullname>
225
- * <p>IoT data enables secure, bi-directional communication between Internet-connected things (such as sensors,
226
- * actuators, embedded devices, or smart appliances) and the Amazon Web Services cloud. It implements a broker for applications and
227
- * things to publish messages over HTTP (Publish) and retrieve, update, and delete shadows. A shadow is a
228
- * persistent representation of your things and their state in the Amazon Web Services cloud.</p>
229
- * <p>Find the endpoint address for actions in IoT data by running this CLI command:</p>
230
- * <p>
231
- * <code>aws iot describe-endpoint --endpoint-type iot:Data-ATS</code>
232
- * </p>
233
- * <p>The service name used by <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Amazon Web ServicesSignature Version 4</a>
234
- * to sign requests is: <i>iotdevicegateway</i>.</p>
235
- */
236
- export class IoTDataPlaneClient extends __Client<
237
- __HttpHandlerOptions,
238
- ServiceInputTypes,
239
- ServiceOutputTypes,
240
- IoTDataPlaneClientResolvedConfig
241
- > {
242
- /**
243
- * The resolved configuration of IoTDataPlaneClient class. This is resolved and normalized from the {@link IoTDataPlaneClientConfig | constructor configuration interface}.
244
- */
245
- readonly config: IoTDataPlaneClientResolvedConfig;
246
-
247
- constructor(configuration: IoTDataPlaneClientConfig) {
248
- const _config_0 = __getRuntimeConfig(configuration);
249
- const _config_1 = resolveRegionConfig(_config_0);
250
- const _config_2 = resolveEndpointsConfig(_config_1);
251
- const _config_3 = resolveRetryConfig(_config_2);
252
- const _config_4 = resolveHostHeaderConfig(_config_3);
253
- const _config_5 = resolveAwsAuthConfig(_config_4);
254
- const _config_6 = resolveUserAgentConfig(_config_5);
255
- super(_config_6);
256
- this.config = _config_6;
257
- this.middlewareStack.use(getRetryPlugin(this.config));
258
- this.middlewareStack.use(getContentLengthPlugin(this.config));
259
- this.middlewareStack.use(getHostHeaderPlugin(this.config));
260
- this.middlewareStack.use(getLoggerPlugin(this.config));
261
- this.middlewareStack.use(getAwsAuthPlugin(this.config));
262
- this.middlewareStack.use(getUserAgentPlugin(this.config));
263
- }
264
-
265
- /**
266
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
267
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
268
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
269
- */
270
- destroy(): void {
271
- super.destroy();
272
- }
273
- }
@@ -1,97 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { IoTDataPlaneClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTDataPlaneClient";
15
- import { DeleteThingShadowRequest, DeleteThingShadowResponse } from "../models/models_0";
16
- import {
17
- deserializeAws_restJson1DeleteThingShadowCommand,
18
- serializeAws_restJson1DeleteThingShadowCommand,
19
- } from "../protocols/Aws_restJson1";
20
-
21
- export interface DeleteThingShadowCommandInput extends DeleteThingShadowRequest {}
22
- export interface DeleteThingShadowCommandOutput extends DeleteThingShadowResponse, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Deletes the shadow for the specified thing.</p>
26
- * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">DeleteThingShadow</a> action.</p>
27
- * <p>For more information, see <a href="http://docs.aws.amazon.com/iot/latest/developerguide/API_DeleteThingShadow.html">DeleteThingShadow</a> in the IoT Developer Guide.</p>
28
- * @example
29
- * Use a bare-bones client and the command you need to make an API call.
30
- * ```javascript
31
- * import { IoTDataPlaneClient, DeleteThingShadowCommand } from "@aws-sdk/client-iot-data-plane"; // ES Modules import
32
- * // const { IoTDataPlaneClient, DeleteThingShadowCommand } = require("@aws-sdk/client-iot-data-plane"); // CommonJS import
33
- * const client = new IoTDataPlaneClient(config);
34
- * const command = new DeleteThingShadowCommand(input);
35
- * const response = await client.send(command);
36
- * ```
37
- *
38
- * @see {@link DeleteThingShadowCommandInput} for command's `input` shape.
39
- * @see {@link DeleteThingShadowCommandOutput} for command's `response` shape.
40
- * @see {@link IoTDataPlaneClientResolvedConfig | config} for command's `input` shape.
41
- *
42
- */
43
- export class DeleteThingShadowCommand extends $Command<
44
- DeleteThingShadowCommandInput,
45
- DeleteThingShadowCommandOutput,
46
- IoTDataPlaneClientResolvedConfig
47
- > {
48
- // Start section: command_properties
49
- // End section: command_properties
50
-
51
- constructor(readonly input: DeleteThingShadowCommandInput) {
52
- // Start section: command_constructor
53
- super();
54
- // End section: command_constructor
55
- }
56
-
57
- /**
58
- * @internal
59
- */
60
- resolveMiddleware(
61
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
62
- configuration: IoTDataPlaneClientResolvedConfig,
63
- options?: __HttpHandlerOptions
64
- ): Handler<DeleteThingShadowCommandInput, DeleteThingShadowCommandOutput> {
65
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
66
-
67
- const stack = clientStack.concat(this.middlewareStack);
68
-
69
- const { logger } = configuration;
70
- const clientName = "IoTDataPlaneClient";
71
- const commandName = "DeleteThingShadowCommand";
72
- const handlerExecutionContext: HandlerExecutionContext = {
73
- logger,
74
- clientName,
75
- commandName,
76
- inputFilterSensitiveLog: DeleteThingShadowRequest.filterSensitiveLog,
77
- outputFilterSensitiveLog: DeleteThingShadowResponse.filterSensitiveLog,
78
- };
79
- const { requestHandler } = configuration;
80
- return stack.resolve(
81
- (request: FinalizeHandlerArguments<any>) =>
82
- requestHandler.handle(request.request as __HttpRequest, options || {}),
83
- handlerExecutionContext
84
- );
85
- }
86
-
87
- private serialize(input: DeleteThingShadowCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
88
- return serializeAws_restJson1DeleteThingShadowCommand(input, context);
89
- }
90
-
91
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteThingShadowCommandOutput> {
92
- return deserializeAws_restJson1DeleteThingShadowCommand(output, context);
93
- }
94
-
95
- // Start section: command_body_extra
96
- // End section: command_body_extra
97
- }