@aws-sdk/client-iotsecuretunneling 3.82.0 → 3.84.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 (29) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +5 -5
  3. package/dist-cjs/IoTSecureTunneling.js +15 -0
  4. package/dist-cjs/commands/RotateTunnelAccessTokenCommand.js +36 -0
  5. package/dist-cjs/commands/index.js +1 -0
  6. package/dist-cjs/models/models_0.js +21 -1
  7. package/dist-cjs/protocols/Aws_json1_1.js +64 -1
  8. package/dist-es/IoTSecureTunneling.js +15 -0
  9. package/dist-es/commands/RotateTunnelAccessTokenCommand.js +39 -0
  10. package/dist-es/commands/index.js +1 -0
  11. package/dist-es/models/models_0.js +14 -0
  12. package/dist-es/protocols/Aws_json1_1.js +74 -0
  13. package/dist-types/IoTSecureTunneling.d.ts +26 -7
  14. package/dist-types/IoTSecureTunnelingClient.d.ts +8 -7
  15. package/dist-types/commands/CloseTunnelCommand.d.ts +1 -0
  16. package/dist-types/commands/DescribeTunnelCommand.d.ts +1 -0
  17. package/dist-types/commands/ListTunnelsCommand.d.ts +2 -1
  18. package/dist-types/commands/OpenTunnelCommand.d.ts +2 -1
  19. package/dist-types/commands/RotateTunnelAccessTokenCommand.d.ts +43 -0
  20. package/dist-types/commands/index.d.ts +1 -0
  21. package/dist-types/models/models_0.d.ts +63 -19
  22. package/dist-types/protocols/Aws_json1_1.d.ts +3 -0
  23. package/dist-types/ts3.4/IoTSecureTunneling.d.ts +5 -0
  24. package/dist-types/ts3.4/IoTSecureTunnelingClient.d.ts +3 -2
  25. package/dist-types/ts3.4/commands/RotateTunnelAccessTokenCommand.d.ts +17 -0
  26. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  27. package/dist-types/ts3.4/models/models_0.d.ts +29 -0
  28. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +3 -0
  29. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.84.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.83.0...v3.84.0) (2022-05-04)
7
+
8
+
9
+ ### Features
10
+
11
+ * **client-iotsecuretunneling:** This release introduces a new API RotateTunnelAccessToken that allow revoking the existing tokens and generate new tokens ([d77322a](https://github.com/aws/aws-sdk-js-v3/commit/d77322a3d86a528f7af55c7d048f50d8a78766d2))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.82.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.81.0...v3.82.0) (2022-05-02)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-iotsecuretunneling
package/README.md CHANGED
@@ -7,12 +7,12 @@
7
7
 
8
8
  AWS SDK for JavaScript IoTSecureTunneling Client for Node.js, Browser and React Native.
9
9
 
10
- <fullname>AWS IoT Secure Tunneling</fullname>
10
+ <fullname>IoT Secure Tunneling</fullname>
11
11
 
12
- <p>AWS IoT Secure Tunnling enables you to create remote connections to devices
13
- deployed in the field.</p>
14
-
15
- <p>For more information about how AWS IoT Secure Tunneling works, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/secure-tunneling.html">AWS IoT Secure Tunneling</a>.</p>
12
+ <p>IoT Secure Tunneling creates remote connections to devices deployed in the
13
+ field.</p>
14
+ <p>For more information about how IoT Secure Tunneling works, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/secure-tunneling.html">IoT
15
+ Secure Tunneling</a>.</p>
16
16
 
17
17
  ## Installing
18
18
 
@@ -6,6 +6,7 @@ const DescribeTunnelCommand_1 = require("./commands/DescribeTunnelCommand");
6
6
  const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceCommand");
7
7
  const ListTunnelsCommand_1 = require("./commands/ListTunnelsCommand");
8
8
  const OpenTunnelCommand_1 = require("./commands/OpenTunnelCommand");
9
+ const RotateTunnelAccessTokenCommand_1 = require("./commands/RotateTunnelAccessTokenCommand");
9
10
  const TagResourceCommand_1 = require("./commands/TagResourceCommand");
10
11
  const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
11
12
  const IoTSecureTunnelingClient_1 = require("./IoTSecureTunnelingClient");
@@ -80,6 +81,20 @@ class IoTSecureTunneling extends IoTSecureTunnelingClient_1.IoTSecureTunnelingCl
80
81
  return this.send(command, optionsOrCb);
81
82
  }
82
83
  }
