iotsecuretunneling.d.ts
12.5 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
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 IoTSecureTunneling extends Service {
/**
* Constructs a service object. This object has one method for each API operation.
*/
constructor(options?: IoTSecureTunneling.Types.ClientConfiguration)
config: Config & IoTSecureTunneling.Types.ClientConfiguration;
/**
* Closes a tunnel identified by the unique tunnel id. When a CloseTunnel request is received, we close the WebSocket connections between the client and proxy server so no data can be transmitted.
*/
closeTunnel(params: IoTSecureTunneling.Types.CloseTunnelRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.CloseTunnelResponse) => void): Request<IoTSecureTunneling.Types.CloseTunnelResponse, AWSError>;
/**
* Closes a tunnel identified by the unique tunnel id. When a CloseTunnel request is received, we close the WebSocket connections between the client and proxy server so no data can be transmitted.
*/
closeTunnel(callback?: (err: AWSError, data: IoTSecureTunneling.Types.CloseTunnelResponse) => void): Request<IoTSecureTunneling.Types.CloseTunnelResponse, AWSError>;
/**
* Gets information about a tunnel identified by the unique tunnel id.
*/
describeTunnel(params: IoTSecureTunneling.Types.DescribeTunnelRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.DescribeTunnelResponse) => void): Request<IoTSecureTunneling.Types.DescribeTunnelResponse, AWSError>;
/**
* Gets information about a tunnel identified by the unique tunnel id.
*/
describeTunnel(callback?: (err: AWSError, data: IoTSecureTunneling.Types.DescribeTunnelResponse) => void): Request<IoTSecureTunneling.Types.DescribeTunnelResponse, AWSError>;
/**
* Lists the tags for the specified resource.
*/
listTagsForResource(params: IoTSecureTunneling.Types.ListTagsForResourceRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.ListTagsForResourceResponse) => void): Request<IoTSecureTunneling.Types.ListTagsForResourceResponse, AWSError>;
/**
* Lists the tags for the specified resource.
*/
listTagsForResource(callback?: (err: AWSError, data: IoTSecureTunneling.Types.ListTagsForResourceResponse) => void): Request<IoTSecureTunneling.Types.ListTagsForResourceResponse, AWSError>;
/**
* List all tunnels for an AWS account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels.
*/
listTunnels(params: IoTSecureTunneling.Types.ListTunnelsRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.ListTunnelsResponse) => void): Request<IoTSecureTunneling.Types.ListTunnelsResponse, AWSError>;
/**
* List all tunnels for an AWS account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels.
*/
listTunnels(callback?: (err: AWSError, data: IoTSecureTunneling.Types.ListTunnelsResponse) => void): Request<IoTSecureTunneling.Types.ListTunnelsResponse, AWSError>;
/**
* Creates a new tunnel, and returns two client access tokens for clients to use to connect to the AWS IoT Secure Tunneling proxy server. .
*/
openTunnel(params: IoTSecureTunneling.Types.OpenTunnelRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.OpenTunnelResponse) => void): Request<IoTSecureTunneling.Types.OpenTunnelResponse, AWSError>;
/**
* Creates a new tunnel, and returns two client access tokens for clients to use to connect to the AWS IoT Secure Tunneling proxy server. .
*/
openTunnel(callback?: (err: AWSError, data: IoTSecureTunneling.Types.OpenTunnelResponse) => void): Request<IoTSecureTunneling.Types.OpenTunnelResponse, AWSError>;
/**
* A resource tag.
*/
tagResource(params: IoTSecureTunneling.Types.TagResourceRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.TagResourceResponse) => void): Request<IoTSecureTunneling.Types.TagResourceResponse, AWSError>;
/**
* A resource tag.
*/
tagResource(callback?: (err: AWSError, data: IoTSecureTunneling.Types.TagResourceResponse) => void): Request<IoTSecureTunneling.Types.TagResourceResponse, AWSError>;
/**
* Removes a tag from a resource.
*/
untagResource(params: IoTSecureTunneling.Types.UntagResourceRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.UntagResourceResponse) => void): Request<IoTSecureTunneling.Types.UntagResourceResponse, AWSError>;
/**
* Removes a tag from a resource.
*/
untagResource(callback?: (err: AWSError, data: IoTSecureTunneling.Types.UntagResourceResponse) => void): Request<IoTSecureTunneling.Types.UntagResourceResponse, AWSError>;
}
declare namespace IoTSecureTunneling {
export type AmazonResourceName = string;
export type ClientAccessToken = string;
export interface CloseTunnelRequest {
/**
* The ID of the tunnel to close.
*/
tunnelId: TunnelId;
/**
* When set to true, AWS IoT Secure Tunneling deletes the tunnel data immediately.
*/
delete?: DeleteFlag;
}
export interface CloseTunnelResponse {
}
export interface ConnectionState {
/**
* The connection status of the tunnel. Valid values are CONNECTED and DISCONNECTED.
*/
status?: ConnectionStatus;
/**
* The last time the connection status was updated.
*/
lastUpdatedAt?: DateType;
}
export type ConnectionStatus = "CONNECTED"|"DISCONNECTED"|string;
export type DateType = Date;
export type DeleteFlag = boolean;
export interface DescribeTunnelRequest {
/**
* The tunnel to describe.
*/
tunnelId: TunnelId;
}
export interface DescribeTunnelResponse {
/**
* The tunnel being described.
*/
tunnel?: Tunnel;
}
export type Description = string;
export interface DestinationConfig {
/**
* The name of the IoT thing to which you want to connect.
*/
thingName: ThingName;
/**
* A list of service names that identity the target application. Currently, you can only specify a single name. The AWS IoT client running on the destination device reads this value and uses it to look up a port or an IP address and a port. The AWS IoT client instantiates the local proxy which uses this information to connect to the destination application.
*/
services: ServiceList;
}
export interface ListTagsForResourceRequest {
/**
* The resource ARN.
*/
resourceArn: AmazonResourceName;
}
export interface ListTagsForResourceResponse {
/**
* The tags for the specified resource.
*/
tags?: TagList;
}
export interface ListTunnelsRequest {
/**
* The name of the IoT thing associated with the destination device.
*/
thingName?: ThingName;
/**
* The maximum number of results to return at once.
*/
maxResults?: MaxResults;
/**
* A token to retrieve the next set of results.
*/
nextToken?: NextToken;
}
export interface ListTunnelsResponse {
/**
* A short description of the tunnels in an AWS account.
*/
tunnelSummaries?: TunnelSummaryList;
/**
* A token to used to retrieve the next set of results.
*/
nextToken?: NextToken;
}
export type MaxResults = number;
export type NextToken = string;
export interface OpenTunnelRequest {
/**
* A short text description of the tunnel.
*/
description?: Description;
/**
* A collection of tag metadata.
*/
tags?: TagList;
/**
* The destination configuration for the OpenTunnel request.
*/
destinationConfig?: DestinationConfig;
/**
* Timeout configuration for a tunnel.
*/
timeoutConfig?: TimeoutConfig;
}
export interface OpenTunnelResponse {
/**
* A unique alpha-numeric tunnel ID.
*/
tunnelId?: TunnelId;
/**
* The Amazon Resource Name for the tunnel. The tunnel ARN format is arn:aws:tunnel:<region>:<account-id>:tunnel/<tunnel-id>
*/
tunnelArn?: TunnelArn;
/**
* The access token the source local proxy uses to connect to AWS IoT Secure Tunneling.
*/
sourceAccessToken?: ClientAccessToken;
/**
* The access token the destination local proxy uses to connect to AWS IoT Secure Tunneling.
*/
destinationAccessToken?: ClientAccessToken;
}
export type Service = string;
export type ServiceList = Service[];
export interface Tag {
/**
* The key of the tag.
*/
key: TagKey;
/**
* The value of the tag.
*/
value: TagValue;
}
export type TagKey = string;
export type TagKeyList = TagKey[];
export type TagList = Tag[];
export interface TagResourceRequest {
/**
* The ARN of the resource.
*/
resourceArn: AmazonResourceName;
/**
* The tags for the resource.
*/
tags: TagList;
}
export interface TagResourceResponse {
}
export type TagValue = string;
export type ThingName = string;
export interface TimeoutConfig {
/**
* The maximum amount of time (in minutes) a tunnel can remain open. If not specified, maxLifetimeTimeoutMinutes defaults to 720 minutes. Valid values are from 1 minute to 12 hours (720 minutes)
*/
maxLifetimeTimeoutMinutes?: TimeoutInMin;
}
export type TimeoutInMin = number;
export interface Tunnel {
/**
* A unique alpha-numeric ID that identifies a tunnel.
*/
tunnelId?: TunnelId;
/**
* The Amazon Resource Name (ARN) of a tunnel. The tunnel ARN format is arn:aws:tunnel:<region>:<account-id>:tunnel/<tunnel-id>
*/
tunnelArn?: TunnelArn;
/**
* The status of a tunnel. Valid values are: Open and Closed.
*/
status?: TunnelStatus;
/**
* The connection state of the source application.
*/
sourceConnectionState?: ConnectionState;
/**
* The connection state of the destination application.
*/
destinationConnectionState?: ConnectionState;
/**
* A description of the tunnel.
*/
description?: Description;
/**
* The destination configuration that specifies the thing name of the destination device and a service name that the local proxy uses to connect to the destination application.
*/
destinationConfig?: DestinationConfig;
/**
* Timeout configuration for the tunnel.
*/
timeoutConfig?: TimeoutConfig;
/**
* A list of tag metadata associated with the secure tunnel.
*/
tags?: TagList;
/**
* The time when the tunnel was created.
*/
createdAt?: DateType;
/**
* The last time the tunnel was updated.
*/
lastUpdatedAt?: DateType;
}
export type TunnelArn = string;
export type TunnelId = string;
export type TunnelStatus = "OPEN"|"CLOSED"|string;
export interface TunnelSummary {
/**
* The unique alpha-numeric identifier for the tunnel.
*/
tunnelId?: TunnelId;
/**
* The Amazon Resource Name of the tunnel. The tunnel ARN format is arn:aws:tunnel:<region>:<account-id>:tunnel/<tunnel-id>
*/
tunnelArn?: TunnelArn;
/**
* The status of a tunnel. Valid values are: Open and Closed.
*/
status?: TunnelStatus;
/**
* A description of the tunnel.
*/
description?: Description;
/**
* The time the tunnel was created.
*/
createdAt?: DateType;
/**
* The time the tunnel was last updated.
*/
lastUpdatedAt?: DateType;
}
export type TunnelSummaryList = TunnelSummary[];
export interface UntagResourceRequest {
/**
* The resource ARN.
*/
resourceArn: AmazonResourceName;
/**
* The keys of the tags to remove.
*/
tagKeys: TagKeyList;
}
export interface UntagResourceResponse {
}
/**
* 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-05"|"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 IoTSecureTunneling client.
*/
export import Types = IoTSecureTunneling;
}
export = IoTSecureTunneling;