Skip to content

Commit bb17b0c

Browse files
author
awstools
committed
feat(client-iotdeviceadvisor): Added new service feature (Early access only) - Long Duration Test, where customers can test the IoT device to observe how it behaves when the device is in operation for longer period.
1 parent 0aaceaf commit bb17b0c

File tree

6 files changed

+373
-46
lines changed

6 files changed

+373
-46
lines changed

clients/client-iotdeviceadvisor/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99

1010
AWS SDK for JavaScript IotDeviceAdvisor Client for Node.js, Browser and React Native.
1111

12-
<p>Amazon Web Services IoT Core Device Advisor is a cloud-based, fully managed test capability for
13-
validating IoT devices during device software development. Device Advisor provides
14-
pre-built tests that you can use to validate IoT devices for reliable and secure
15-
connectivity with Amazon Web Services IoT Core before deploying devices to production. By using Device Advisor,
16-
you can confirm that your devices can connect to Amazon Web Services IoT Core, follow security
17-
best practices and, if applicable, receive software updates from IoT Device Management.
18-
You can also download signed qualification reports to submit to the Amazon Web Services Partner Network
19-
to get your device qualified for the Amazon Web Services Partner Device Catalog without the need to send
20-
your device in and wait for it to be tested.</p>
12+
<p>Amazon Web Services IoT Core Device Advisor is a cloud-based, fully managed test capability for validating IoT
13+
devices during device software development. Device Advisor provides pre-built tests that you
14+
can use to validate IoT devices for reliable and secure connectivity with Amazon Web Services IoT Core
15+
before deploying devices to production. By using Device Advisor, you can confirm that your
16+
devices can connect to Amazon Web Services IoT Core, follow security best practices and, if applicable,
17+
receive software updates from IoT Device Management. You can also download signed
18+
qualification reports to submit to the Amazon Web Services Partner Network to get your device
19+
qualified for the Amazon Web Services Partner Device Catalog without the need to send your device in
20+
and wait for it to be tested.</p>
2121

2222
## Installing
2323

clients/client-iotdeviceadvisor/src/IotDeviceAdvisor.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ import {
6262
import { IotDeviceAdvisorClient } from "./IotDeviceAdvisorClient";
6363

6464
/**
65-
* <p>Amazon Web Services IoT Core Device Advisor is a cloud-based, fully managed test capability for
66-
* validating IoT devices during device software development. Device Advisor provides
67-
* pre-built tests that you can use to validate IoT devices for reliable and secure
68-
* connectivity with Amazon Web Services IoT Core before deploying devices to production. By using Device Advisor,
69-
* you can confirm that your devices can connect to Amazon Web Services IoT Core, follow security
70-
* best practices and, if applicable, receive software updates from IoT Device Management.
71-
* You can also download signed qualification reports to submit to the Amazon Web Services Partner Network
72-
* to get your device qualified for the Amazon Web Services Partner Device Catalog without the need to send
73-
* your device in and wait for it to be tested.</p>
65+
* <p>Amazon Web Services IoT Core Device Advisor is a cloud-based, fully managed test capability for validating IoT
66+
* devices during device software development. Device Advisor provides pre-built tests that you
67+
* can use to validate IoT devices for reliable and secure connectivity with Amazon Web Services IoT Core
68+
* before deploying devices to production. By using Device Advisor, you can confirm that your
69+
* devices can connect to Amazon Web Services IoT Core, follow security best practices and, if applicable,
70+
* receive software updates from IoT Device Management. You can also download signed
71+
* qualification reports to submit to the Amazon Web Services Partner Network to get your device
72+
* qualified for the Amazon Web Services Partner Device Catalog without the need to send your device in
73+
* and wait for it to be tested.</p>
7474
*/
7575
export class IotDeviceAdvisor extends IotDeviceAdvisorClient {
7676
/**

clients/client-iotdeviceadvisor/src/IotDeviceAdvisorClient.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,15 @@ type IotDeviceAdvisorClientResolvedConfigType = __SmithyResolvedConfiguration<__
270270
export interface IotDeviceAdvisorClientResolvedConfig extends IotDeviceAdvisorClientResolvedConfigType {}
271271

272272
/**
273-
* <p>Amazon Web Services IoT Core Device Advisor is a cloud-based, fully managed test capability for
274-
* validating IoT devices during device software development. Device Advisor provides
275-
* pre-built tests that you can use to validate IoT devices for reliable and secure
276-
* connectivity with Amazon Web Services IoT Core before deploying devices to production. By using Device Advisor,
277-
* you can confirm that your devices can connect to Amazon Web Services IoT Core, follow security
278-
* best practices and, if applicable, receive software updates from IoT Device Management.
279-
* You can also download signed qualification reports to submit to the Amazon Web Services Partner Network
280-
* to get your device qualified for the Amazon Web Services Partner Device Catalog without the need to send
281-
* your device in and wait for it to be tested.</p>
273+
* <p>Amazon Web Services IoT Core Device Advisor is a cloud-based, fully managed test capability for validating IoT
274+
* devices during device software development. Device Advisor provides pre-built tests that you
275+
* can use to validate IoT devices for reliable and secure connectivity with Amazon Web Services IoT Core
276+
* before deploying devices to production. By using Device Advisor, you can confirm that your
277+
* devices can connect to Amazon Web Services IoT Core, follow security best practices and, if applicable,
278+
* receive software updates from IoT Device Management. You can also download signed
279+
* qualification reports to submit to the Amazon Web Services Partner Network to get your device
280+
* qualified for the Amazon Web Services Partner Device Catalog without the need to send your device in
281+
* and wait for it to be tested.</p>
282282
*/
283283
export class IotDeviceAdvisorClient extends __Client<
284284
__HttpHandlerOptions,

clients/client-iotdeviceadvisor/src/models/models_0.ts

Lines changed: 151 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ export namespace DeviceUnderTest {
4646
});
4747
}
4848

