ioteventsdata.d.ts
12.6 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
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 IoTEventsData extends Service {
/**
* Constructs a service object. This object has one method for each API operation.
*/
constructor(options?: IoTEventsData.Types.ClientConfiguration)
config: Config & IoTEventsData.Types.ClientConfiguration;
/**
* Sends a set of messages to the AWS IoT Events system. Each message payload is transformed into the input you specify ("inputName") and ingested into any detectors that monitor that input. If multiple messages are sent, the order in which the messages are processed isn't guaranteed. To guarantee ordering, you must send messages one at a time and wait for a successful response.
*/
batchPutMessage(params: IoTEventsData.Types.BatchPutMessageRequest, callback?: (err: AWSError, data: IoTEventsData.Types.BatchPutMessageResponse) => void): Request<IoTEventsData.Types.BatchPutMessageResponse, AWSError>;
/**
* Sends a set of messages to the AWS IoT Events system. Each message payload is transformed into the input you specify ("inputName") and ingested into any detectors that monitor that input. If multiple messages are sent, the order in which the messages are processed isn't guaranteed. To guarantee ordering, you must send messages one at a time and wait for a successful response.
*/
batchPutMessage(callback?: (err: AWSError, data: IoTEventsData.Types.BatchPutMessageResponse) => void): Request<IoTEventsData.Types.BatchPutMessageResponse, AWSError>;
/**
* Updates the state, variable values, and timer settings of one or more detectors (instances) of a specified detector model.
*/
batchUpdateDetector(params: IoTEventsData.Types.BatchUpdateDetectorRequest, callback?: (err: AWSError, data: IoTEventsData.Types.BatchUpdateDetectorResponse) => void): Request<IoTEventsData.Types.BatchUpdateDetectorResponse, AWSError>;
/**
* Updates the state, variable values, and timer settings of one or more detectors (instances) of a specified detector model.
*/
batchUpdateDetector(callback?: (err: AWSError, data: IoTEventsData.Types.BatchUpdateDetectorResponse) => void): Request<IoTEventsData.Types.BatchUpdateDetectorResponse, AWSError>;
/**
* Returns information about the specified detector (instance).
*/
describeDetector(params: IoTEventsData.Types.DescribeDetectorRequest, callback?: (err: AWSError, data: IoTEventsData.Types.DescribeDetectorResponse) => void): Request<IoTEventsData.Types.DescribeDetectorResponse, AWSError>;
/**
* Returns information about the specified detector (instance).
*/
describeDetector(callback?: (err: AWSError, data: IoTEventsData.Types.DescribeDetectorResponse) => void): Request<IoTEventsData.Types.DescribeDetectorResponse, AWSError>;
/**
* Lists detectors (the instances of a detector model).
*/
listDetectors(params: IoTEventsData.Types.ListDetectorsRequest, callback?: (err: AWSError, data: IoTEventsData.Types.ListDetectorsResponse) => void): Request<IoTEventsData.Types.ListDetectorsResponse, AWSError>;
/**
* Lists detectors (the instances of a detector model).
*/
listDetectors(callback?: (err: AWSError, data: IoTEventsData.Types.ListDetectorsResponse) => void): Request<IoTEventsData.Types.ListDetectorsResponse, AWSError>;
}
declare namespace IoTEventsData {
export type BatchPutMessageErrorEntries = BatchPutMessageErrorEntry[];
export interface BatchPutMessageErrorEntry {
/**
* The ID of the message that caused the error. (See the value corresponding to the "messageId" key in the "message" object.)
*/
messageId?: MessageId;
/**
* The code associated with the error.
*/
errorCode?: ErrorCode;
/**
* More information about the error.
*/
errorMessage?: ErrorMessage;
}
export interface BatchPutMessageRequest {
/**
* The list of messages to send. Each message has the following format: '{ "messageId": "string", "inputName": "string", "payload": "string"}'
*/
messages: Messages;
}
export interface BatchPutMessageResponse {
/**
* A list of any errors encountered when sending the messages.
*/
BatchPutMessageErrorEntries?: BatchPutMessageErrorEntries;
}
export type BatchUpdateDetectorErrorEntries = BatchUpdateDetectorErrorEntry[];
export interface BatchUpdateDetectorErrorEntry {
/**
* The "messageId" of the update request that caused the error. (The value of the "messageId" in the update request "Detector" object.)
*/
messageId?: MessageId;
/**
* The code of the error.
*/
errorCode?: ErrorCode;
/**
* A message describing the error.
*/
errorMessage?: ErrorMessage;
}
export interface BatchUpdateDetectorRequest {
/**
* The list of detectors (instances) to update, along with the values to update.
*/
detectors: UpdateDetectorRequests;
}
export interface BatchUpdateDetectorResponse {
/**
* A list of those detector updates that resulted in errors. (If an error is listed here, the specific update did not occur.)
*/
batchUpdateDetectorErrorEntries?: BatchUpdateDetectorErrorEntries;
}
export interface DescribeDetectorRequest {
/**
* The name of the detector model whose detectors (instances) you want information about.
*/
detectorModelName: DetectorModelName;
/**
* A filter used to limit results to detectors (instances) created because of the given key ID.
*/
keyValue?: KeyValue;
}
export interface DescribeDetectorResponse {
/**
* Information about the detector (instance).
*/
detector?: Detector;
}
export interface Detector {
/**
* The name of the detector model that created this detector (instance).
*/
detectorModelName?: DetectorModelName;
/**
* The value of the key (identifying the device or system) that caused the creation of this detector (instance).
*/
keyValue?: KeyValue;
/**
* The version of the detector model that created this detector (instance).
*/
detectorModelVersion?: DetectorModelVersion;
/**
* The current state of the detector (instance).
*/
state?: DetectorState;
/**
* The time the detector (instance) was created.
*/
creationTime?: Timestamp;
/**
* The time the detector (instance) was last updated.
*/
lastUpdateTime?: Timestamp;
}
export type DetectorModelName = string;
export type DetectorModelVersion = string;
export interface DetectorState {
/**
* The name of the state.
*/
stateName: StateName;
/**
* The current values of the detector's variables.
*/
variables: Variables;
/**
* The current state of the detector's timers.
*/
timers: Timers;
}
export interface DetectorStateDefinition {
/**
* The name of the new state of the detector (instance).
*/
stateName: StateName;
/**
* The new values of the detector's variables. Any variable whose value isn't specified is cleared.
*/
variables: VariableDefinitions;
/**
* The new values of the detector's timers. Any timer whose value isn't specified is cleared, and its timeout event won't occur.
*/
timers: TimerDefinitions;
}
export interface DetectorStateSummary {
/**
* The name of the state.
*/
stateName?: StateName;
}
export type DetectorSummaries = DetectorSummary[];
export interface DetectorSummary {
/**
* The name of the detector model that created this detector (instance).
*/
detectorModelName?: DetectorModelName;
/**
* The value of the key (identifying the device or system) that caused the creation of this detector (instance).
*/
keyValue?: KeyValue;
/**
* The version of the detector model that created this detector (instance).
*/
detectorModelVersion?: DetectorModelVersion;
/**
* The current state of the detector (instance).
*/
state?: DetectorStateSummary;
/**
* The time the detector (instance) was created.
*/
creationTime?: Timestamp;
/**
* The time the detector (instance) was last updated.
*/
lastUpdateTime?: Timestamp;
}
export type ErrorCode = "ResourceNotFoundException"|"InvalidRequestException"|"InternalFailureException"|"ServiceUnavailableException"|"ThrottlingException"|string;
export type ErrorMessage = string;
export type InputName = string;
export type KeyValue = string;
export interface ListDetectorsRequest {
/**
* The name of the detector model whose detectors (instances) are listed.
*/
detectorModelName: DetectorModelName;
/**
* A filter that limits results to those detectors (instances) in the given state.
*/
stateName?: StateName;
/**
* The token for the next set of results.
*/
nextToken?: NextToken;
/**
* The maximum number of results to return at one time.
*/
maxResults?: MaxResults;
}
export interface ListDetectorsResponse {
/**
* A list of summary information about the detectors (instances).
*/
detectorSummaries?: DetectorSummaries;
/**
* A token to retrieve the next set of results, or null if there are no additional results.
*/
nextToken?: NextToken;
}
export type MaxResults = number;
export interface Message {
/**
* The ID to assign to the message. Within each batch sent, each "messageId" must be unique.
*/
messageId: MessageId;
/**
* The name of the input into which the message payload is transformed.
*/
inputName: InputName;
/**
* The payload of the message. This can be a JSON string or a Base-64-encoded string representing binary data (in which case you must decode it).
*/
payload: Payload;
}
export type MessageId = string;
export type Messages = Message[];
export type NextToken = string;
export type Payload = Buffer|Uint8Array|Blob|string;
export type Seconds = number;
export type StateName = string;
export interface Timer {
/**
* The name of the timer.
*/
name: TimerName;
/**
* The number of seconds which have elapsed on the timer.
*/
timestamp: Timestamp;
}
export interface TimerDefinition {
/**
* The name of the timer.
*/
name: TimerName;
/**
* The new setting of the timer (the number of seconds before the timer elapses).
*/
seconds: Seconds;
}
export type TimerDefinitions = TimerDefinition[];
export type TimerName = string;
export type Timers = Timer[];
export type Timestamp = Date;
export interface UpdateDetectorRequest {
/**
* The ID to assign to the detector update "message". Each "messageId" must be unique within each batch sent.
*/
messageId: MessageId;
/**
* The name of the detector model that created the detectors (instances).
*/
detectorModelName: DetectorModelName;
/**
* The value of the input key attribute (identifying the device or system) that caused the creation of this detector (instance).
*/
keyValue?: KeyValue;
/**
* The new state, variable values, and timer settings of the detector (instance).
*/
state: DetectorStateDefinition;
}
export type UpdateDetectorRequests = UpdateDetectorRequest[];
export interface Variable {
/**
* The name of the variable.
*/
name: VariableName;
/**
* The current value of the variable.
*/
value: VariableValue;
}
export interface VariableDefinition {
/**
* The name of the variable.
*/
name: VariableName;
/**
* The new value of the variable.
*/
value: VariableValue;
}
export type VariableDefinitions = VariableDefinition[];
export type VariableName = string;
export type VariableValue = string;
export type Variables = Variable[];
/**
* 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-10-23"|"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 IoTEventsData client.
*/
export import Types = IoTEventsData;
}
export = IoTEventsData;