84
+ rotateTunnelAccessToken(args, optionsOrCb, cb) {
85
+ const command = new RotateTunnelAccessTokenCommand_1.RotateTunnelAccessTokenCommand(args);
86
+ if (typeof optionsOrCb === "function") {
87
+ this.send(command, optionsOrCb);
88
+ }
89
+ else if (typeof cb === "function") {
90
+ if (typeof optionsOrCb !== "object")
91
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
92
+ this.send(command, optionsOrCb || {}, cb);
93
+ }
94
+ else {
95
+ return this.send(command, optionsOrCb);
96
+ }
97
+ }
83
98
  tagResource(args, optionsOrCb, cb) {
84
99
  const command = new TagResourceCommand_1.TagResourceCommand(args);
85
100
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RotateTunnelAccessTokenCommand = void 0;
4
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const models_0_1 = require("../models/models_0");
7
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
+ class RotateTunnelAccessTokenCommand extends smithy_client_1.Command {
9
+ constructor(input) {
10
+ super();
11
+ this.input = input;
12
+ }
13
+ resolveMiddleware(clientStack, configuration, options) {
14
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
15
+ const stack = clientStack.concat(this.middlewareStack);
16
+ const { logger } = configuration;
17
+ const clientName = "IoTSecureTunnelingClient";
18
+ const commandName = "RotateTunnelAccessTokenCommand";
19
+ const handlerExecutionContext = {
20
+ logger,
21
+ clientName,
22
+ commandName,
23
+ inputFilterSensitiveLog: models_0_1.RotateTunnelAccessTokenRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.RotateTunnelAccessTokenResponse.filterSensitiveLog,
25
+ };
26
+ const { requestHandler } = configuration;
27
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
28
+ }
29
+ serialize(input, context) {
30
+ return (0, Aws_json1_1_1.serializeAws_json1_1RotateTunnelAccessTokenCommand)(input, context);
31
+ }
32
+ deserialize(output, context) {
33
+ return (0, Aws_json1_1_1.deserializeAws_json1_1RotateTunnelAccessTokenCommand)(output, context);
34
+ }
35
+ }
36
+ exports.RotateTunnelAccessTokenCommand = RotateTunnelAccessTokenCommand;
@@ -6,5 +6,6 @@ tslib_1.__exportStar(require("./DescribeTunnelCommand"), exports);
6
6
  tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
7
7
  tslib_1.__exportStar(require("./ListTunnelsCommand"), exports);
8
8
  tslib_1.__exportStar(require("./OpenTunnelCommand"), exports);
9
+ tslib_1.__exportStar(require("./RotateTunnelAccessTokenCommand"), exports);
9
10
  tslib_1.__exportStar(require("./TagResourceCommand"), exports);
10
11
  tslib_1.__exportStar(require("./UntagResourceCommand"), exports);
@@ -1,8 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.OpenTunnelResponse = exports.OpenTunnelRequest = exports.LimitExceededException = exports.ListTunnelsResponse = exports.TunnelSummary = exports.ListTunnelsRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.DescribeTunnelResponse = exports.Tunnel = exports.TimeoutConfig = exports.Tag = exports.TunnelStatus = exports.DestinationConfig = exports.DescribeTunnelRequest = exports.ConnectionState = exports.ConnectionStatus = exports.ResourceNotFoundException = exports.CloseTunnelResponse = exports.CloseTunnelRequest = void 0;
3
+ exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.RotateTunnelAccessTokenResponse = exports.RotateTunnelAccessTokenRequest = exports.OpenTunnelResponse = exports.OpenTunnelRequest = exports.LimitExceededException = exports.ListTunnelsResponse = exports.TunnelSummary = exports.ListTunnelsRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.DescribeTunnelResponse = exports.Tunnel = exports.TimeoutConfig = exports.Tag = exports.TunnelStatus = exports.DestinationConfig = exports.DescribeTunnelRequest = exports.ConnectionState = exports.ConnectionStatus = exports.ResourceNotFoundException = exports.CloseTunnelResponse = exports.CloseTunnelRequest = exports.ClientMode = void 0;
4
4
  const smithy_client_1 = require("@aws-sdk/smithy-client");
5
5
  const IoTSecureTunnelingServiceException_1 = require("./IoTSecureTunnelingServiceException");
6
+ var ClientMode;
7
+ (function (ClientMode) {
8
+ ClientMode["ALL"] = "ALL";
9
+ ClientMode["DESTINATION"] = "DESTINATION";
10
+ ClientMode["SOURCE"] = "SOURCE";
11
+ })(ClientMode = exports.ClientMode || (exports.ClientMode = {}));
6
12
  var CloseTunnelRequest;
7
13
  (function (CloseTunnelRequest) {
8
14
  CloseTunnelRequest.filterSensitiveLog = (obj) => ({
@@ -137,6 +143,20 @@ var OpenTunnelResponse;
137
143
  ...(obj.destinationAccessToken && { destinationAccessToken: smithy_client_1.SENSITIVE_STRING }),
138
144
  });
139
145
  })(OpenTunnelResponse = exports.OpenTunnelResponse || (exports.OpenTunnelResponse = {}));
146
+ var RotateTunnelAccessTokenRequest;
147
+ (function (RotateTunnelAccessTokenRequest) {
148
+ RotateTunnelAccessTokenRequest.filterSensitiveLog = (obj) => ({
149
+ ...obj,
150
+ });
151
+ })(RotateTunnelAccessTokenRequest = exports.RotateTunnelAccessTokenRequest || (exports.RotateTunnelAccessTokenRequest = {}));
152
+ var RotateTunnelAccessTokenResponse;
153
+ (function (RotateTunnelAccessTokenResponse) {
154
+ RotateTunnelAccessTokenResponse.filterSensitiveLog = (obj) => ({
155
+ ...obj,
156
+ ...(obj.sourceAccessToken && { sourceAccessToken: smithy_client_1.SENSITIVE_STRING }),
157
+ ...(obj.destinationAccessToken && { destinationAccessToken: smithy_client_1.SENSITIVE_STRING }),
158
+ });
159
+ })(RotateTunnelAccessTokenResponse = exports.RotateTunnelAccessTokenResponse || (exports.RotateTunnelAccessTokenResponse = {}));
140
160
  var TagResourceRequest;
141
161
  (function (TagResourceRequest) {
142
162
  TagResourceRequest.filterSensitiveLog = (obj) => ({
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1OpenTunnelCommand = exports.deserializeAws_json1_1ListTunnelsCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1DescribeTunnelCommand = exports.deserializeAws_json1_1CloseTunnelCommand = exports.serializeAws_json1_1UntagResourceCommand = exports.serializeAws_json1_1TagResourceCommand = exports.serializeAws_json1_1OpenTunnelCommand = exports.serializeAws_json1_1ListTunnelsCommand = exports.serializeAws_json1_1ListTagsForResourceCommand = exports.serializeAws_json1_1DescribeTunnelCommand = exports.serializeAws_json1_1CloseTunnelCommand = void 0;
3
+ exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1RotateTunnelAccessTokenCommand = exports.deserializeAws_json1_1OpenTunnelCommand = exports.deserializeAws_json1_1ListTunnelsCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1DescribeTunnelCommand = exports.deserializeAws_json1_1CloseTunnelCommand = exports.serializeAws_json1_1UntagResourceCommand = exports.serializeAws_json1_1TagResourceCommand = exports.serializeAws_json1_1RotateTunnelAccessTokenCommand = exports.serializeAws_json1_1OpenTunnelCommand = exports.serializeAws_json1_1ListTunnelsCommand = exports.serializeAws_json1_1ListTagsForResourceCommand = exports.serializeAws_json1_1DescribeTunnelCommand = exports.serializeAws_json1_1CloseTunnelCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const IoTSecureTunnelingServiceException_1 = require("../models/IoTSecureTunnelingServiceException");
@@ -55,6 +55,16 @@ const serializeAws_json1_1OpenTunnelCommand = async (input, context) => {
55
55
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
56
  };
57
57
  exports.serializeAws_json1_1OpenTunnelCommand = serializeAws_json1_1OpenTunnelCommand;
58
+ const serializeAws_json1_1RotateTunnelAccessTokenCommand = async (input, context) => {
59
+ const headers = {
60
+ "content-type": "application/x-amz-json-1.1",
61
+ "x-amz-target": "IoTSecuredTunneling.RotateTunnelAccessToken",
62
+ };
63
+ let body;
64
+ body = JSON.stringify(serializeAws_json1_1RotateTunnelAccessTokenRequest(input, context));
65
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
66
+ };
67
+ exports.serializeAws_json1_1RotateTunnelAccessTokenCommand = serializeAws_json1_1RotateTunnelAccessTokenCommand;
58
68
  const serializeAws_json1_1TagResourceCommand = async (input, context) => {
59
69
  const headers = {
60
70
  "content-type": "application/x-amz-json-1.1",
@@ -252,6 +262,42 @@ const deserializeAws_json1_1OpenTunnelCommandError = async (output, context) =>
252
262
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
253
263
  }
254
264
  };
265
+ const deserializeAws_json1_1RotateTunnelAccessTokenCommand = async (output, context) => {
266
+ if (output.statusCode >= 300) {
267
+ return deserializeAws_json1_1RotateTunnelAccessTokenCommandError(output, context);
268
+ }
269
+ const data = await parseBody(output.body, context);
270
+ let contents = {};
271
+ contents = deserializeAws_json1_1RotateTunnelAccessTokenResponse(data, context);
272
+ const response = {
273
+ $metadata: deserializeMetadata(output),
274
+ ...contents,
275
+ };
276
+ return Promise.resolve(response);
277
+ };
278
+ exports.deserializeAws_json1_1RotateTunnelAccessTokenCommand = deserializeAws_json1_1RotateTunnelAccessTokenCommand;
279
+ const deserializeAws_json1_1RotateTunnelAccessTokenCommandError = async (output, context) => {
280
+ const parsedOutput = {
281
+ ...output,
282
+ body: await parseBody(output.body, context),
283
+ };
284
+ let response;
285
+ let errorCode = "UnknownError";
286
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
287
+ switch (errorCode) {
288
+ case "ResourceNotFoundException":
289
+ case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException":
290
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
291
+ default:
292
+ const parsedBody = parsedOutput.body;
293
+ response = new IoTSecureTunnelingServiceException_1.IoTSecureTunnelingServiceException({
294
+ name: parsedBody.code || parsedBody.Code || errorCode,
295
+ $fault: "client",
296
+ $metadata: deserializeMetadata(output),
297
+ });
298
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
299
+ }
300
+ };
255
301
  const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
256
302
  if (output.statusCode >= 300) {
257
303
  return deserializeAws_json1_1TagResourceCommandError(output, context);
@@ -386,6 +432,16 @@ const serializeAws_json1_1OpenTunnelRequest = (input, context) => {
386
432
  }),
387
433
  };
388
434
  };
435
+ const serializeAws_json1_1RotateTunnelAccessTokenRequest = (input, context) => {
436
+ return {
437
+ ...(input.clientMode !== undefined && input.clientMode !== null && { clientMode: input.clientMode }),
438
+ ...(input.destinationConfig !== undefined &&
439
+ input.destinationConfig !== null && {
440
+ destinationConfig: serializeAws_json1_1DestinationConfig(input.destinationConfig, context),
441
+ }),
442
+ ...(input.tunnelId !== undefined && input.tunnelId !== null && { tunnelId: input.tunnelId }),
443
+ };
444
+ };
389
445
  const serializeAws_json1_1ServiceList = (input, context) => {
390
446
  return input
391
447
  .filter((e) => e != null)
@@ -500,6 +556,13 @@ const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
500
556
  message: (0, smithy_client_1.expectString)(output.message),
501
557
  };
502
558
  };
559
+ const deserializeAws_json1_1RotateTunnelAccessTokenResponse = (output, context) => {
560
+ return {
561
+ destinationAccessToken: (0, smithy_client_1.expectString)(output.destinationAccessToken),
562
+ sourceAccessToken: (0, smithy_client_1.expectString)(output.sourceAccessToken),
563
+ tunnelArn: (0, smithy_client_1.expectString)(output.tunnelArn),
564
+ };
565
+ };
503
566
  const deserializeAws_json1_1ServiceList = (output, context) => {
504
567
  const retVal = (output || [])
505
568
  .filter((e) => e != null)
@@ -4,6 +4,7 @@ import { DescribeTunnelCommand, } from "./commands/DescribeTunnelCommand";
4
4
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
5
5
  import { ListTunnelsCommand } from "./commands/ListTunnelsCommand";
6
6
  import { OpenTunnelCommand } from "./commands/OpenTunnelCommand";
7
+ import { RotateTunnelAccessTokenCommand, } from "./commands/RotateTunnelAccessTokenCommand";
7
8
  import { TagResourceCommand } from "./commands/TagResourceCommand";
8
9
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
9
10
  import { IoTSecureTunnelingClient } from "./IoTSecureTunnelingClient";
@@ -82,6 +83,20 @@ var IoTSecureTunneling = (function (_super) {
82
83
  return this.send(command, optionsOrCb);
83
84
  }
84
85
  };
86
+ IoTSecureTunneling.prototype.rotateTunnelAccessToken = function (args, optionsOrCb, cb) {
87
+ var command = new RotateTunnelAccessTokenCommand(args);
88
+ if (typeof optionsOrCb === "function") {
89
+ this.send(command, optionsOrCb);
90
+ }
91
+ else if (typeof cb === "function") {
92
+ if (typeof optionsOrCb !== "object")
93
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
94
+ this.send(command, optionsOrCb || {}, cb);
95
+ }
96
+ else {
97
+ return this.send(command, optionsOrCb);
98
+ }
99
+ };
85
100
  IoTSecureTunneling.prototype.tagResource = function (args, optionsOrCb, cb) {
86
101
  var command = new TagResourceCommand(args);
87
102
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { RotateTunnelAccessTokenRequest, RotateTunnelAccessTokenResponse } from "../models/models_0";
5
+ import { deserializeAws_json1_1RotateTunnelAccessTokenCommand, serializeAws_json1_1RotateTunnelAccessTokenCommand, } from "../protocols/Aws_json1_1";
6
+ var RotateTunnelAccessTokenCommand = (function (_super) {
7
+ __extends(RotateTunnelAccessTokenCommand, _super);
8
+ function RotateTunnelAccessTokenCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ RotateTunnelAccessTokenCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "IoTSecureTunnelingClient";
18
+ var commandName = "RotateTunnelAccessTokenCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: RotateTunnelAccessTokenRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: RotateTunnelAccessTokenResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ RotateTunnelAccessTokenCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_json1_1RotateTunnelAccessTokenCommand(input, context);
33
+ };
34
+ RotateTunnelAccessTokenCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_json1_1RotateTunnelAccessTokenCommand(output, context);
36
+ };
37
+ return RotateTunnelAccessTokenCommand;
38
+ }($Command));
39
+ export { RotateTunnelAccessTokenCommand };
@@ -3,5 +3,6 @@ export * from "./DescribeTunnelCommand";
3
3
  export * from "./ListTagsForResourceCommand";
4
4
  export * from "./ListTunnelsCommand";
5
5
  export * from "./OpenTunnelCommand";
6
+ export * from "./RotateTunnelAccessTokenCommand";
6
7
  export * from "./TagResourceCommand";
7
8
  export * from "./UntagResourceCommand";
@@ -1,6 +1,12 @@
1
1
  import { __assign, __extends } from "tslib";
2
2
  import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
3
3
  import { IoTSecureTunnelingServiceException as __BaseException } from "./IoTSecureTunnelingServiceException";
4
+ export var ClientMode;
5
+ (function (ClientMode) {
6
+ ClientMode["ALL"] = "ALL";
7
+ ClientMode["DESTINATION"] = "DESTINATION";
8
+ ClientMode["SOURCE"] = "SOURCE";
9
+ })(ClientMode || (ClientMode = {}));
4
10
  export var CloseTunnelRequest;
5
11
  (function (CloseTunnelRequest) {
6
12
  CloseTunnelRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -99,6 +105,14 @@ export var OpenTunnelResponse;
99
105
  (function (OpenTunnelResponse) {
100
106
  OpenTunnelResponse.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.sourceAccessToken && { sourceAccessToken: SENSITIVE_STRING })), (obj.destinationAccessToken && { destinationAccessToken: SENSITIVE_STRING }))); };
101
107
  })(OpenTunnelResponse || (OpenTunnelResponse = {}));
