iot1clickdevicesservice.d.ts
17.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
import {Request} from '../lib/request';
import {Response} from '../lib/response';
import {AWSError} from '../lib/error';
import {Service} from '../lib/service';
import {ServiceConfigurationOptions} from '../lib/service';
import {ConfigBase as Config} from '../lib/config-base';
interface Blob {}
declare class IoT1ClickDevicesService extends Service {
/**
* Constructs a service object. This object has one method for each API operation.
*/
constructor(options?: IoT1ClickDevicesService.Types.ClientConfiguration)
config: Config & IoT1ClickDevicesService.Types.ClientConfiguration;
/**
* Adds device(s) to your account (i.e., claim one or more devices) if and only if you
received a claim code with the device(s).
*/
claimDevicesByClaimCode(params: IoT1ClickDevicesService.Types.ClaimDevicesByClaimCodeRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ClaimDevicesByClaimCodeResponse) => void): Request<IoT1ClickDevicesService.Types.ClaimDevicesByClaimCodeResponse, AWSError>;
/**
* Adds device(s) to your account (i.e., claim one or more devices) if and only if you
received a claim code with the device(s).
*/
claimDevicesByClaimCode(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ClaimDevicesByClaimCodeResponse) => void): Request<IoT1ClickDevicesService.Types.ClaimDevicesByClaimCodeResponse, AWSError>;
/**
* Given a device ID, returns a DescribeDeviceResponse object describing the
details of the device.
*/
describeDevice(params: IoT1ClickDevicesService.Types.DescribeDeviceRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.DescribeDeviceResponse) => void): Request<IoT1ClickDevicesService.Types.DescribeDeviceResponse, AWSError>;
/**
* Given a device ID, returns a DescribeDeviceResponse object describing the
details of the device.
*/
describeDevice(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.DescribeDeviceResponse) => void): Request<IoT1ClickDevicesService.Types.DescribeDeviceResponse, AWSError>;
/**
* Given a device ID, finalizes the claim request for the associated device.
Claiming a device consists of initiating a claim, then publishing a device event,
and finalizing the claim. For a device of type button, a device event can
be published by simply clicking the device.
*/
finalizeDeviceClaim(params: IoT1ClickDevicesService.Types.FinalizeDeviceClaimRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.FinalizeDeviceClaimResponse) => void): Request<IoT1ClickDevicesService.Types.FinalizeDeviceClaimResponse, AWSError>;
/**
* Given a device ID, finalizes the claim request for the associated device.
Claiming a device consists of initiating a claim, then publishing a device event,
and finalizing the claim. For a device of type button, a device event can
be published by simply clicking the device.
*/
finalizeDeviceClaim(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.FinalizeDeviceClaimResponse) => void): Request<IoT1ClickDevicesService.Types.FinalizeDeviceClaimResponse, AWSError>;
/**
* Given a device ID, returns the invokable methods associated with the device.
*/
getDeviceMethods(params: IoT1ClickDevicesService.Types.GetDeviceMethodsRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.GetDeviceMethodsResponse) => void): Request<IoT1ClickDevicesService.Types.GetDeviceMethodsResponse, AWSError>;
/**
* Given a device ID, returns the invokable methods associated with the device.
*/
getDeviceMethods(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.GetDeviceMethodsResponse) => void): Request<IoT1ClickDevicesService.Types.GetDeviceMethodsResponse, AWSError>;
/**
* Given a device ID, initiates a claim request for the associated device.
Claiming a device consists of initiating a claim, then publishing a device event,
and finalizing the claim. For a device of type button, a device event can
be published by simply clicking the device.
*/
initiateDeviceClaim(params: IoT1ClickDevicesService.Types.InitiateDeviceClaimRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.InitiateDeviceClaimResponse) => void): Request<IoT1ClickDevicesService.Types.InitiateDeviceClaimResponse, AWSError>;
/**
* Given a device ID, initiates a claim request for the associated device.
Claiming a device consists of initiating a claim, then publishing a device event,
and finalizing the claim. For a device of type button, a device event can
be published by simply clicking the device.
*/
initiateDeviceClaim(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.InitiateDeviceClaimResponse) => void): Request<IoT1ClickDevicesService.Types.InitiateDeviceClaimResponse, AWSError>;
/**
* Given a device ID, issues a request to invoke a named device method (with possible
parameters). See the "Example POST" code snippet below.
*/
invokeDeviceMethod(params: IoT1ClickDevicesService.Types.InvokeDeviceMethodRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.InvokeDeviceMethodResponse) => void): Request<IoT1ClickDevicesService.Types.InvokeDeviceMethodResponse, AWSError>;
/**
* Given a device ID, issues a request to invoke a named device method (with possible
parameters). See the "Example POST" code snippet below.
*/
invokeDeviceMethod(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.InvokeDeviceMethodResponse) => void): Request<IoT1ClickDevicesService.Types.InvokeDeviceMethodResponse, AWSError>;
/**
* Using a device ID, returns a DeviceEventsResponse object containing an
array of events for the device.
*/
listDeviceEvents(params: IoT1ClickDevicesService.Types.ListDeviceEventsRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ListDeviceEventsResponse) => void): Request<IoT1ClickDevicesService.Types.ListDeviceEventsResponse, AWSError>;
/**
* Using a device ID, returns a DeviceEventsResponse object containing an
array of events for the device.
*/
listDeviceEvents(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ListDeviceEventsResponse) => void): Request<IoT1ClickDevicesService.Types.ListDeviceEventsResponse, AWSError>;
/**
* Lists the 1-Click compatible devices associated with your AWS account.
*/
listDevices(params: IoT1ClickDevicesService.Types.ListDevicesRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ListDevicesResponse) => void): Request<IoT1ClickDevicesService.Types.ListDevicesResponse, AWSError>;
/**
* Lists the 1-Click compatible devices associated with your AWS account.
*/
listDevices(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ListDevicesResponse) => void): Request<IoT1ClickDevicesService.Types.ListDevicesResponse, AWSError>;
/**
* Lists the tags associated with the specified resource ARN.
*/
listTagsForResource(params: IoT1ClickDevicesService.Types.ListTagsForResourceRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ListTagsForResourceResponse) => void): Request<IoT1ClickDevicesService.Types.ListTagsForResourceResponse, AWSError>;
/**
* Lists the tags associated with the specified resource ARN.
*/
listTagsForResource(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ListTagsForResourceResponse) => void): Request<IoT1ClickDevicesService.Types.ListTagsForResourceResponse, AWSError>;
/**
* Adds or updates the tags associated with the resource ARN. See AWS IoT 1-Click Service Limits for the maximum number of tags allowed per
resource.
*/
tagResource(params: IoT1ClickDevicesService.Types.TagResourceRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Adds or updates the tags associated with the resource ARN. See AWS IoT 1-Click Service Limits for the maximum number of tags allowed per
resource.
*/
tagResource(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Disassociates a device from your AWS account using its device ID.
*/
unclaimDevice(params: IoT1ClickDevicesService.Types.UnclaimDeviceRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.UnclaimDeviceResponse) => void): Request<IoT1ClickDevicesService.Types.UnclaimDeviceResponse, AWSError>;
/**
* Disassociates a device from your AWS account using its device ID.
*/
unclaimDevice(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.UnclaimDeviceResponse) => void): Request<IoT1ClickDevicesService.Types.UnclaimDeviceResponse, AWSError>;
/**
* Using tag keys, deletes the tags (key/value pairs) associated with the specified
resource ARN.
*/
untagResource(params: IoT1ClickDevicesService.Types.UntagResourceRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Using tag keys, deletes the tags (key/value pairs) associated with the specified
resource ARN.
*/
untagResource(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Using a Boolean value (true or false), this operation
enables or disables the device given a device ID.
*/
updateDeviceState(params: IoT1ClickDevicesService.Types.UpdateDeviceStateRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.UpdateDeviceStateResponse) => void): Request<IoT1ClickDevicesService.Types.UpdateDeviceStateResponse, AWSError>;
/**
* Using a Boolean value (true or false), this operation
enables or disables the device given a device ID.
*/
updateDeviceState(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.UpdateDeviceStateResponse) => void): Request<IoT1ClickDevicesService.Types.UpdateDeviceStateResponse, AWSError>;
}
declare namespace IoT1ClickDevicesService {
export interface Attributes {
}
export interface ClaimDevicesByClaimCodeRequest {
/**
* The claim code, starting with "C-", as provided by the device manufacturer.
*/
ClaimCode: __string;
}
export interface ClaimDevicesByClaimCodeResponse {
/**
* The claim code provided by the device manufacturer.
*/
ClaimCode?: __stringMin12Max40;
/**
* The total number of devices associated with the claim code that has been processed in
the claim request.
*/
Total?: __integer;
}
export interface DescribeDeviceRequest {
/**
* The unique identifier of the device.
*/
DeviceId: __string;
}
export interface DescribeDeviceResponse {
/**
* Device details.
*/
DeviceDescription?: DeviceDescription;
}
export interface Device {
/**
* The user specified attributes associated with the device for an event.
*/
Attributes?: Attributes;
/**
* The unique identifier of the device.
*/
DeviceId?: __string;
/**
* The device type, such as "button".
*/
Type?: __string;
}
export type DeviceAttributes = {[key: string]: __string};
export interface DeviceDescription {
/**
* The ARN of the device.
*/
Arn?: __string;
/**
* An array of zero or more elements of DeviceAttribute objects providing
user specified device attributes.
*/
Attributes?: DeviceAttributes;
/**
* The unique identifier of the device.
*/
DeviceId?: __string;
/**
* A Boolean value indicating whether or not the device is enabled.
*/
Enabled?: __boolean;
/**
* A value between 0 and 1 inclusive, representing the fraction of life remaining for the
device.
*/
RemainingLife?: __doubleMin0Max100;
/**
* The type of the device, such as "button".
*/
Type?: __string;
/**
* The tags currently associated with the AWS IoT 1-Click device.
*/
Tags?: __mapOf__string;
}
export interface DeviceEvent {
/**
* An object representing the device associated with the event.
*/
Device?: Device;
/**
* A serialized JSON object representing the device-type specific event.
*/
StdEvent?: __string;
}
export interface DeviceMethod {
/**
* The type of the device, such as "button".
*/
DeviceType?: __string;
/**
* The name of the method applicable to the deviceType.
*/
MethodName?: __string;
}
export interface FinalizeDeviceClaimRequest {
/**
* The unique identifier of the device.
*/
DeviceId: __string;
/**
* A collection of key/value pairs defining the resource tags. For example, {
"tags": {"key1": "value1", "key2": "value2"} }. For more information, see AWS
Tagging Strategies.
*/
Tags?: __mapOf__string;
}
export interface FinalizeDeviceClaimResponse {
/**
* The device's final claim state.
*/
State?: __string;
}
export interface GetDeviceMethodsRequest {
/**
* The unique identifier of the device.
*/
DeviceId: __string;
}
export interface GetDeviceMethodsResponse {
/**
* List of available device APIs.
*/
DeviceMethods?: __listOfDeviceMethod;
}
export interface InitiateDeviceClaimRequest {
/**
* The unique identifier of the device.
*/
DeviceId: __string;
}
export interface InitiateDeviceClaimResponse {
/**
* The device's final claim state.
*/
State?: __string;
}
export interface InvokeDeviceMethodRequest {
/**
* The unique identifier of the device.
*/
DeviceId: __string;
/**
* The device method to invoke.
*/
DeviceMethod?: DeviceMethod;
/**
* A JSON encoded string containing the device method request parameters.
*/
DeviceMethodParameters?: __string;
}
export interface InvokeDeviceMethodResponse {
/**
* A JSON encoded string containing the device method response.
*/
DeviceMethodResponse?: __string;
}
export interface ListDeviceEventsRequest {
/**
* The unique identifier of the device.
*/
DeviceId: __string;
/**
* The start date for the device event query, in ISO8061 format. For example,
2018-03-28T15:45:12.880Z
*/
FromTimeStamp: __timestampIso8601;
/**
* The maximum number of results to return per request. If not set, a default value of
100 is used.
*/
MaxResults?: MaxResults;
/**
* The token to retrieve the next set of results.
*/
NextToken?: __string;
/**
* The end date for the device event query, in ISO8061 format. For example,
2018-03-28T15:45:12.880Z
*/
ToTimeStamp: __timestampIso8601;
}
export interface ListDeviceEventsResponse {
/**
* An array of zero or more elements describing the event(s) associated with the
device.
*/
Events?: __listOfDeviceEvent;
/**
* The token to retrieve the next set of results.
*/
NextToken?: __string;
}
export interface ListDevicesRequest {
/**
* The type of the device, such as "button".
*/
DeviceType?: __string;
/**
* The maximum number of results to return per request. If not set, a default value of
100 is used.
*/
MaxResults?: MaxResults;
/**
* The token to retrieve the next set of results.
*/
NextToken?: __string;
}
export interface ListDevicesResponse {
/**
* A list of devices.
*/
Devices?: __listOfDeviceDescription;
/**
* The token to retrieve the next set of results.
*/
NextToken?: __string;
}
export interface ListTagsForResourceRequest {
/**
* The ARN of the resource.
*/
ResourceArn: __string;
}
export interface ListTagsForResourceResponse {
/**
* A collection of key/value pairs defining the resource tags. For example, {
"tags": {"key1": "value1", "key2": "value2"} }. For more information, see AWS
Tagging Strategies.
*/
Tags?: __mapOf__string;
}
export type MaxResults = number;
export interface TagResourceRequest {
/**
* The ARN of the resource.
*/
ResourceArn: __string;
/**
* A collection of key/value pairs defining the resource tags. For example, {
"tags": {"key1": "value1", "key2": "value2"} }. For more information, see AWS
Tagging Strategies.
*/
Tags: __mapOf__string;
}
export interface UnclaimDeviceRequest {
/**
* The unique identifier of the device.
*/
DeviceId: __string;
}
export interface UnclaimDeviceResponse {
/**
* The device's final claim state.
*/
State?: __string;
}
export interface UntagResourceRequest {
/**
* The ARN of the resource.
*/
ResourceArn: __string;
/**
* A collections of tag keys. For example, {"key1","key2"}
*/
TagKeys: __listOf__string;
}
export interface UpdateDeviceStateRequest {
/**
* The unique identifier of the device.
*/
DeviceId: __string;
/**
* If true, the device is enabled. If false, the device is
disabled.
*/
Enabled?: __boolean;
}
export interface UpdateDeviceStateResponse {
}
export type __boolean = boolean;
export type __doubleMin0Max100 = number;
export type __integer = number;
export type __listOfDeviceDescription = DeviceDescription[];
export type __listOfDeviceEvent = DeviceEvent[];
export type __listOfDeviceMethod = DeviceMethod[];
export type __listOf__string = __string[];
export type __mapOf__string = {[key: string]: __string};
export type __string = string;
export type __stringMin12Max40 = string;
export type __timestampIso8601 = Date;
/**
* A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
*/
export type apiVersion = "2018-05-14"|"latest"|string;
export interface ClientApiVersions {
/**
* A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
*/
apiVersion?: apiVersion;
}
export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
/**
* Contains interfaces for use with the IoT1ClickDevicesService client.
*/
export import Types = IoT1ClickDevicesService;
}
export = IoT1ClickDevicesService;