49+
export enum Protocol {
50+
MqttV3_1_1 = "MqttV3_1_1",
51+
MqttV5 = "MqttV5",
52+
}
53+
4954
/**
5055
* <p>Gets Suite Definition Configuration.</p>
5156
*/
@@ -65,6 +70,11 @@ export interface SuiteDefinitionConfiguration {
6570
*/
6671
intendedForQualification?: boolean;
6772

73+
/**
74+
* <p> Verifies if the test suite is a long duration test. </p>
75+
*/
76+
isLongDurationTest?: boolean;
77+
6878
/**
6979
* <p>Gets test suite root group.</p>
7080
*/
@@ -74,6 +84,11 @@ export interface SuiteDefinitionConfiguration {
7484
* <p>Gets the device permission ARN.</p>
7585
*/
7686
devicePermissionRoleArn?: string;
87+
88+
/**
89+
* <p> Gets the MQTT protocol that is configured in the suite definition.</p>
90+
*/
91+
protocol?: Protocol | string;
7792
}
7893

7994
export namespace SuiteDefinitionConfiguration {
@@ -404,6 +419,109 @@ export enum Status {
404419
STOPPING = "STOPPING",
405420
}
406421

422+
export enum TestCaseScenarioStatus {
423+
CANCELED = "CANCELED",
424+
ERROR = "ERROR",
425+
FAIL = "FAIL",
426+
PASS = "PASS",
427+
PASS_WITH_WARNINGS = "PASS_WITH_WARNINGS",
428+
PENDING = "PENDING",
429+
RUNNING = "RUNNING",
430+
STOPPED = "STOPPED",
431+
STOPPING = "STOPPING",
432+
}
433+
434+
export enum TestCaseScenarioType {
435+
Advanced = "Advanced",
436+
Basic = "Basic",
437+
}
438+
439+
/**
440+
* <p>Provides test case scenario.</p>
441+
*/
442+
export interface TestCaseScenario {
443+
/**
444+
* <p>Provides test case scenario ID.</p>
445+
*/
446+
testCaseScenarioId?: string;
447+
448+
/**
449+
* <p>Provides test case scenario type. Type is one of the following:</p>
450+
* <ul>
451+
* <li>
452+
* <p>Advanced</p>
453+
* </li>
454+
* <li>
455+
* <p>Basic</p>
456+
* </li>
457+
* </ul>
458+
*/
459+
testCaseScenarioType?: TestCaseScenarioType | string;
460+
461+
/**
462+
* <p>Provides the test case scenario status. Status is one of the following:</p>
463+
* <ul>
464+
* <li>
465+
* <p>
466+
* <code>PASS</code>: Test passed.</p>
467+
* </li>
468+
* <li>
469+
* <p>
470+
* <code>FAIL</code>: Test failed.</p>
471+
* </li>
472+
* <li>
473+
* <p>
474+
* <code>PENDING</code>: Test has not started running but is scheduled.</p>
475+
* </li>
476+
* <li>
477+
* <p>
478+
* <code>RUNNING</code>: Test is running.</p>
479+
* </li>
480+
* <li>
481+
* <p>
482+
* <code>STOPPING</code>: Test is performing cleanup steps. You will see this
483+
* status only if you stop a suite run.</p>
484+
* </li>
485+
* <li>
486+
* <p>
487+
* <code>STOPPED</code> Test is stopped. You will see this status only if you
488+
* stop a suite run.</p>
489+
* </li>
490+
* <li>
491+
* <p>
492+
* <code>PASS_WITH_WARNINGS</code>: Test passed with warnings.</p>
493+
* </li>
494+
* <li>
495+
* <p>
496+
* <code>ERORR</code>: Test faced an error when running due to an internal
497+
* issue.</p>
498+
* </li>
499+
* </ul>
500+
*/
501+
status?: TestCaseScenarioStatus | string;
502+
503+
/**
504+
* <p>Provides test case scenario failure result.</p>
505+
*/
506+
failure?: string;
507+
508+
/**
509+
* <p>
510+
*
511+
* </p>
512+
*/
513+
systemMessage?: string;
514+
}
515+
516+
export namespace TestCaseScenario {
517+
/**
518+
* @internal
519+
*/
520+
export const filterSensitiveLog = (obj: TestCaseScenario): any => ({
521+
...obj,
522+
});
523+
}
524+
407525
/**
408526
* <p>Provides the test case run.</p>
409527
*/
@@ -427,36 +545,39 @@ export interface TestCaseRun {
427545
* <p>Provides the test case run status. Status is one of the following:</p>
428546
* <ul>
429547
* <li>
430-
* <p>
548+
* <p>
431549
* <code>PASS</code>: Test passed.</p>
432550
* </li>
433551
* <li>
434-
* <p>
552+
* <p>
435553
* <code>FAIL</code>: Test failed.</p>
436554
* </li>
437555
* <li>
438-
* <p>
556+
* <p>
439557
* <code>PENDING</code>: Test has not started running but is scheduled.</p>
440558
* </li>
441559
* <li>
442-
* <p>
560+
* <p>
443561
* <code>RUNNING</code>: Test is running.</p>
444562
* </li>
445563
* <li>
446-
* <p>
447-
* <code>STOPPING</code>: Test is performing cleanup steps. You will see this status only if you stop a suite run.</p>
564+
* <p>
565+
* <code>STOPPING</code>: Test is performing cleanup steps. You will see this
566+
* status only if you stop a suite run.</p>
448567
* </li>
449568
* <li>
450-
* <p>
451-
* <code>STOPPED</code> Test is stopped. You will see this status only if you stop a suite run.</p>
569+
* <p>
570+
* <code>STOPPED</code> Test is stopped. You will see this status only if you
571+
* stop a suite run.</p>
452572
* </li>
453573
* <li>
454-
* <p>
574+
* <p>
455575
* <code>PASS_WITH_WARNINGS</code>: Test passed with warnings.</p>
456576
* </li>
457577
* <li>
458-
* <p>
459-
* <code>ERORR</code>: Test faced an error when running due to an internal issue.</p>
578+
* <p>
579+
* <code>ERORR</code>: Test faced an error when running due to an internal
580+
* issue.</p>
460581
* </li>
461582
* </ul>
462583
*/
@@ -486,6 +607,11 @@ export interface TestCaseRun {
486607
* <p>Provides test case run failure result.</p>
487608
*/
488609
failure?: string;
610+
611+
/**
612+
* <p> Provides the test scenarios for the test case run. </p>
613+
*/
614+
testScenarios?: TestCaseScenario[];
489615
}
490616

491617
export namespace TestCaseRun {
@@ -693,6 +819,16 @@ export interface SuiteDefinitionInformation {
693819
*/
694820
intendedForQualification?: boolean;
695821

822+
/**
823+
* <p> Verifies if the test suite is a long duration test. </p>
824+
*/
825+
isLongDurationTest?: boolean;
826+
827+
/**
828+
* <p> Gets the MQTT protocol that is configured in the suite definition.</p>
829+
*/
830+
protocol?: Protocol | string;
831+
696832
/**
697833
* <p>Date (in Unix epoch time) when the test suite was created.</p>
698834
*/
@@ -710,7 +846,8 @@ export namespace SuiteDefinitionInformation {
710846

711847
export interface ListSuiteDefinitionsResponse {
712848
/**
713-
* <p>An array of objects that provide summaries of information about the suite definitions in the list.</p>
849+
* <p>An array of objects that provide summaries of information about the suite definitions
850+
* in the list.</p>
714851
*/
715852
suiteDefinitionInformationList?: SuiteDefinitionInformation[];
716853

@@ -829,7 +966,8 @@ export namespace SuiteRunInformation {
829966

830967
export interface ListSuiteRunsResponse {
831968
/**
832-
* <p>An array of objects that provide summaries of information about the suite runs in the list.</p>
969+
* <p>An array of objects that provide summaries of information about the suite runs in the
970+
* list.</p>
833971
*/
834972
suiteRunsList?: SuiteRunInformation[];
835973

clients/client-iotdeviceadvisor/src/protocols/Aws_restJson1.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ import {
5858
SuiteRunConfiguration,
5959
SuiteRunInformation,
6060
TestCaseRun,
61+
TestCaseScenario,
6162
TestResult,
6263
ValidationException,
6364
} from "../models/models_0";
@@ -1422,6 +1423,8 @@ const serializeAws_restJson1SuiteDefinitionConfiguration = (
14221423
...(input.devicePermissionRoleArn != null && { devicePermissionRoleArn: input.devicePermissionRoleArn }),
14231424
...(input.devices != null && { devices: serializeAws_restJson1DeviceUnderTestList(input.devices, context) }),
14241425
...(input.intendedForQualification != null && { intendedForQualification: input.intendedForQualification }),
1426+
...(input.isLongDurationTest != null && { isLongDurationTest: input.isLongDurationTest }),
1427+
...(input.protocol != null && { protocol: input.protocol }),
14251428
...(input.rootGroup != null && { rootGroup: input.rootGroup }),
14261429
...(input.suiteDefinitionName != null && { suiteDefinitionName: input.suiteDefinitionName }),
14271430
};
@@ -1510,6 +1513,8 @@ const deserializeAws_restJson1SuiteDefinitionConfiguration = (
15101513
devicePermissionRoleArn: __expectString(output.devicePermissionRoleArn),
15111514
devices: output.devices != null ? deserializeAws_restJson1DeviceUnderTestList(output.devices, context) : undefined,
15121515
intendedForQualification: __expectBoolean(output.intendedForQualification),
1516+
isLongDurationTest: __expectBoolean(output.isLongDurationTest),
1517+
protocol: __expectString(output.protocol),
15131518
rootGroup: __expectString(output.rootGroup),
15141519
suiteDefinitionName: __expectString(output.suiteDefinitionName),
15151520
} as any;
@@ -1527,6 +1532,8 @@ const deserializeAws_restJson1SuiteDefinitionInformation = (
15271532
? deserializeAws_restJson1DeviceUnderTestList(output.defaultDevices, context)
15281533
: undefined,
15291534
intendedForQualification: __expectBoolean(output.intendedForQualification),
1535+
isLongDurationTest: __expectBoolean(output.isLongDurationTest),
1536+
protocol: __expectString(output.protocol),
15301537
suiteDefinitionId: __expectString(output.suiteDefinitionId),
15311538
suiteDefinitionName: __expectString(output.suiteDefinitionName),
15321539
} as any;
@@ -1612,6 +1619,10 @@ const deserializeAws_restJson1TestCaseRun = (output: any, context: __SerdeContex
16121619
testCaseDefinitionId: __expectString(output.testCaseDefinitionId),
16131620
testCaseDefinitionName: __expectString(output.testCaseDefinitionName),
16141621
testCaseRunId: __expectString(output.testCaseRunId),
1622+
testScenarios:
1623+
output.testScenarios != null
1624+
? deserializeAws_restJson1TestCaseScenariosList(output.testScenarios, context)
1625+
: undefined,
16151626
warnings: __expectString(output.warnings),
16161627
} as any;
16171628
};
@@ -1628,6 +1639,28 @@ const deserializeAws_restJson1TestCaseRuns = (output: any, context: __SerdeConte
16281639
return retVal;
16291640
};
16301641

1642+
const deserializeAws_restJson1TestCaseScenario = (output: any, context: __SerdeContext): TestCaseScenario => {
1643+
return {
1644+
failure: __expectString(output.failure),
1645+
status: __expectString(output.status),
1646+
systemMessage: __expectString(output.systemMessage),
1647+
testCaseScenarioId: __expectString(output.testCaseScenarioId),
1648+
testCaseScenarioType: __expectString(output.testCaseScenarioType),
1649+
} as any;
1650+
};
1651+
1652+
const deserializeAws_restJson1TestCaseScenariosList = (output: any, context: __SerdeContext): TestCaseScenario[] => {
1653+
const retVal = (output || [])
1654+
.filter((e: any) => e != null)
1655+
.map((entry: any) => {
1656+
if (entry === null) {
1657+
return null as any;
1658+
}
1659+
return deserializeAws_restJson1TestCaseScenario(entry, context);
1660+
});
1661+
return retVal;
1662+
};
1663+
16311664
const deserializeAws_restJson1TestResult = (output: any, context: __SerdeContext): TestResult => {
16321665
return {
16331666
groups: output.groups != null ? deserializeAws_restJson1GroupResultList(output.groups, context) : undefined,

0 commit comments

Comments
 (0)