108
+ export var RotateTunnelAccessTokenRequest;
109
+ (function (RotateTunnelAccessTokenRequest) {
110
+ RotateTunnelAccessTokenRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
111
+ })(RotateTunnelAccessTokenRequest || (RotateTunnelAccessTokenRequest = {}));
112
+ export var RotateTunnelAccessTokenResponse;
113
+ (function (RotateTunnelAccessTokenResponse) {
114
+ RotateTunnelAccessTokenResponse.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.sourceAccessToken && { sourceAccessToken: SENSITIVE_STRING })), (obj.destinationAccessToken && { destinationAccessToken: SENSITIVE_STRING }))); };
115
+ })(RotateTunnelAccessTokenResponse || (RotateTunnelAccessTokenResponse = {}));
102
116
  export var TagResourceRequest;
103
117
  (function (TagResourceRequest) {
104
118
  TagResourceRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -58,6 +58,17 @@ export var serializeAws_json1_1OpenTunnelCommand = function (input, context) { r
58
58
  return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
59
59
  });
60
60
  }); };
61
+ export var serializeAws_json1_1RotateTunnelAccessTokenCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
62
+ var headers, body;
63
+ return __generator(this, function (_a) {
64
+ headers = {
65
+ "content-type": "application/x-amz-json-1.1",
66
+ "x-amz-target": "IoTSecuredTunneling.RotateTunnelAccessToken",
67
+ };
68
+ body = JSON.stringify(serializeAws_json1_1RotateTunnelAccessTokenRequest(input, context));
69
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
70
+ });
71
+ }); };
61
72
  export var serializeAws_json1_1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
