@aws-sdk/client-iotdeviceadvisor 3.42.0 → 3.43.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.
- package/CHANGELOG.md +11 -0
- package/README.md +9 -1
- package/dist-cjs/IotDeviceAdvisor.js +15 -0
- package/dist-cjs/commands/GetEndpointCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +19 -7
- package/dist-cjs/protocols/Aws_restJson1.js +88 -1
- package/dist-es/IotDeviceAdvisor.js +15 -0
- package/dist-es/commands/GetEndpointCommand.js +39 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +12 -4
- package/dist-es/protocols/Aws_restJson1.js +103 -1
- package/dist-types/IotDeviceAdvisor.d.ts +31 -3
- package/dist-types/IotDeviceAdvisorClient.d.ts +12 -3
- package/dist-types/commands/CreateSuiteDefinitionCommand.d.ts +1 -0
- package/dist-types/commands/DeleteSuiteDefinitionCommand.d.ts +1 -0
- package/dist-types/commands/GetEndpointCommand.d.ts +35 -0
- package/dist-types/commands/GetSuiteDefinitionCommand.d.ts +1 -0
- package/dist-types/commands/GetSuiteRunCommand.d.ts +1 -0
- package/dist-types/commands/GetSuiteRunReportCommand.d.ts +1 -0
- package/dist-types/commands/ListSuiteDefinitionsCommand.d.ts +1 -0
- package/dist-types/commands/ListSuiteRunsCommand.d.ts +3 -2
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -0
- package/dist-types/commands/StartSuiteRunCommand.d.ts +1 -0
- package/dist-types/commands/StopSuiteRunCommand.d.ts +1 -0
- package/dist-types/commands/TagResourceCommand.d.ts +1 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +1 -0
- package/dist-types/commands/UpdateSuiteDefinitionCommand.d.ts +1 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +129 -60
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/ts3.4/IotDeviceAdvisor.d.ts +5 -0
- package/dist-types/ts3.4/IotDeviceAdvisorClient.d.ts +3 -2
- package/dist-types/ts3.4/commands/GetEndpointCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +31 -11
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
- package/package.json +2 -2
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.43.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.42.0...v3.43.0) (2021-11-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **clients:** update clients as of 11/28/2021 ([#3072](https://github.com/aws/aws-sdk-js-v3/issues/3072)) ([2ad1622](https://github.com/aws/aws-sdk-js-v3/commit/2ad1622ba8586b926fe508055211803bb29e3976))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.42.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.41.0...v3.42.0) (2021-11-19)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-sdk/client-iotdeviceadvisor
|
package/README.md
CHANGED
|
@@ -7,7 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
AWS SDK for JavaScript IotDeviceAdvisor Client for Node.js, Browser and React Native.
|
|
9
9
|
|
|
10
|
-
<p>
|
|
10
|
+
<p>Amazon Web Services IoT Core Device Advisor is a cloud-based, fully managed test capability for
|
|
11
|
+
validating IoT devices during device software development. Device Advisor provides
|
|
12
|
+
pre-built tests that you can use to validate IoT devices for reliable and secure
|
|
13
|
+
connectivity with Amazon Web Services IoT Core before deploying devices to production. By using Device Advisor,
|
|
14
|
+
you can confirm that your devices can connect to Amazon Web Services IoT Core, follow security
|
|
15
|
+
best practices and, if applicable, receive software updates from IoT Device Management.
|
|
16
|
+
You can also download signed qualification reports to submit to the Amazon Web Services Partner Network
|
|
17
|
+
to get your device qualified for the Amazon Web Services Partner Device Catalog without the need to send
|
|
18
|
+
your device in and wait for it to be tested.</p>
|
|
11
19
|
|
|
12
20
|
## Installing
|
|
13
21
|
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.IotDeviceAdvisor = void 0;
|
|
4
4
|
const CreateSuiteDefinitionCommand_1 = require("./commands/CreateSuiteDefinitionCommand");
|
|
5
5
|
const DeleteSuiteDefinitionCommand_1 = require("./commands/DeleteSuiteDefinitionCommand");
|
|
6
|
+
const GetEndpointCommand_1 = require("./commands/GetEndpointCommand");
|
|
6
7
|
const GetSuiteDefinitionCommand_1 = require("./commands/GetSuiteDefinitionCommand");
|
|
7
8
|
const GetSuiteRunCommand_1 = require("./commands/GetSuiteRunCommand");
|
|
8
9
|
const GetSuiteRunReportCommand_1 = require("./commands/GetSuiteRunReportCommand");
|
|
@@ -44,6 +45,20 @@ class IotDeviceAdvisor extends IotDeviceAdvisorClient_1.IotDeviceAdvisorClient {
|
|
|
44
45
|
return this.send(command, optionsOrCb);
|
|
45
46
|
}
|
|
46
47
|
}
|
|
48
|
+
getEndpoint(args, optionsOrCb, cb) {
|
|
49
|
+
const command = new GetEndpointCommand_1.GetEndpointCommand(args);
|
|
50
|
+
if (typeof optionsOrCb === "function") {
|
|
51
|
+
this.send(command, optionsOrCb);
|
|
52
|
+
}
|
|
53
|
+
else if (typeof cb === "function") {
|
|
54
|
+
if (typeof optionsOrCb !== "object")
|
|
55
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
56
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
return this.send(command, optionsOrCb);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
47
62
|
getSuiteDefinition(args, optionsOrCb, cb) {
|
|
48
63
|
const command = new GetSuiteDefinitionCommand_1.GetSuiteDefinitionCommand(args);
|
|
49
64
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetEndpointCommand = 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_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
8
|
+
class GetEndpointCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "IotDeviceAdvisorClient";
|
|
18
|
+
const commandName = "GetEndpointCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.GetEndpointRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.GetEndpointResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return Aws_restJson1_1.serializeAws_restJson1GetEndpointCommand(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return Aws_restJson1_1.deserializeAws_restJson1GetEndpointCommand(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.GetEndpointCommand = GetEndpointCommand;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./CreateSuiteDefinitionCommand"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./DeleteSuiteDefinitionCommand"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./GetEndpointCommand"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./GetSuiteDefinitionCommand"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./GetSuiteRunCommand"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./GetSuiteRunReportCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateSuiteDefinitionResponse = exports.UpdateSuiteDefinitionRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.StopSuiteRunResponse = exports.StopSuiteRunRequest = exports.StartSuiteRunResponse = exports.StartSuiteRunRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListSuiteRunsResponse = exports.SuiteRunInformation = exports.ListSuiteRunsRequest = exports.ListSuiteDefinitionsResponse = exports.SuiteDefinitionInformation = exports.ListSuiteDefinitionsRequest = exports.GetSuiteRunReportResponse = exports.GetSuiteRunReportRequest = exports.GetSuiteRunResponse = exports.TestResult = exports.GroupResult = exports.TestCaseRun = exports.Status = exports.SuiteRunConfiguration = exports.SuiteRunStatus = exports.GetSuiteRunRequest = exports.ResourceNotFoundException = exports.
|
|
3
|
+
exports.UpdateSuiteDefinitionResponse = exports.UpdateSuiteDefinitionRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.StopSuiteRunResponse = exports.StopSuiteRunRequest = exports.StartSuiteRunResponse = exports.StartSuiteRunRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListSuiteRunsResponse = exports.SuiteRunInformation = exports.ListSuiteRunsRequest = exports.ListSuiteDefinitionsResponse = exports.SuiteDefinitionInformation = exports.ListSuiteDefinitionsRequest = exports.GetSuiteRunReportResponse = exports.GetSuiteRunReportRequest = exports.GetSuiteRunResponse = exports.TestResult = exports.GroupResult = exports.TestCaseRun = exports.Status = exports.SuiteRunConfiguration = exports.SuiteRunStatus = exports.GetSuiteRunRequest = exports.GetSuiteDefinitionResponse = exports.GetSuiteDefinitionRequest = exports.ResourceNotFoundException = exports.GetEndpointResponse = exports.GetEndpointRequest = exports.DeleteSuiteDefinitionResponse = exports.DeleteSuiteDefinitionRequest = exports.ValidationException = exports.InternalServerException = exports.CreateSuiteDefinitionResponse = exports.CreateSuiteDefinitionRequest = exports.SuiteDefinitionConfiguration = exports.DeviceUnderTest = exports.ConflictException = void 0;
|
|
4
4
|
var ConflictException;
|
|
5
5
|
(function (ConflictException) {
|
|
6
6
|
ConflictException.filterSensitiveLog = (obj) => ({
|
|
@@ -55,6 +55,24 @@ var DeleteSuiteDefinitionResponse;
|
|
|
55
55
|
...obj,
|
|
56
56
|
});
|
|
57
57
|
})(DeleteSuiteDefinitionResponse = exports.DeleteSuiteDefinitionResponse || (exports.DeleteSuiteDefinitionResponse = {}));
|
|
58
|
+
var GetEndpointRequest;
|
|
59
|
+
(function (GetEndpointRequest) {
|
|
60
|
+
GetEndpointRequest.filterSensitiveLog = (obj) => ({
|
|
61
|
+
...obj,
|
|
62
|
+
});
|
|
63
|
+
})(GetEndpointRequest = exports.GetEndpointRequest || (exports.GetEndpointRequest = {}));
|
|
64
|
+
var GetEndpointResponse;
|
|
65
|
+
(function (GetEndpointResponse) {
|
|
66
|
+
GetEndpointResponse.filterSensitiveLog = (obj) => ({
|
|
67
|
+
...obj,
|
|
68
|
+
});
|
|
69
|
+
})(GetEndpointResponse = exports.GetEndpointResponse || (exports.GetEndpointResponse = {}));
|
|
70
|
+
var ResourceNotFoundException;
|
|
71
|
+
(function (ResourceNotFoundException) {
|
|
72
|
+
ResourceNotFoundException.filterSensitiveLog = (obj) => ({
|
|
73
|
+
...obj,
|
|
74
|
+
});
|
|
75
|
+
})(ResourceNotFoundException = exports.ResourceNotFoundException || (exports.ResourceNotFoundException = {}));
|
|
58
76
|
var GetSuiteDefinitionRequest;
|
|
59
77
|
(function (GetSuiteDefinitionRequest) {
|
|
60
78
|
GetSuiteDefinitionRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -67,12 +85,6 @@ var GetSuiteDefinitionResponse;
|
|
|
67
85
|
...obj,
|
|
68
86
|
});
|
|
69
87
|
})(GetSuiteDefinitionResponse = exports.GetSuiteDefinitionResponse || (exports.GetSuiteDefinitionResponse = {}));
|
|
70
|
-
var ResourceNotFoundException;
|
|
71
|
-
(function (ResourceNotFoundException) {
|
|
72
|
-
ResourceNotFoundException.filterSensitiveLog = (obj) => ({
|
|
73
|
-
...obj,
|
|
74
|
-
});
|
|
75
|
-
})(ResourceNotFoundException = exports.ResourceNotFoundException || (exports.ResourceNotFoundException = {}));
|
|
76
88
|
var GetSuiteRunRequest;
|
|
77
89
|
(function (GetSuiteRunRequest) {
|
|
78
90
|
GetSuiteRunRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_restJson1UpdateSuiteDefinitionCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopSuiteRunCommand = exports.deserializeAws_restJson1StartSuiteRunCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListSuiteRunsCommand = exports.deserializeAws_restJson1ListSuiteDefinitionsCommand = exports.deserializeAws_restJson1GetSuiteRunReportCommand = exports.deserializeAws_restJson1GetSuiteRunCommand = exports.deserializeAws_restJson1GetSuiteDefinitionCommand = exports.deserializeAws_restJson1DeleteSuiteDefinitionCommand = exports.deserializeAws_restJson1CreateSuiteDefinitionCommand = exports.serializeAws_restJson1UpdateSuiteDefinitionCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopSuiteRunCommand = exports.serializeAws_restJson1StartSuiteRunCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListSuiteRunsCommand = exports.serializeAws_restJson1ListSuiteDefinitionsCommand = exports.serializeAws_restJson1GetSuiteRunReportCommand = exports.serializeAws_restJson1GetSuiteRunCommand = exports.serializeAws_restJson1GetSuiteDefinitionCommand = exports.serializeAws_restJson1DeleteSuiteDefinitionCommand = exports.serializeAws_restJson1CreateSuiteDefinitionCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1UpdateSuiteDefinitionCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopSuiteRunCommand = exports.deserializeAws_restJson1StartSuiteRunCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListSuiteRunsCommand = exports.deserializeAws_restJson1ListSuiteDefinitionsCommand = exports.deserializeAws_restJson1GetSuiteRunReportCommand = exports.deserializeAws_restJson1GetSuiteRunCommand = exports.deserializeAws_restJson1GetSuiteDefinitionCommand = exports.deserializeAws_restJson1GetEndpointCommand = exports.deserializeAws_restJson1DeleteSuiteDefinitionCommand = exports.deserializeAws_restJson1CreateSuiteDefinitionCommand = exports.serializeAws_restJson1UpdateSuiteDefinitionCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopSuiteRunCommand = exports.serializeAws_restJson1StartSuiteRunCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListSuiteRunsCommand = exports.serializeAws_restJson1ListSuiteDefinitionsCommand = exports.serializeAws_restJson1GetSuiteRunReportCommand = exports.serializeAws_restJson1GetSuiteRunCommand = exports.serializeAws_restJson1GetSuiteDefinitionCommand = exports.serializeAws_restJson1GetEndpointCommand = exports.serializeAws_restJson1DeleteSuiteDefinitionCommand = exports.serializeAws_restJson1CreateSuiteDefinitionCommand = 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 serializeAws_restJson1CreateSuiteDefinitionCommand = async (input, context) => {
|
|
@@ -54,6 +54,27 @@ const serializeAws_restJson1DeleteSuiteDefinitionCommand = async (input, context
|
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
56
|
exports.serializeAws_restJson1DeleteSuiteDefinitionCommand = serializeAws_restJson1DeleteSuiteDefinitionCommand;
|
|
57
|
+
const serializeAws_restJson1GetEndpointCommand = async (input, context) => {
|
|
58
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
59
|
+
const headers = {};
|
|
60
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/endpoint";
|
|
61
|
+
const query = {
|
|
62
|
+
...(input.thingArn !== undefined && { thingArn: input.thingArn }),
|
|
63
|
+
...(input.certificateArn !== undefined && { certificateArn: input.certificateArn }),
|
|
64
|
+
};
|
|
65
|
+
let body;
|
|
66
|
+
return new protocol_http_1.HttpRequest({
|
|
67
|
+
protocol,
|
|
68
|
+
hostname,
|
|
69
|
+
port,
|
|
70
|
+
method: "GET",
|
|
71
|
+
headers,
|
|
72
|
+
path: resolvedPath,
|
|
73
|
+
query,
|
|
74
|
+
body,
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
exports.serializeAws_restJson1GetEndpointCommand = serializeAws_restJson1GetEndpointCommand;
|
|
57
78
|
const serializeAws_restJson1GetSuiteDefinitionCommand = async (input, context) => {
|
|
58
79
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
59
80
|
const headers = {};
|
|
@@ -518,6 +539,70 @@ const deserializeAws_restJson1DeleteSuiteDefinitionCommandError = async (output,
|
|
|
518
539
|
delete response.Message;
|
|
519
540
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
520
541
|
};
|
|
542
|
+
const deserializeAws_restJson1GetEndpointCommand = async (output, context) => {
|
|
543
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
544
|
+
return deserializeAws_restJson1GetEndpointCommandError(output, context);
|
|
545
|
+
}
|
|
546
|
+
const contents = {
|
|
547
|
+
$metadata: deserializeMetadata(output),
|
|
548
|
+
endpoint: undefined,
|
|
549
|
+
};
|
|
550
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
551
|
+
if (data.endpoint !== undefined && data.endpoint !== null) {
|
|
552
|
+
contents.endpoint = smithy_client_1.expectString(data.endpoint);
|
|
553
|
+
}
|
|
554
|
+
return Promise.resolve(contents);
|
|
555
|
+
};
|
|
556
|
+
exports.deserializeAws_restJson1GetEndpointCommand = deserializeAws_restJson1GetEndpointCommand;
|
|
557
|
+
const deserializeAws_restJson1GetEndpointCommandError = async (output, context) => {
|
|
558
|
+
const parsedOutput = {
|
|
559
|
+
...output,
|
|
560
|
+
body: await parseBody(output.body, context),
|
|
561
|
+
};
|
|
562
|
+
let response;
|
|
563
|
+
let errorCode = "UnknownError";
|
|
564
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
565
|
+
switch (errorCode) {
|
|
566
|
+
case "InternalServerException":
|
|
567
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
568
|
+
response = {
|
|
569
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
570
|
+
name: errorCode,
|
|
571
|
+
$metadata: deserializeMetadata(output),
|
|
572
|
+
};
|
|
573
|
+
break;
|
|
574
|
+
case "ResourceNotFoundException":
|
|
575
|
+
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
576
|
+
response = {
|
|
577
|
+
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
578
|
+
name: errorCode,
|
|
579
|
+
$metadata: deserializeMetadata(output),
|
|
580
|
+
};
|
|
581
|
+
break;
|
|
582
|
+
case "ValidationException":
|
|
583
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
584
|
+
response = {
|
|
585
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
586
|
+
name: errorCode,
|
|
587
|
+
$metadata: deserializeMetadata(output),
|
|
588
|
+
};
|
|
589
|
+
break;
|
|
590
|
+
default:
|
|
591
|
+
const parsedBody = parsedOutput.body;
|
|
592
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
593
|
+
response = {
|
|
594
|
+
...parsedBody,
|
|
595
|
+
name: `${errorCode}`,
|
|
596
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
597
|
+
$fault: "client",
|
|
598
|
+
$metadata: deserializeMetadata(output),
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
const message = response.message || response.Message || errorCode;
|
|
602
|
+
response.message = message;
|
|
603
|
+
delete response.Message;
|
|
604
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
605
|
+
};
|
|
521
606
|
const deserializeAws_restJson1GetSuiteDefinitionCommand = async (output, context) => {
|
|
522
607
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
523
608
|
return deserializeAws_restJson1GetSuiteDefinitionCommandError(output, context);
|
|
@@ -1384,6 +1469,7 @@ const serializeAws_restJson1SuiteDefinitionConfiguration = (input, context) => {
|
|
|
1384
1469
|
};
|
|
1385
1470
|
const serializeAws_restJson1SuiteRunConfiguration = (input, context) => {
|
|
1386
1471
|
return {
|
|
1472
|
+
...(input.parallelRun !== undefined && input.parallelRun !== null && { parallelRun: input.parallelRun }),
|
|
1387
1473
|
...(input.primaryDevice !== undefined &&
|
|
1388
1474
|
input.primaryDevice !== null && {
|
|
1389
1475
|
primaryDevice: serializeAws_restJson1DeviceUnderTest(input.primaryDevice, context),
|
|
@@ -1486,6 +1572,7 @@ const deserializeAws_restJson1SuiteDefinitionInformationList = (output, context)
|
|
|
1486
1572
|
};
|
|
1487
1573
|
const deserializeAws_restJson1SuiteRunConfiguration = (output, context) => {
|
|
1488
1574
|
return {
|
|
1575
|
+
parallelRun: smithy_client_1.expectBoolean(output.parallelRun),
|
|
1489
1576
|
primaryDevice: output.primaryDevice !== undefined && output.primaryDevice !== null
|
|
1490
1577
|
? deserializeAws_restJson1DeviceUnderTest(output.primaryDevice, context)
|
|
1491
1578
|
: undefined,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { CreateSuiteDefinitionCommand, } from "./commands/CreateSuiteDefinitionCommand";
|
|
3
3
|
import { DeleteSuiteDefinitionCommand, } from "./commands/DeleteSuiteDefinitionCommand";
|
|
4
|
+
import { GetEndpointCommand } from "./commands/GetEndpointCommand";
|
|
4
5
|
import { GetSuiteDefinitionCommand, } from "./commands/GetSuiteDefinitionCommand";
|
|
5
6
|
import { GetSuiteRunCommand } from "./commands/GetSuiteRunCommand";
|
|
6
7
|
import { GetSuiteRunReportCommand, } from "./commands/GetSuiteRunReportCommand";
|
|
@@ -46,6 +47,20 @@ var IotDeviceAdvisor = (function (_super) {
|
|
|
46
47
|
return this.send(command, optionsOrCb);
|
|
47
48
|
}
|
|
48
49
|
};
|
|
50
|
+
IotDeviceAdvisor.prototype.getEndpoint = function (args, optionsOrCb, cb) {
|
|
51
|
+
var command = new GetEndpointCommand(args);
|
|
52
|
+
if (typeof optionsOrCb === "function") {
|
|
53
|
+
this.send(command, optionsOrCb);
|
|
54
|
+
}
|
|
55
|
+
else if (typeof cb === "function") {
|
|
56
|
+
if (typeof optionsOrCb !== "object")
|
|
57
|
+
throw new Error("Expect http options but get " + typeof optionsOrCb);
|
|
58
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
return this.send(command, optionsOrCb);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
49
64
|
IotDeviceAdvisor.prototype.getSuiteDefinition = function (args, optionsOrCb, cb) {
|
|
50
65
|
var command = new GetSuiteDefinitionCommand(args);
|
|
51
66
|
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 { GetEndpointRequest, GetEndpointResponse } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1GetEndpointCommand, serializeAws_restJson1GetEndpointCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var GetEndpointCommand = (function (_super) {
|
|
7
|
+
__extends(GetEndpointCommand, _super);
|
|
8
|
+
function GetEndpointCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
GetEndpointCommand.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 = "IotDeviceAdvisorClient";
|
|
18
|
+
var commandName = "GetEndpointCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: GetEndpointRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: GetEndpointResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
GetEndpointCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1GetEndpointCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
GetEndpointCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1GetEndpointCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return GetEndpointCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { GetEndpointCommand };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./CreateSuiteDefinitionCommand";
|
|
2
2
|
export * from "./DeleteSuiteDefinitionCommand";
|
|
3
|
+
export * from "./GetEndpointCommand";
|
|
3
4
|
export * from "./GetSuiteDefinitionCommand";
|
|
4
5
|
export * from "./GetSuiteRunCommand";
|
|
5
6
|
export * from "./GetSuiteRunReportCommand";
|
|
@@ -35,6 +35,18 @@ export var DeleteSuiteDefinitionResponse;
|
|
|
35
35
|
(function (DeleteSuiteDefinitionResponse) {
|
|
36
36
|
DeleteSuiteDefinitionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
37
37
|
})(DeleteSuiteDefinitionResponse || (DeleteSuiteDefinitionResponse = {}));
|
|
38
|
+
export var GetEndpointRequest;
|
|
39
|
+
(function (GetEndpointRequest) {
|
|
40
|
+
GetEndpointRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
41
|
+
})(GetEndpointRequest || (GetEndpointRequest = {}));
|
|
42
|
+
export var GetEndpointResponse;
|
|
43
|
+
(function (GetEndpointResponse) {
|
|
44
|
+
GetEndpointResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
45
|
+
})(GetEndpointResponse || (GetEndpointResponse = {}));
|
|
46
|
+
export var ResourceNotFoundException;
|
|
47
|
+
(function (ResourceNotFoundException) {
|
|
48
|
+
ResourceNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
49
|
+
})(ResourceNotFoundException || (ResourceNotFoundException = {}));
|
|
38
50
|
export var GetSuiteDefinitionRequest;
|
|
39
51
|
(function (GetSuiteDefinitionRequest) {
|
|
40
52
|
GetSuiteDefinitionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -43,10 +55,6 @@ export var GetSuiteDefinitionResponse;
|
|
|
43
55
|
(function (GetSuiteDefinitionResponse) {
|
|
44
56
|
GetSuiteDefinitionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
45
57
|
})(GetSuiteDefinitionResponse || (GetSuiteDefinitionResponse = {}));
|
|
46
|
-
export var ResourceNotFoundException;
|
|
47
|
-
(function (ResourceNotFoundException) {
|
|
48
|
-
ResourceNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
49
|
-
})(ResourceNotFoundException || (ResourceNotFoundException = {}));
|
|
50
58
|
export var GetSuiteRunRequest;
|
|
51
59
|
(function (GetSuiteRunRequest) {
|
|
52
60
|
GetSuiteRunRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -59,6 +59,29 @@ export var serializeAws_restJson1DeleteSuiteDefinitionCommand = function (input,
|
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
}); };
|
|
62
|
+
export var serializeAws_restJson1GetEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
63
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
64
|
+
return __generator(this, function (_c) {
|
|
65
|
+
switch (_c.label) {
|
|
66
|
+
case 0: return [4, context.endpoint()];
|
|
67
|
+
case 1:
|
|
68
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
69
|
+
headers = {};
|
|
70
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/endpoint";
|
|
71
|
+
query = __assign(__assign({}, (input.thingArn !== undefined && { thingArn: input.thingArn })), (input.certificateArn !== undefined && { certificateArn: input.certificateArn }));
|
|
72
|
+
return [2, new __HttpRequest({
|
|
73
|
+
protocol: protocol,
|
|
74
|
+
hostname: hostname,
|
|
75
|
+
port: port,
|
|
76
|
+
method: "GET",
|
|
77
|
+
headers: headers,
|
|
78
|
+
path: resolvedPath,
|
|
79
|
+
query: query,
|
|
80
|
+
body: body,
|
|
81
|
+
})];
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}); };
|
|
62
85
|
export var serializeAws_restJson1GetSuiteDefinitionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
63
86
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
64
87
|
return __generator(this, function (_c) {
|
|
@@ -584,6 +607,84 @@ var deserializeAws_restJson1DeleteSuiteDefinitionCommandError = function (output
|
|
|
584
607
|
}
|
|
585
608
|
});
|
|
586
609
|
}); };
|
|
610
|
+
export var deserializeAws_restJson1GetEndpointCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
611
|
+
var contents, data, _a, _b;
|
|
612
|
+
return __generator(this, function (_c) {
|
|
613
|
+
switch (_c.label) {
|
|
614
|
+
case 0:
|
|
615
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
616
|
+
return [2, deserializeAws_restJson1GetEndpointCommandError(output, context)];
|
|
617
|
+
}
|
|
618
|
+
contents = {
|
|
619
|
+
$metadata: deserializeMetadata(output),
|
|
620
|
+
endpoint: undefined,
|
|
621
|
+
};
|
|
622
|
+
_a = __expectNonNull;
|
|
623
|
+
_b = __expectObject;
|
|
624
|
+
return [4, parseBody(output.body, context)];
|
|
625
|
+
case 1:
|
|
626
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
627
|
+
if (data.endpoint !== undefined && data.endpoint !== null) {
|
|
628
|
+
contents.endpoint = __expectString(data.endpoint);
|
|
629
|
+
}
|
|
630
|
+
return [2, Promise.resolve(contents)];
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
}); };
|
|
634
|
+
var deserializeAws_restJson1GetEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
635
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
636
|
+
var _f;
|
|
637
|
+
return __generator(this, function (_g) {
|
|
638
|
+
switch (_g.label) {
|
|
639
|
+
case 0:
|
|
640
|
+
_a = [__assign({}, output)];
|
|
641
|
+
_f = {};
|
|
642
|
+
return [4, parseBody(output.body, context)];
|
|
643
|
+
case 1:
|
|
644
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
645
|
+
errorCode = "UnknownError";
|
|
646
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
647
|
+
_b = errorCode;
|
|
648
|
+
switch (_b) {
|
|
649
|
+
case "InternalServerException": return [3, 2];
|
|
650
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException": return [3, 2];
|
|
651
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
652
|
+
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException": return [3, 4];
|
|
653
|
+
case "ValidationException": return [3, 6];
|
|
654
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException": return [3, 6];
|
|
655
|
+
}
|
|
656
|
+
return [3, 8];
|
|
657
|
+
case 2:
|
|
658
|
+
_c = [{}];
|
|
659
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
660
|
+
case 3:
|
|
661
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
662
|
+
return [3, 9];
|
|
663
|
+
case 4:
|
|
664
|
+
_d = [{}];
|
|
665
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
666
|
+
case 5:
|
|
667
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
668
|
+
return [3, 9];
|
|
669
|
+
case 6:
|
|
670
|
+
_e = [{}];
|
|
671
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
672
|
+
case 7:
|
|
673
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
674
|
+
return [3, 9];
|
|
675
|
+
case 8:
|
|
676
|
+
parsedBody = parsedOutput.body;
|
|
677
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
678
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
679
|
+
_g.label = 9;
|
|
680
|
+
case 9:
|
|
681
|
+
message = response.message || response.Message || errorCode;
|
|
682
|
+
response.message = message;
|
|
683
|
+
delete response.Message;
|
|
684
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
}); };
|
|
587
688
|
export var deserializeAws_restJson1GetSuiteDefinitionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
588
689
|
var contents, data, _a, _b;
|
|
589
690
|
return __generator(this, function (_c) {
|
|
@@ -1600,7 +1701,7 @@ var serializeAws_restJson1SuiteDefinitionConfiguration = function (input, contex
|
|
|
1600
1701
|
input.suiteDefinitionName !== null && { suiteDefinitionName: input.suiteDefinitionName }));
|
|
1601
1702
|
};
|
|
1602
1703
|
var serializeAws_restJson1SuiteRunConfiguration = function (input, context) {
|
|
1603
|
-
return __assign(__assign({}, (input.primaryDevice !== undefined &&
|
|
1704
|
+
return __assign(__assign(__assign({}, (input.parallelRun !== undefined && input.parallelRun !== null && { parallelRun: input.parallelRun })), (input.primaryDevice !== undefined &&
|
|
1604
1705
|
input.primaryDevice !== null && {
|
|
1605
1706
|
primaryDevice: serializeAws_restJson1DeviceUnderTest(input.primaryDevice, context),
|
|
1606
1707
|
})), (input.selectedTestList !== undefined &&
|
|
@@ -1699,6 +1800,7 @@ var deserializeAws_restJson1SuiteDefinitionInformationList = function (output, c
|
|
|
1699
1800
|
};
|
|
1700
1801
|
var deserializeAws_restJson1SuiteRunConfiguration = function (output, context) {
|
|
1701
1802
|
return {
|
|
1803
|
+
parallelRun: __expectBoolean(output.parallelRun),
|
|
1702
1804
|
primaryDevice: output.primaryDevice !== undefined && output.primaryDevice !== null
|
|
1703
1805
|
? deserializeAws_restJson1DeviceUnderTest(output.primaryDevice, context)
|
|
1704
1806
|
: undefined,
|