UNPKG

12.8 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class IoTSecureTunneling extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: IoTSecureTunneling.Types.ClientConfiguration)
13 config: Config & IoTSecureTunneling.Types.ClientConfiguration;
14 /**
15 * 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.
16 */
17 closeTunnel(params: IoTSecureTunneling.Types.CloseTunnelRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.CloseTunnelResponse) => void): Request<IoTSecureTunneling.Types.CloseTunnelResponse, AWSError>;
18 /**
19 * 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.
20 */
21 closeTunnel(callback?: (err: AWSError, data: IoTSecureTunneling.Types.CloseTunnelResponse) => void): Request<IoTSecureTunneling.Types.CloseTunnelResponse, AWSError>;
22 /**
23 * Gets information about a tunnel identified by the unique tunnel id.
24 */
25 describeTunnel(params: IoTSecureTunneling.Types.DescribeTunnelRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.DescribeTunnelResponse) => void): Request<IoTSecureTunneling.Types.DescribeTunnelResponse, AWSError>;
26 /**
27 * Gets information about a tunnel identified by the unique tunnel id.
28 */
29 describeTunnel(callback?: (err: AWSError, data: IoTSecureTunneling.Types.DescribeTunnelResponse) => void): Request<IoTSecureTunneling.Types.DescribeTunnelResponse, AWSError>;
30 /**
31 * Lists the tags for the specified resource.
32 */
33 listTagsForResource(params: IoTSecureTunneling.Types.ListTagsForResourceRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.ListTagsForResourceResponse) => void): Request<IoTSecureTunneling.Types.ListTagsForResourceResponse, AWSError>;
34 /**
35 * Lists the tags for the specified resource.
36 */
37 listTagsForResource(callback?: (err: AWSError, data: IoTSecureTunneling.Types.ListTagsForResourceResponse) => void): Request<IoTSecureTunneling.Types.ListTagsForResourceResponse, AWSError>;
38 /**
39 * List all tunnels for an AWS account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels.
40 */
41 listTunnels(params: IoTSecureTunneling.Types.ListTunnelsRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.ListTunnelsResponse) => void): Request<IoTSecureTunneling.Types.ListTunnelsResponse, AWSError>;
42 /**
43 * List all tunnels for an AWS account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels.
44 */
45 listTunnels(callback?: (err: AWSError, data: IoTSecureTunneling.Types.ListTunnelsResponse) => void): Request<IoTSecureTunneling.Types.ListTunnelsResponse, AWSError>;
46 /**
47 * Creates a new tunnel, and returns two client access tokens for clients to use to connect to the AWS IoT Secure Tunneling proxy server. .
48 */
49 openTunnel(params: IoTSecureTunneling.Types.OpenTunnelRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.OpenTunnelResponse) => void): Request<IoTSecureTunneling.Types.OpenTunnelResponse, AWSError>;
50 /**
51 * Creates a new tunnel, and returns two client access tokens for clients to use to connect to the AWS IoT Secure Tunneling proxy server. .
52 */
53 openTunnel(callback?: (err: AWSError, data: IoTSecureTunneling.Types.OpenTunnelResponse) => void): Request<IoTSecureTunneling.Types.OpenTunnelResponse, AWSError>;
54 /**
55 * A resource tag.
56 */
57 tagResource(params: IoTSecureTunneling.Types.TagResourceRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.TagResourceResponse) => void): Request<IoTSecureTunneling.Types.TagResourceResponse, AWSError>;
58 /**
59 * A resource tag.
60 */
61 tagResource(callback?: (err: AWSError, data: IoTSecureTunneling.Types.TagResourceResponse) => void): Request<IoTSecureTunneling.Types.TagResourceResponse, AWSError>;
62 /**
63 * Removes a tag from a resource.
64 */
65 untagResource(params: IoTSecureTunneling.Types.UntagResourceRequest, callback?: (err: AWSError, data: IoTSecureTunneling.Types.UntagResourceResponse) => void): Request<IoTSecureTunneling.Types.UntagResourceResponse, AWSError>;
66 /**
67 * Removes a tag from a resource.
68 */
69 untagResource(callback?: (err: AWSError, data: IoTSecureTunneling.Types.UntagResourceResponse) => void): Request<IoTSecureTunneling.Types.UntagResourceResponse, AWSError>;
70}
71declare namespace IoTSecureTunneling {
72 export type AmazonResourceName = string;
73 export type ClientAccessToken = string;
74 export interface CloseTunnelRequest {
75 /**
76 * The ID of the tunnel to close.
77 */
78 tunnelId: TunnelId;
79 /**
80 * When set to true, AWS IoT Secure Tunneling deletes the tunnel data immediately.
81 */
82 delete?: DeleteFlag;
83 }
84 export interface CloseTunnelResponse {
85 }
86 export interface ConnectionState {
87 /**
88 * The connection status of the tunnel. Valid values are CONNECTED and DISCONNECTED.
89 */
90 status?: ConnectionStatus;
91 /**
92 * The last time the connection status was updated.
93 */
94 lastUpdatedAt?: DateType;
95 }
96 export type ConnectionStatus = "CONNECTED"|"DISCONNECTED"|string;
97 export type DateType = Date;
98 export type DeleteFlag = boolean;
99 export interface DescribeTunnelRequest {
100 /**
101 * The tunnel to describe.
102 */
103 tunnelId: TunnelId;
104 }
105 export interface DescribeTunnelResponse {
106 /**
107 * The tunnel being described.
108 */
109 tunnel?: Tunnel;
110 }
111 export type Description = string;
112 export interface DestinationConfig {
113 /**
114 * The name of the IoT thing to which you want to connect.
115 */
116 thingName: ThingName;
117 /**
118 * 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.
119 */
120 services: ServiceList;
121 }
122 export interface ListTagsForResourceRequest {
123 /**
124 * The resource ARN.
125 */
126 resourceArn: AmazonResourceName;
127 }
128 export interface ListTagsForResourceResponse {
129 /**
130 * The tags for the specified resource.
131 */
132 tags?: TagList;
133 }
134 export interface ListTunnelsRequest {
135 /**
136 * The name of the IoT thing associated with the destination device.
137 */
138 thingName?: ThingName;
139 /**
140 * The maximum number of results to return at once.
141 */
142 maxResults?: MaxResults;
143 /**
144 * A token to retrieve the next set of results.
145 */
146 nextToken?: NextToken;
147 }
148 export interface ListTunnelsResponse {
149 /**
150 * A short description of the tunnels in an AWS account.
151 */
152 tunnelSummaries?: TunnelSummaryList;
153 /**
154 * A token to used to retrieve the next set of results.
155 */
156 nextToken?: NextToken;
157 }
158 export type MaxResults = number;
159 export type NextToken = string;
160 export interface OpenTunnelRequest {
161 /**
162 * A short text description of the tunnel.
163 */
164 description?: Description;
165 /**
166 * A collection of tag metadata.
167 */
168 tags?: TagList;
169 /**
170 * The destination configuration for the OpenTunnel request.
171 */
172 destinationConfig?: DestinationConfig;
173 /**
174 * Timeout configuration for a tunnel.
175 */
176 timeoutConfig?: TimeoutConfig;
177 }
178 export interface OpenTunnelResponse {
179 /**
180 * A unique alpha-numeric tunnel ID.
181 */
182 tunnelId?: TunnelId;
183 /**
184 * The Amazon Resource Name for the tunnel. The tunnel ARN format is arn:aws:tunnel:&lt;region&gt;:&lt;account-id&gt;:tunnel/&lt;tunnel-id&gt;
185 */
186 tunnelArn?: TunnelArn;
187 /**
188 * The access token the source local proxy uses to connect to AWS IoT Secure Tunneling.
189 */
190 sourceAccessToken?: ClientAccessToken;
191 /**
192 * The access token the destination local proxy uses to connect to AWS IoT Secure Tunneling.
193 */
194 destinationAccessToken?: ClientAccessToken;
195 }
196 export type Service = string;
197 export type ServiceList = Service[];
198 export interface Tag {
199 /**
200 * The key of the tag.
201 */
202 key: TagKey;
203 /**
204 * The value of the tag.
205 */
206 value: TagValue;
207 }
208 export type TagKey = string;
209 export type TagKeyList = TagKey[];
210 export type TagList = Tag[];
211 export interface TagResourceRequest {
212 /**
213 * The ARN of the resource.
214 */
215 resourceArn: AmazonResourceName;
216 /**
217 * The tags for the resource.
218 */
219 tags: TagList;
220 }
221 export interface TagResourceResponse {
222 }
223 export type TagValue = string;
224 export type ThingName = string;
225 export interface TimeoutConfig {
226 /**
227 * 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)
228 */
229 maxLifetimeTimeoutMinutes?: TimeoutInMin;
230 }
231 export type TimeoutInMin = number;
232 export interface Tunnel {
233 /**
234 * A unique alpha-numeric ID that identifies a tunnel.
235 */
236 tunnelId?: TunnelId;
237 /**
238 * The Amazon Resource Name (ARN) of a tunnel. The tunnel ARN format is arn:aws:tunnel:&lt;region&gt;:&lt;account-id&gt;:tunnel/&lt;tunnel-id&gt;
239 */
240 tunnelArn?: TunnelArn;
241 /**
242 * The status of a tunnel. Valid values are: Open and Closed.
243 */
244 status?: TunnelStatus;
245 /**
246 * The connection state of the source application.
247 */
248 sourceConnectionState?: ConnectionState;
249 /**
250 * The connection state of the destination application.
251 */
252 destinationConnectionState?: ConnectionState;
253 /**
254 * A description of the tunnel.
255 */
256 description?: Description;
257 /**
258 * 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.
259 */
260 destinationConfig?: DestinationConfig;
261 /**
262 * Timeout configuration for the tunnel.
263 */
264 timeoutConfig?: TimeoutConfig;
265 /**
266 * A list of tag metadata associated with the secure tunnel.
267 */
268 tags?: TagList;
269 /**
270 * The time when the tunnel was created.
271 */
272 createdAt?: DateType;
273 /**
274 * The last time the tunnel was updated.
275 */
276 lastUpdatedAt?: DateType;
277 }
278 export type TunnelArn = string;
279 export type TunnelId = string;
280 export type TunnelStatus = "OPEN"|"CLOSED"|string;
281 export interface TunnelSummary {
282 /**
283 * The unique alpha-numeric identifier for the tunnel.
284 */
285 tunnelId?: TunnelId;
286 /**
287 * The Amazon Resource Name of the tunnel. The tunnel ARN format is arn:aws:tunnel:&lt;region&gt;:&lt;account-id&gt;:tunnel/&lt;tunnel-id&gt;
288 */
289 tunnelArn?: TunnelArn;
290 /**
291 * The status of a tunnel. Valid values are: Open and Closed.
292 */
293 status?: TunnelStatus;
294 /**
295 * A description of the tunnel.
296 */
297 description?: Description;
298 /**
299 * The time the tunnel was created.
300 */
301 createdAt?: DateType;
302 /**
303 * The time the tunnel was last updated.
304 */
305 lastUpdatedAt?: DateType;
306 }
307 export type TunnelSummaryList = TunnelSummary[];
308 export interface UntagResourceRequest {
309 /**
310 * The resource ARN.
311 */
312 resourceArn: AmazonResourceName;
313 /**
314 * The keys of the tags to remove.
315 */
316 tagKeys: TagKeyList;
317 }
318 export interface UntagResourceResponse {
319 }
320 /**
321 * 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.
322 */
323 export type apiVersion = "2018-10-05"|"latest"|string;
324 export interface ClientApiVersions {
325 /**
326 * 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.
327 */
328 apiVersion?: apiVersion;
329 }
330 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
331 /**
332 * Contains interfaces for use with the IoTSecureTunneling client.
333 */
334 export import Types = IoTSecureTunneling;
335}
336export = IoTSecureTunneling;