62
73
  var headers, body;
63
74
  return __generator(this, function (_a) {
@@ -325,6 +336,56 @@ var deserializeAws_json1_1OpenTunnelCommandError = function (output, context) {
325
336
  }
326
337
  });
327
338
  }); };
339
+ export var deserializeAws_json1_1RotateTunnelAccessTokenCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
340
+ var data, contents, response;
341
+ return __generator(this, function (_a) {
342
+ switch (_a.label) {
343
+ case 0:
344
+ if (output.statusCode >= 300) {
345
+ return [2, deserializeAws_json1_1RotateTunnelAccessTokenCommandError(output, context)];
346
+ }
347
+ return [4, parseBody(output.body, context)];
348
+ case 1:
349
+ data = _a.sent();
350
+ contents = {};
351
+ contents = deserializeAws_json1_1RotateTunnelAccessTokenResponse(data, context);
352
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
353
+ return [2, Promise.resolve(response)];
354
+ }
355
+ });
356
+ }); };
357
+ var deserializeAws_json1_1RotateTunnelAccessTokenCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
358
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
359
+ var _c;
360
+ return __generator(this, function (_d) {
361
+ switch (_d.label) {
362
+ case 0:
363
+ _a = [__assign({}, output)];
364
+ _c = {};
365
+ return [4, parseBody(output.body, context)];
366
+ case 1:
367
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
368
+ errorCode = "UnknownError";
369
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
370
+ _b = errorCode;
371
+ switch (_b) {
372
+ case "ResourceNotFoundException": return [3, 2];
373
+ case "com.amazonaws.iotsecuretunneling#ResourceNotFoundException": return [3, 2];
374
+ }
375
+ return [3, 4];
376
+ case 2: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
377
+ case 3: throw _d.sent();
378
+ case 4:
379
+ parsedBody = parsedOutput.body;
380
+ response = new __BaseException({
381
+ name: parsedBody.code || parsedBody.Code || errorCode,
382
+ $fault: "client",
383
+ $metadata: deserializeMetadata(output),
384
+ });
385
+ throw __decorateServiceException(response, parsedBody);
386
+ }
387
+ });
388
+ }); };
328
389
  export var deserializeAws_json1_1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
329
390
  var data, contents, response;
330
391
  return __generator(this, function (_a) {
@@ -468,6 +529,12 @@ var serializeAws_json1_1OpenTunnelRequest = function (input, context) {
468
529
  timeoutConfig: serializeAws_json1_1TimeoutConfig(input.timeoutConfig, context),
469
530
  }));
470
531
  };
532
+ var serializeAws_json1_1RotateTunnelAccessTokenRequest = function (input, context) {
533
+ return __assign(__assign(__assign({}, (input.clientMode !== undefined && input.clientMode !== null && { clientMode: input.clientMode })), (input.destinationConfig !== undefined &&
534
+ input.destinationConfig !== null && {
535
+ destinationConfig: serializeAws_json1_1DestinationConfig(input.destinationConfig, context),
536
+ })), (input.tunnelId !== undefined && input.tunnelId !== null && { tunnelId: input.tunnelId }));
537
+ };
471
538
  var serializeAws_json1_1ServiceList = function (input, context) {
472
539
  return input
473
540
  .filter(function (e) { return e != null; })
@@ -571,6 +638,13 @@ var deserializeAws_json1_1ResourceNotFoundException = function (output, context)
571
638
  message: __expectString(output.message),
572
639
  };
573
640
  };
641
+ var deserializeAws_json1_1RotateTunnelAccessTokenResponse = function (output, context) {
642
+ return {
643
+ destinationAccessToken: __expectString(output.destinationAccessToken),
644
+ sourceAccessToken: __expectString(output.sourceAccessToken),
645
+ tunnelArn: __expectString(output.tunnelArn),
646
+ };
647
+ };
574
648
  var deserializeAws_json1_1ServiceList = function (output, context) {
575
649
  var retVal = (output || [])
576
650
  .filter(function (e) { return e != null; })
@@ -4,27 +4,30 @@ import { DescribeTunnelCommandInput, DescribeTunnelCommandOutput } from "./comma
4
4
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
5
5
  import { ListTunnelsCommandInput, ListTunnelsCommandOutput } from "./commands/ListTunnelsCommand";
6
6
  import { OpenTunnelCommandInput, OpenTunnelCommandOutput } from "./commands/OpenTunnelCommand";
7
+ import { RotateTunnelAccessTokenCommandInput, RotateTunnelAccessTokenCommandOutput } from "./commands/RotateTunnelAccessTokenCommand";
7
8
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
8
9
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
9
10
  import { IoTSecureTunnelingClient } from "./IoTSecureTunnelingClient";
10
11
  /**
11
- * <fullname>AWS IoT Secure Tunneling</fullname>
12
- * <p>AWS IoT Secure Tunnling enables you to create remote connections to devices
13
- * deployed in the field.</p>
14
- *
15
- * <p>For more information about how AWS IoT Secure Tunneling works, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/secure-tunneling.html">AWS IoT Secure Tunneling</a>.</p>
12
+ * <fullname>IoT Secure Tunneling</fullname>
13
+ * <p>IoT Secure Tunneling creates remote connections to devices deployed in the
14
+ * field.</p>
15
+ * <p>For more information about how IoT Secure Tunneling works, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/secure-tunneling.html">IoT
16
+ * Secure Tunneling</a>.</p>
16
17
  */
17
18
  export declare class IoTSecureTunneling extends IoTSecureTunnelingClient {
18
19
  /**
19
20
  * <p>Closes a tunnel identified by the unique tunnel id. When a <code>CloseTunnel</code>
20
21
  * request is received, we close the WebSocket connections between the client and proxy
21
22
  * server so no data can be transmitted.</p>
23
+ * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">CloseTunnel</a> action.</p>
22
24
  */
23
25
  closeTunnel(args: CloseTunnelCommandInput, options?: __HttpHandlerOptions): Promise<CloseTunnelCommandOutput>;
24
26
  closeTunnel(args: CloseTunnelCommandInput, cb: (err: any, data?: CloseTunnelCommandOutput) => void): void;
25
27
  closeTunnel(args: CloseTunnelCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CloseTunnelCommandOutput) => void): void;
26
28
  /**
27
29
  * <p>Gets information about a tunnel identified by the unique tunnel id.</p>
30
+ * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">DescribeTunnel</a> action.</p>
28
31
  */
29
32
  describeTunnel(args: DescribeTunnelCommandInput, options?: __HttpHandlerOptions): Promise<DescribeTunnelCommandOutput>;
30
33
  describeTunnel(args: DescribeTunnelCommandInput, cb: (err: any, data?: DescribeTunnelCommandOutput) => void): void;
@@ -36,19 +39,35 @@ export declare class IoTSecureTunneling extends IoTSecureTunnelingClient {
36
39
  listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
37
40
  listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
38
41
  /**
39
- * <p>List all tunnels for an AWS account. Tunnels are listed by creation time in
42
+ * <p>List all tunnels for an Amazon Web Services account. Tunnels are listed by creation time in
40
43
  * descending order, newer tunnels will be listed before older tunnels.</p>
44
+ * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">ListTunnels</a> action.</p>
41
45
  */
42
46
  listTunnels(args: ListTunnelsCommandInput, options?: __HttpHandlerOptions): Promise<ListTunnelsCommandOutput>;
43
47
  listTunnels(args: ListTunnelsCommandInput, cb: (err: any, data?: ListTunnelsCommandOutput) => void): void;
44
48
  listTunnels(args: ListTunnelsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTunnelsCommandOutput) => void): void;
45
49
  /**
46
50
  * <p>Creates a new tunnel, and returns two client access tokens for clients to use to
47
- * connect to the AWS IoT Secure Tunneling proxy server.</p>
51
+ * connect to the IoT Secure Tunneling proxy server.</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">OpenTunnel</a> action.</p>
48
53
  */
49
54
  openTunnel(args: OpenTunnelCommandInput, options?: __HttpHandlerOptions): Promise<OpenTunnelCommandOutput>;
50
55
  openTunnel(args: OpenTunnelCommandInput, cb: (err: any, data?: OpenTunnelCommandOutput) => void): void;
51
56
  openTunnel(args: OpenTunnelCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: OpenTunnelCommandOutput) => void): void;
57
+ /**
58
+ * <p>Revokes the current client access token (CAT) and returns new CAT for clients to
59
+ * use when reconnecting to secure tunneling to access the same tunnel.</p>
60
+ * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">RotateTunnelAccessToken</a> action.</p>
61
+ * <note>
62
+ * <p>Rotating the CAT doesn't extend the tunnel duration. For example, say the tunnel
63
+ * duration is 12 hours and the tunnel has already been open for 4 hours. When you
64
+ * rotate the access tokens, the new tokens that are generated can only be used for the
65
+ * remaining 8 hours.</p>
66
+ * </note>
67
+ */
68
+ rotateTunnelAccessToken(args: RotateTunnelAccessTokenCommandInput, options?: __HttpHandlerOptions): Promise<RotateTunnelAccessTokenCommandOutput>;
69
+ rotateTunnelAccessToken(args: RotateTunnelAccessTokenCommandInput, cb: (err: any, data?: RotateTunnelAccessTokenCommandOutput) => void): void;
70
+ rotateTunnelAccessToken(args: RotateTunnelAccessTokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RotateTunnelAccessTokenCommandOutput) => void): void;
52
71
  /**
53
72
  * <p>A resource tag.</p>
54
73
  */
@@ -11,10 +11,11 @@ import { DescribeTunnelCommandInput, DescribeTunnelCommandOutput } from "./comma
11
11
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
12
12
  import { ListTunnelsCommandInput, ListTunnelsCommandOutput } from "./commands/ListTunnelsCommand";
13
13
  import { OpenTunnelCommandInput, OpenTunnelCommandOutput } from "./commands/OpenTunnelCommand";
14
+ import { RotateTunnelAccessTokenCommandInput, RotateTunnelAccessTokenCommandOutput } from "./commands/RotateTunnelAccessTokenCommand";
14
15
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
15
16
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
16
- export declare type ServiceInputTypes = CloseTunnelCommandInput | DescribeTunnelCommandInput | ListTagsForResourceCommandInput | ListTunnelsCommandInput | OpenTunnelCommandInput | TagResourceCommandInput | UntagResourceCommandInput;
17
- export declare type ServiceOutputTypes = CloseTunnelCommandOutput | DescribeTunnelCommandOutput | ListTagsForResourceCommandOutput | ListTunnelsCommandOutput | OpenTunnelCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput;
17
+ export declare type ServiceInputTypes = CloseTunnelCommandInput | DescribeTunnelCommandInput | ListTagsForResourceCommandInput | ListTunnelsCommandInput | OpenTunnelCommandInput | RotateTunnelAccessTokenCommandInput | TagResourceCommandInput | UntagResourceCommandInput;
18
+ export declare type ServiceOutputTypes = CloseTunnelCommandOutput | DescribeTunnelCommandOutput | ListTagsForResourceCommandOutput | ListTunnelsCommandOutput | OpenTunnelCommandOutput | RotateTunnelAccessTokenCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput;
18
19
  export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
19
20
  /**
20
21
  * The HTTP handler to use. Fetch in browser and Https in Nodejs.
@@ -133,11 +134,11 @@ declare type IoTSecureTunnelingClientResolvedConfigType = __SmithyResolvedConfig
133
134
  export interface IoTSecureTunnelingClientResolvedConfig extends IoTSecureTunnelingClientResolvedConfigType {
134
135
  }
135
136
  /**
136
- * <fullname>AWS IoT Secure Tunneling</fullname>
137
- * <p>AWS IoT Secure Tunnling enables you to create remote connections to devices
138
- * deployed in the field.</p>
139
- *
140
- * <p>For more information about how AWS IoT Secure Tunneling works, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/secure-tunneling.html">AWS IoT Secure Tunneling</a>.</p>
137
+ * <fullname>IoT Secure Tunneling</fullname>
138
+ * <p>IoT Secure Tunneling creates remote connections to devices deployed in the
139
+ * field.</p>
140
+ * <p>For more information about how IoT Secure Tunneling works, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/secure-tunneling.html">IoT
141
+ * Secure Tunneling</a>.</p>
141
142
  */
142
143
  export declare class IoTSecureTunnelingClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, IoTSecureTunnelingClientResolvedConfig> {
143
144
  /**
@@ -10,6 +10,7 @@ export interface CloseTunnelCommandOutput extends CloseTunnelResponse, __Metadat
10
10
  * <p>Closes a tunnel identified by the unique tunnel id. When a <code>CloseTunnel</code>
11
11
  * request is received, we close the WebSocket connections between the client and proxy
12
12
  * server so no data can be transmitted.</p>
13
+ * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">CloseTunnel</a> action.</p>
13
14
  * @example
14
15
  * Use a bare-bones client and the command you need to make an API call.
15
16
  * ```javascript
@@ -8,6 +8,7 @@ export interface DescribeTunnelCommandOutput extends DescribeTunnelResponse, __M
8
8
  }
9
9
  /**
10
10
  * <p>Gets information about a tunnel identified by the unique tunnel id.</p>
11
+ * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">DescribeTunnel</a> action.</p>
11
12
  * @example
12
13
  * Use a bare-bones client and the command you need to make an API call.
13
14
  * ```javascript
@@ -7,8 +7,9 @@ export interface ListTunnelsCommandInput extends ListTunnelsRequest {
7
7
  export interface ListTunnelsCommandOutput extends ListTunnelsResponse, __MetadataBearer {
8
8
  }
9
9
  /**
10
- * <p>List all tunnels for an AWS account. Tunnels are listed by creation time in
10
+ * <p>List all tunnels for an Amazon Web Services account. Tunnels are listed by creation time in
11
11
  * descending order, newer tunnels will be listed before older tunnels.</p>
12
+ * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">ListTunnels</a> action.</p>
12
13
  * @example
13
14
  * Use a bare-bones client and the command you need to make an API call.
14
15
  * ```javascript
@@ -8,7 +8,8 @@ export interface OpenTunnelCommandOutput extends OpenTunnelResponse, __MetadataB
8
8
  }
9
9
  /**
10
10
  * <p>Creates a new tunnel, and returns two client access tokens for clients to use to
11
- * connect to the AWS IoT Secure Tunneling proxy server.</p>
11
+ * connect to the IoT Secure Tunneling proxy server.</p>
12
+ * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">OpenTunnel</a> action.</p>
12
13
  * @example
13
14
  * Use a bare-bones client and the command you need to make an API call.
14
15
  * ```javascript
@@ -0,0 +1,43 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { IoTSecureTunnelingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTSecureTunnelingClient";
4
+ import { RotateTunnelAccessTokenRequest, RotateTunnelAccessTokenResponse } from "../models/models_0";
5
+ export interface RotateTunnelAccessTokenCommandInput extends RotateTunnelAccessTokenRequest {
6
+ }
7
+ export interface RotateTunnelAccessTokenCommandOutput extends RotateTunnelAccessTokenResponse, __MetadataBearer {
8
+ }
9
+ /**
10
+ * <p>Revokes the current client access token (CAT) and returns new CAT for clients to
11
+ * use when reconnecting to secure tunneling to access the same tunnel.</p>
12
+ * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">RotateTunnelAccessToken</a> action.</p>
13
+ * <note>
14
+ * <p>Rotating the CAT doesn't extend the tunnel duration. For example, say the tunnel
15
+ * duration is 12 hours and the tunnel has already been open for 4 hours. When you
16
+ * rotate the access tokens, the new tokens that are generated can only be used for the
17
+ * remaining 8 hours.</p>
18
+ * </note>
19
+ * @example
20
+ * Use a bare-bones client and the command you need to make an API call.
21
+ * ```javascript
22
+ * import { IoTSecureTunnelingClient, RotateTunnelAccessTokenCommand } from "@aws-sdk/client-iotsecuretunneling"; // ES Modules import
23
+ * // const { IoTSecureTunnelingClient, RotateTunnelAccessTokenCommand } = require("@aws-sdk/client-iotsecuretunneling"); // CommonJS import
24
+ * const client = new IoTSecureTunnelingClient(config);
25
+ * const command = new RotateTunnelAccessTokenCommand(input);
26
+ * const response = await client.send(command);
27
+ * ```
28
+ *
29
+ * @see {@link RotateTunnelAccessTokenCommandInput} for command's `input` shape.
30
+ * @see {@link RotateTunnelAccessTokenCommandOutput} for command's `response` shape.
31
+ * @see {@link IoTSecureTunnelingClientResolvedConfig | config} for IoTSecureTunnelingClient's `config` shape.
32
+ *
33
+ */
34
+ export declare class RotateTunnelAccessTokenCommand extends $Command<RotateTunnelAccessTokenCommandInput, RotateTunnelAccessTokenCommandOutput, IoTSecureTunnelingClientResolvedConfig> {
35
+ readonly input: RotateTunnelAccessTokenCommandInput;
36
+ constructor(input: RotateTunnelAccessTokenCommandInput);
37
+ /**
38
+ * @internal
39
+ */
40
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: IoTSecureTunnelingClientResolvedConfig, options?: __HttpHandlerOptions): Handler<RotateTunnelAccessTokenCommandInput, RotateTunnelAccessTokenCommandOutput>;
41
+ private serialize;
42
+ private deserialize;
43
+ }
@@ -3,5 +3,6 @@ export * from "./DescribeTunnelCommand";
3
3
  export * from "./ListTagsForResourceCommand";
4
4
  export * from "./ListTunnelsCommand";
5
5
  export * from "./OpenTunnelCommand";
6
+ export * from "./RotateTunnelAccessTokenCommand";
6
7
  export * from "./TagResourceCommand";
7
8
  export * from "./UntagResourceCommand";
@@ -1,12 +1,17 @@
1
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
2
  import { IoTSecureTunnelingServiceException as __BaseException } from "./IoTSecureTunnelingServiceException";
3
+ export declare enum ClientMode {
4
+ ALL = "ALL",
5
+ DESTINATION = "DESTINATION",
6
+ SOURCE = "SOURCE"
7
+ }
3
8
  export interface CloseTunnelRequest {
4
9
  /**
5
10
  * <p>The ID of the tunnel to close.</p>
6
11
  */
7
12
  tunnelId: string | undefined;
8
13
  /**
9
- * <p>When set to true, AWS IoT Secure Tunneling deletes the tunnel data
14
+ * <p>When set to true, IoT Secure Tunneling deletes the tunnel data
10
15
  * immediately.</p>
11
16
  */
12
17
  delete?: boolean;
@@ -81,10 +86,10 @@ export interface DestinationConfig {
81
86
  */
82
87
  thingName?: string;
83
88
  /**
84
- * <p>A list of service names that identity the target application. The AWS IoT client running on the destination device reads
85
- * this value and uses it to look up a port or an IP address and a port. The AWS IoT client
86
- * instantiates the local proxy which uses this information to connect to the destination
87
- * application.</p>
89
+ * <p>A list of service names that identify the target application. The IoT client
90
+ * running on the destination device reads this value and uses it to look up a port or an
91
+ * IP address and a port. The IoT client instantiates the local proxy, which uses this
92
+ * information to connect to the destination application.</p>
88
93
  */
89
94
  services: string[] | undefined;
90
95
  }
@@ -144,9 +149,7 @@ export interface Tunnel {
144
149
  */
145
150
  tunnelId?: string;
146
151
  /**
147
- * <p>The Amazon Resource Name (ARN) of a tunnel. The tunnel ARN format is
148
- * <code>arn:aws:tunnel:<region>:<account-id>:tunnel/<tunnel-id></code>
149
- * </p>
152
+ * <p>The Amazon Resource Name (ARN) of a tunnel.</p>
150
153
  */
151
154
  tunnelArn?: string;
152
155
  /**
@@ -240,7 +243,8 @@ export interface ListTunnelsRequest {
240
243
  */
241
244
  maxResults?: number;
242
245
  /**
243
- * <p>A token to retrieve the next set of results.</p>
246
+ * <p>To retrieve the next set of results, the nextToken value from a previous response;
247
+ * otherwise null to receive the first set of results.</p>
244
248
  */
245
249
  nextToken?: string;
246
250
  }
@@ -259,9 +263,7 @@ export interface TunnelSummary {
259
263
  */
260
264
  tunnelId?: string;
261
265
  /**
262
- * <p>The Amazon Resource Name of the tunnel. The tunnel ARN format is
263
- * <code>arn:aws:tunnel:<region>:<account-id>:tunnel/<tunnel-id></code>
264
- * </p>
266
+ * <p>The Amazon Resource Name of the tunnel. </p>
265
267
  */
266
268
  tunnelArn?: string;
267
269
  /**
@@ -289,11 +291,12 @@ export declare namespace TunnelSummary {
289
291
  }
290
292
  export interface ListTunnelsResponse {
291
293
  /**
292
- * <p>A short description of the tunnels in an AWS account.</p>
294
+ * <p>A short description of the tunnels in an Amazon Web Services account.</p>
293
295
  */
294
296
  tunnelSummaries?: TunnelSummary[];
295
297
  /**
296
- * <p>A token to used to retrieve the next set of results.</p>
298
+ * <p>The token to use to get the next set of results, or null if there are no additional
299
+ * results.</p>
297
300
  */
298
301
  nextToken?: string;
299
302
  }
@@ -344,18 +347,16 @@ export interface OpenTunnelResponse {
344
347
  */
345
348
  tunnelId?: string;
346
349
  /**
347
- * <p>The Amazon Resource Name for the tunnel. The tunnel ARN format is
348
- * <code>arn:aws:tunnel:<region>:<account-id>:tunnel/<tunnel-id></code>
349
- * </p>
350
+ * <p>The Amazon Resource Name for the tunnel.</p>
350
351
  */
351
352
  tunnelArn?: string;
352
353
  /**
353
- * <p>The access token the source local proxy uses to connect to AWS IoT Secure
354
+ * <p>The access token the source local proxy uses to connect to IoT Secure
354
355
  * Tunneling.</p>
355
356
  */
356
357
  sourceAccessToken?: string;
357
358
  /**
358
- * <p>The access token the destination local proxy uses to connect to AWS IoT Secure
359
+ * <p>The access token the destination local proxy uses to connect to IoT Secure
359
360
  * Tunneling.</p>
360
361
  */
361
362
  destinationAccessToken?: string;
@@ -366,6 +367,49 @@ export declare namespace OpenTunnelResponse {
366
367
  */
367
368
  const filterSensitiveLog: (obj: OpenTunnelResponse) => any;
368
369
  }
370
+ export interface RotateTunnelAccessTokenRequest {
371
+ /**
372
+ * <p>The tunnel for which you want to rotate the access tokens.</p>
373
+ */
374
+ tunnelId: string | undefined;
375
+ /**
376
+ * <p>The mode of the client that will use the client token, which can be either the source
377
+ * or destination, or both source and destination.</p>
378
+ */
379
+ clientMode: ClientMode | string | undefined;
380
+ /**
381
+ * <p>The destination configuration.</p>
382
+ */
383
+ destinationConfig?: DestinationConfig;
384
+ }
385
+ export declare namespace RotateTunnelAccessTokenRequest {
386
+ /**
387
+ * @internal
388
+ */
389
+ const filterSensitiveLog: (obj: RotateTunnelAccessTokenRequest) => any;
390
+ }
391
+ export interface RotateTunnelAccessTokenResponse {
392
+ /**
393
+ * <p>The Amazon Resource Name for the tunnel.</p>
394
+ */
395
+ tunnelArn?: string;
396
+ /**
397
+ * <p>The client access token that the source local proxy uses to connect to IoT Secure
398
+ * Tunneling.</p>
399
+ */
400
+ sourceAccessToken?: string;
401
+ /**
402
+ * <p>The client access token that the destination local proxy uses to connect to IoT
403
+ * Secure Tunneling.</p>
404
+ */
405
+ destinationAccessToken?: string;
406
+ }
407
+ export declare namespace RotateTunnelAccessTokenResponse {
408
+ /**
409
+ * @internal
410
+ */
411
+ const filterSensitiveLog: (obj: RotateTunnelAccessTokenResponse) => any;
412
+ }
369
413
  export interface TagResourceRequest {
370
414
  /**
371
415
  * <p>The ARN of the resource.</p>
@@ -5,6 +5,7 @@ import { DescribeTunnelCommandInput, DescribeTunnelCommandOutput } from "../comm
5
5
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "../commands/ListTagsForResourceCommand";
6
6
  import { ListTunnelsCommandInput, ListTunnelsCommandOutput } from "../commands/ListTunnelsCommand";
7
7
  import { OpenTunnelCommandInput, OpenTunnelCommandOutput } from "../commands/OpenTunnelCommand";
8
+ import { RotateTunnelAccessTokenCommandInput, RotateTunnelAccessTokenCommandOutput } from "../commands/RotateTunnelAccessTokenCommand";
8
9
  import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
9
10
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
10
11
  export declare const serializeAws_json1_1CloseTunnelCommand: (input: CloseTunnelCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
@@ -12,6 +13,7 @@ export declare const serializeAws_json1_1DescribeTunnelCommand: (input: Describe
12
13
  export declare const serializeAws_json1_1ListTagsForResourceCommand: (input: ListTagsForResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
13
14
  export declare const serializeAws_json1_1ListTunnelsCommand: (input: ListTunnelsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
14
15
  export declare const serializeAws_json1_1OpenTunnelCommand: (input: OpenTunnelCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
16
+ export declare const serializeAws_json1_1RotateTunnelAccessTokenCommand: (input: RotateTunnelAccessTokenCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
15
17
  export declare const serializeAws_json1_1TagResourceCommand: (input: TagResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
16
18
  export declare const serializeAws_json1_1UntagResourceCommand: (input: UntagResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
17
19
  export declare const deserializeAws_json1_1CloseTunnelCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CloseTunnelCommandOutput>;
@@ -19,5 +21,6 @@ export declare const deserializeAws_json1_1DescribeTunnelCommand: (output: __Htt
19
21
  export declare const deserializeAws_json1_1ListTagsForResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListTagsForResourceCommandOutput>;
20
22
  export declare const deserializeAws_json1_1ListTunnelsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListTunnelsCommandOutput>;
21
23
  export declare const deserializeAws_json1_1OpenTunnelCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<OpenTunnelCommandOutput>;
24
+ export declare const deserializeAws_json1_1RotateTunnelAccessTokenCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RotateTunnelAccessTokenCommandOutput>;
22
25
  export declare const deserializeAws_json1_1TagResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<TagResourceCommandOutput>;
23
26
  export declare const deserializeAws_json1_1UntagResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UntagResourceCommandOutput>;
@@ -4,6 +4,7 @@ import { DescribeTunnelCommandInput, DescribeTunnelCommandOutput } from "./comma
4
4
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
5
5
  import { ListTunnelsCommandInput, ListTunnelsCommandOutput } from "./commands/ListTunnelsCommand";
6
6
  import { OpenTunnelCommandInput, OpenTunnelCommandOutput } from "./commands/OpenTunnelCommand";
7
+ import { RotateTunnelAccessTokenCommandInput, RotateTunnelAccessTokenCommandOutput } from "./commands/RotateTunnelAccessTokenCommand";
7
8
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
8
9
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
9
10
  import { IoTSecureTunnelingClient } from "./IoTSecureTunnelingClient";
@@ -30,6 +31,10 @@ export declare class IoTSecureTunneling extends IoTSecureTunnelingClient {
30
31
  openTunnel(args: OpenTunnelCommandInput, cb: (err: any, data?: OpenTunnelCommandOutput) => void): void;
31
32
  openTunnel(args: OpenTunnelCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: OpenTunnelCommandOutput) => void): void;
32
33
 
34
+ rotateTunnelAccessToken(args: RotateTunnelAccessTokenCommandInput, options?: __HttpHandlerOptions): Promise<RotateTunnelAccessTokenCommandOutput>;
35
+ rotateTunnelAccessToken(args: RotateTunnelAccessTokenCommandInput, cb: (err: any, data?: RotateTunnelAccessTokenCommandOutput) => void): void;
36
+ rotateTunnelAccessToken(args: RotateTunnelAccessTokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RotateTunnelAccessTokenCommandOutput) => void): void;
37
+
33
38
  tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
34
39
  tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
35
40
  tagResource(args: TagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
@@ -11,10 +11,11 @@ import { DescribeTunnelCommandInput, DescribeTunnelCommandOutput } from "./comma
11
11
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
12
12
  import { ListTunnelsCommandInput, ListTunnelsCommandOutput } from "./commands/ListTunnelsCommand";
13
13
  import { OpenTunnelCommandInput, OpenTunnelCommandOutput } from "./commands/OpenTunnelCommand";
14
+ import { RotateTunnelAccessTokenCommandInput, RotateTunnelAccessTokenCommandOutput } from "./commands/RotateTunnelAccessTokenCommand";
14
15
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
15
16
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
16
- export declare type ServiceInputTypes = CloseTunnelCommandInput | DescribeTunnelCommandInput | ListTagsForResourceCommandInput | ListTunnelsCommandInput | OpenTunnelCommandInput | TagResourceCommandInput | UntagResourceCommandInput;
17
- export declare type ServiceOutputTypes = CloseTunnelCommandOutput | DescribeTunnelCommandOutput | ListTagsForResourceCommandOutput | ListTunnelsCommandOutput | OpenTunnelCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput;
17
+ export declare type ServiceInputTypes = CloseTunnelCommandInput | DescribeTunnelCommandInput | ListTagsForResourceCommandInput | ListTunnelsCommandInput | OpenTunnelCommandInput | RotateTunnelAccessTokenCommandInput | TagResourceCommandInput | UntagResourceCommandInput;
18
+ export declare type ServiceOutputTypes = CloseTunnelCommandOutput | DescribeTunnelCommandOutput | ListTagsForResourceCommandOutput | ListTunnelsCommandOutput | OpenTunnelCommandOutput | RotateTunnelAccessTokenCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput;
18
19
  export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
19
20
 
20
21
  requestHandler?: __HttpHandler;
@@ -0,0 +1,17 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { IoTSecureTunnelingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTSecureTunnelingClient";
4
+ import { RotateTunnelAccessTokenRequest, RotateTunnelAccessTokenResponse } from "../models/models_0";
5
+ export interface RotateTunnelAccessTokenCommandInput extends RotateTunnelAccessTokenRequest {
6
+ }
7
+ export interface RotateTunnelAccessTokenCommandOutput extends RotateTunnelAccessTokenResponse, __MetadataBearer {
8
+ }
9
+
10
+ export declare class RotateTunnelAccessTokenCommand extends $Command<RotateTunnelAccessTokenCommandInput, RotateTunnelAccessTokenCommandOutput, IoTSecureTunnelingClientResolvedConfig> {
11
+ readonly input: RotateTunnelAccessTokenCommandInput;
12
+ constructor(input: RotateTunnelAccessTokenCommandInput);
13
+
14
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: IoTSecureTunnelingClientResolvedConfig, options?: __HttpHandlerOptions): Handler<RotateTunnelAccessTokenCommandInput, RotateTunnelAccessTokenCommandOutput>;
15
+ private serialize;
16
+ private deserialize;
17
+ }
@@ -3,5 +3,6 @@ export * from "./DescribeTunnelCommand";
3
3
  export * from "./ListTagsForResourceCommand";
4
4
  export * from "./ListTunnelsCommand";
5
5
  export * from "./OpenTunnelCommand";
6
+ export * from "./RotateTunnelAccessTokenCommand";
6
7
  export * from "./TagResourceCommand";
7
8
  export * from "./UntagResourceCommand";
@@ -1,5 +1,10 @@
1
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
2
  import { IoTSecureTunnelingServiceException as __BaseException } from "./IoTSecureTunnelingServiceException";
3
+ export declare enum ClientMode {
4
+ ALL = "ALL",
5
+ DESTINATION = "DESTINATION",
6
+ SOURCE = "SOURCE"
7
+ }
3
8
  export interface CloseTunnelRequest {
4
9
 
5
10
  tunnelId: string | undefined;
@@ -210,6 +215,30 @@ export declare namespace OpenTunnelResponse {
210
215
 
211
216
  const filterSensitiveLog: (obj: OpenTunnelResponse) => any;
212
217
  }
218
+ export interface RotateTunnelAccessTokenRequest {
219
+
220
+ tunnelId: string | undefined;
221
+
222
+ clientMode: ClientMode | string | undefined;
223
+
224
+ destinationConfig?: DestinationConfig;
225
+ }
226
+ export declare namespace RotateTunnelAccessTokenRequest {
227
+
228
+ const filterSensitiveLog: (obj: RotateTunnelAccessTokenRequest) => any;
229
+ }
230
+ export interface RotateTunnelAccessTokenResponse {
231
+
232
+ tunnelArn?: string;
233
+
234
+ sourceAccessToken?: string;
235
+
236
+ destinationAccessToken?: string;
237
+ }
238
+ export declare namespace RotateTunnelAccessTokenResponse {
239
+
240
+ const filterSensitiveLog: (obj: RotateTunnelAccessTokenResponse) => any;
241
+ }
213
242
  export interface TagResourceRequest {
214
243
 
215
244
  resourceArn: string | undefined;
@@ -5,6 +5,7 @@ import { DescribeTunnelCommandInput, DescribeTunnelCommandOutput } from "../comm
5
5
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "../commands/ListTagsForResourceCommand";
6
6
  import { ListTunnelsCommandInput, ListTunnelsCommandOutput } from "../commands/ListTunnelsCommand";
7
7
  import { OpenTunnelCommandInput, OpenTunnelCommandOutput } from "../commands/OpenTunnelCommand";
8
+ import { RotateTunnelAccessTokenCommandInput, RotateTunnelAccessTokenCommandOutput } from "../commands/RotateTunnelAccessTokenCommand";
8
9
  import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
9
10
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
10
11
  export declare const serializeAws_json1_1CloseTunnelCommand: (input: CloseTunnelCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
@@ -12,6 +13,7 @@ export declare const serializeAws_json1_1DescribeTunnelCommand: (input: Describe
12
13
  export declare const serializeAws_json1_1ListTagsForResourceCommand: (input: ListTagsForResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
13
14
  export declare const serializeAws_json1_1ListTunnelsCommand: (input: ListTunnelsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
14
15
  export declare const serializeAws_json1_1OpenTunnelCommand: (input: OpenTunnelCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
16
+ export declare const serializeAws_json1_1RotateTunnelAccessTokenCommand: (input: RotateTunnelAccessTokenCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
15
17
  export declare const serializeAws_json1_1TagResourceCommand: (input: TagResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
16
18
  export declare const serializeAws_json1_1UntagResourceCommand: (input: UntagResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
17
19
  export declare const deserializeAws_json1_1CloseTunnelCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CloseTunnelCommandOutput>;
@@ -19,5 +21,6 @@ export declare const deserializeAws_json1_1DescribeTunnelCommand: (output: __Htt
19
21
  export declare const deserializeAws_json1_1ListTagsForResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListTagsForResourceCommandOutput>;
20
22
  export declare const deserializeAws_json1_1ListTunnelsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListTunnelsCommandOutput>;
21
23
  export declare const deserializeAws_json1_1OpenTunnelCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<OpenTunnelCommandOutput>;
24
+ export declare const deserializeAws_json1_1RotateTunnelAccessTokenCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RotateTunnelAccessTokenCommandOutput>;
22
25
  export declare const deserializeAws_json1_1TagResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<TagResourceCommandOutput>;
23
26
  export declare const deserializeAws_json1_1UntagResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UntagResourceCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-iotsecuretunneling",
3
3
  "description": "AWS SDK for JavaScript Iotsecuretunneling Client for Node.js, Browser and React Native",
4
- "version": "3.82.0",
4
+ "version": "3.84.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",