Skip to content

Commit

Permalink
feat(client-iotdeviceadvisor): Added new service feature (Early acces…
Browse files Browse the repository at this point in the history
…s 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.
  • Loading branch information
awstools committed Jul 22, 2022
1 parent 0aaceaf commit bb17b0c
Show file tree
Hide file tree
Showing 6 changed files with 373 additions and 46 deletions.
18 changes: 9 additions & 9 deletions clients/client-iotdeviceadvisor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

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

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

## Installing

Expand Down
18 changes: 9 additions & 9 deletions clients/client-iotdeviceadvisor/src/IotDeviceAdvisor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ import {
import { IotDeviceAdvisorClient } from "./IotDeviceAdvisorClient";

/**
* <p>Amazon Web Services IoT Core Device Advisor is a cloud-based, fully managed test capability for
* validating IoT devices during device software development. Device Advisor provides
* pre-built tests that you can use to validate IoT devices for reliable and secure
* connectivity with Amazon Web Services IoT Core before deploying devices to production. By using Device Advisor,
* you can confirm that your devices can connect to Amazon Web Services IoT Core, follow security
* best practices and, if applicable, receive software updates from IoT Device Management.
* You can also download signed qualification reports to submit to the Amazon Web Services Partner Network
* to get your device qualified for the Amazon Web Services Partner Device Catalog without the need to send
* your device in and wait for it to be tested.</p>
* <p>Amazon Web Services IoT Core Device Advisor is a cloud-based, fully managed test capability for validating IoT
* devices during device software development. Device Advisor provides pre-built tests that you
* can use to validate IoT devices for reliable and secure connectivity with Amazon Web Services IoT Core
* before deploying devices to production. By using Device Advisor, you can confirm that your
* devices can connect to Amazon Web Services IoT Core, follow security best practices and, if applicable,
* receive software updates from IoT Device Management. You can also download signed
* qualification reports to submit to the Amazon Web Services Partner Network to get your device
* qualified for the Amazon Web Services Partner Device Catalog without the need to send your device in
* and wait for it to be tested.</p>
*/
export class IotDeviceAdvisor extends IotDeviceAdvisorClient {
/**
Expand Down
18 changes: 9 additions & 9 deletions clients/client-iotdeviceadvisor/src/IotDeviceAdvisorClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,15 +270,15 @@ type IotDeviceAdvisorClientResolvedConfigType = __SmithyResolvedConfiguration<__
export interface IotDeviceAdvisorClientResolvedConfig extends IotDeviceAdvisorClientResolvedConfigType {}

/**
* <p>Amazon Web Services IoT Core Device Advisor is a cloud-based, fully managed test capability for
* validating IoT devices during device software development. Device Advisor provides
* pre-built tests that you can use to validate IoT devices for reliable and secure
* connectivity with Amazon Web Services IoT Core before deploying devices to production. By using Device Advisor,
* you can confirm that your devices can connect to Amazon Web Services IoT Core, follow security
* best practices and, if applicable, receive software updates from IoT Device Management.
* You can also download signed qualification reports to submit to the Amazon Web Services Partner Network
* to get your device qualified for the Amazon Web Services Partner Device Catalog without the need to send
* your device in and wait for it to be tested.</p>
* <p>Amazon Web Services IoT Core Device Advisor is a cloud-based, fully managed test capability for validating IoT
* devices during device software development. Device Advisor provides pre-built tests that you
* can use to validate IoT devices for reliable and secure connectivity with Amazon Web Services IoT Core
* before deploying devices to production. By using Device Advisor, you can confirm that your
* devices can connect to Amazon Web Services IoT Core, follow security best practices and, if applicable,
* receive software updates from IoT Device Management. You can also download signed
* qualification reports to submit to the Amazon Web Services Partner Network to get your device
* qualified for the Amazon Web Services Partner Device Catalog without the need to send your device in
* and wait for it to be tested.</p>
*/
export class IotDeviceAdvisorClient extends __Client<
__HttpHandlerOptions,
Expand Down
164 changes: 151 additions & 13 deletions clients/client-iotdeviceadvisor/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ export namespace DeviceUnderTest {
});
}

export enum Protocol {
MqttV3_1_1 = "MqttV3_1_1",
MqttV5 = "MqttV5",
}

/**
* <p>Gets Suite Definition Configuration.</p>
*/
Expand All @@ -65,6 +70,11 @@ export interface SuiteDefinitionConfiguration {
*/
intendedForQualification?: boolean;

/**
* <p> Verifies if the test suite is a long duration test. </p>
*/
isLongDurationTest?: boolean;

/**
* <p>Gets test suite root group.</p>
*/
Expand All @@ -74,6 +84,11 @@ export interface SuiteDefinitionConfiguration {
* <p>Gets the device permission ARN.</p>
*/
devicePermissionRoleArn?: string;

/**
* <p> Gets the MQTT protocol that is configured in the suite definition.</p>
*/
protocol?: Protocol | string;
}

export namespace SuiteDefinitionConfiguration {
Expand Down Expand Up @@ -404,6 +419,109 @@ export enum Status {
STOPPING = "STOPPING",
}

export enum TestCaseScenarioStatus {
CANCELED = "CANCELED",
ERROR = "ERROR",
FAIL = "FAIL",
PASS = "PASS",
PASS_WITH_WARNINGS = "PASS_WITH_WARNINGS",
PENDING = "PENDING",
RUNNING = "RUNNING",
STOPPED = "STOPPED",
STOPPING = "STOPPING",
}

export enum TestCaseScenarioType {
Advanced = "Advanced",
Basic = "Basic",
}

/**
* <p>Provides test case scenario.</p>
*/
export interface TestCaseScenario {
/**
* <p>Provides test case scenario ID.</p>
*/
testCaseScenarioId?: string;

/**
* <p>Provides test case scenario type. Type is one of the following:</p>
* <ul>
* <li>
* <p>Advanced</p>
* </li>
* <li>
* <p>Basic</p>
* </li>
* </ul>
*/
testCaseScenarioType?: TestCaseScenarioType | string;

/**
* <p>Provides the test case scenario status. Status is one of the following:</p>
* <ul>
* <li>
* <p>
* <code>PASS</code>: Test passed.</p>
* </li>
* <li>
* <p>
* <code>FAIL</code>: Test failed.</p>
* </li>
* <li>
* <p>
* <code>PENDING</code>: Test has not started running but is scheduled.</p>
* </li>
* <li>
* <p>
* <code>RUNNING</code>: Test is running.</p>
* </li>
* <li>
* <p>
* <code>STOPPING</code>: Test is performing cleanup steps. You will see this
* status only if you stop a suite run.</p>
* </li>
* <li>
* <p>
* <code>STOPPED</code> Test is stopped. You will see this status only if you
* stop a suite run.</p>
* </li>
* <li>
* <p>
* <code>PASS_WITH_WARNINGS</code>: Test passed with warnings.</p>
* </li>
* <li>
* <p>
* <code>ERORR</code>: Test faced an error when running due to an internal
* issue.</p>
* </li>
* </ul>
*/
status?: TestCaseScenarioStatus | string;

/**
* <p>Provides test case scenario failure result.</p>
*/
failure?: string;

/**
* <p>
*
* </p>
*/
systemMessage?: string;
}

export namespace TestCaseScenario {
/**
* @internal
*/
export const filterSensitiveLog = (obj: TestCaseScenario): any => ({
...obj,
});
}

/**
* <p>Provides the test case run.</p>
*/
Expand All @@ -427,36 +545,39 @@ export interface TestCaseRun {
* <p>Provides the test case run status. Status is one of the following:</p>
* <ul>
* <li>
* <p>
* <p>
* <code>PASS</code>: Test passed.</p>
* </li>
* <li>
* <p>
* <p>
* <code>FAIL</code>: Test failed.</p>
* </li>
* <li>
* <p>
* <p>
* <code>PENDING</code>: Test has not started running but is scheduled.</p>
* </li>
* <li>
* <p>
* <p>
* <code>RUNNING</code>: Test is running.</p>
* </li>
* <li>
* <p>
* <code>STOPPING</code>: Test is performing cleanup steps. You will see this status only if you stop a suite run.</p>
* <p>
* <code>STOPPING</code>: Test is performing cleanup steps. You will see this
* status only if you stop a suite run.</p>
* </li>
* <li>
* <p>
* <code>STOPPED</code> Test is stopped. You will see this status only if you stop a suite run.</p>
* <p>
* <code>STOPPED</code> Test is stopped. You will see this status only if you
* stop a suite run.</p>
* </li>
* <li>
* <p>
* <p>
* <code>PASS_WITH_WARNINGS</code>: Test passed with warnings.</p>
* </li>
* <li>
* <p>
* <code>ERORR</code>: Test faced an error when running due to an internal issue.</p>
* <p>
* <code>ERORR</code>: Test faced an error when running due to an internal
* issue.</p>
* </li>
* </ul>
*/
Expand Down Expand Up @@ -486,6 +607,11 @@ export interface TestCaseRun {
* <p>Provides test case run failure result.</p>
*/
failure?: string;

/**
* <p> Provides the test scenarios for the test case run. </p>
*/
testScenarios?: TestCaseScenario[];
}

export namespace TestCaseRun {
Expand Down Expand Up @@ -693,6 +819,16 @@ export interface SuiteDefinitionInformation {
*/
intendedForQualification?: boolean;

/**
* <p> Verifies if the test suite is a long duration test. </p>
*/
isLongDurationTest?: boolean;

/**
* <p> Gets the MQTT protocol that is configured in the suite definition.</p>
*/
protocol?: Protocol | string;

/**
* <p>Date (in Unix epoch time) when the test suite was created.</p>
*/
Expand All @@ -710,7 +846,8 @@ export namespace SuiteDefinitionInformation {

export interface ListSuiteDefinitionsResponse {
/**
* <p>An array of objects that provide summaries of information about the suite definitions in the list.</p>
* <p>An array of objects that provide summaries of information about the suite definitions
* in the list.</p>
*/
suiteDefinitionInformationList?: SuiteDefinitionInformation[];

Expand Down Expand Up @@ -829,7 +966,8 @@ export namespace SuiteRunInformation {

export interface ListSuiteRunsResponse {
/**
* <p>An array of objects that provide summaries of information about the suite runs in the list.</p>
* <p>An array of objects that provide summaries of information about the suite runs in the
* list.</p>
*/
suiteRunsList?: SuiteRunInformation[];

Expand Down
33 changes: 33 additions & 0 deletions clients/client-iotdeviceadvisor/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import {
SuiteRunConfiguration,
SuiteRunInformation,
TestCaseRun,
TestCaseScenario,
TestResult,
ValidationException,
} from "../models/models_0";
Expand Down Expand Up @@ -1422,6 +1423,8 @@ const serializeAws_restJson1SuiteDefinitionConfiguration = (
...(input.devicePermissionRoleArn != null && { devicePermissionRoleArn: input.devicePermissionRoleArn }),
...(input.devices != null && { devices: serializeAws_restJson1DeviceUnderTestList(input.devices, context) }),
...(input.intendedForQualification != null && { intendedForQualification: input.intendedForQualification }),
...(input.isLongDurationTest != null && { isLongDurationTest: input.isLongDurationTest }),
...(input.protocol != null && { protocol: input.protocol }),
...(input.rootGroup != null && { rootGroup: input.rootGroup }),
...(input.suiteDefinitionName != null && { suiteDefinitionName: input.suiteDefinitionName }),
};
Expand Down Expand Up @@ -1510,6 +1513,8 @@ const deserializeAws_restJson1SuiteDefinitionConfiguration = (
devicePermissionRoleArn: __expectString(output.devicePermissionRoleArn),
devices: output.devices != null ? deserializeAws_restJson1DeviceUnderTestList(output.devices, context) : undefined,
intendedForQualification: __expectBoolean(output.intendedForQualification),
isLongDurationTest: __expectBoolean(output.isLongDurationTest),
protocol: __expectString(output.protocol),
rootGroup: __expectString(output.rootGroup),
suiteDefinitionName: __expectString(output.suiteDefinitionName),
} as any;
Expand All @@ -1527,6 +1532,8 @@ const deserializeAws_restJson1SuiteDefinitionInformation = (
? deserializeAws_restJson1DeviceUnderTestList(output.defaultDevices, context)
: undefined,
intendedForQualification: __expectBoolean(output.intendedForQualification),
isLongDurationTest: __expectBoolean(output.isLongDurationTest),
protocol: __expectString(output.protocol),
suiteDefinitionId: __expectString(output.suiteDefinitionId),
suiteDefinitionName: __expectString(output.suiteDefinitionName),
} as any;
Expand Down Expand Up @@ -1612,6 +1619,10 @@ const deserializeAws_restJson1TestCaseRun = (output: any, context: __SerdeContex
testCaseDefinitionId: __expectString(output.testCaseDefinitionId),
testCaseDefinitionName: __expectString(output.testCaseDefinitionName),
testCaseRunId: __expectString(output.testCaseRunId),
testScenarios:
output.testScenarios != null
? deserializeAws_restJson1TestCaseScenariosList(output.testScenarios, context)
: undefined,
warnings: __expectString(output.warnings),
} as any;
};
Expand All @@ -1628,6 +1639,28 @@ const deserializeAws_restJson1TestCaseRuns = (output: any, context: __SerdeConte
return retVal;
};

const deserializeAws_restJson1TestCaseScenario = (output: any, context: __SerdeContext): TestCaseScenario => {
return {
failure: __expectString(output.failure),
status: __expectString(output.status),
systemMessage: __expectString(output.systemMessage),
testCaseScenarioId: __expectString(output.testCaseScenarioId),
testCaseScenarioType: __expectString(output.testCaseScenarioType),
} as any;
};

const deserializeAws_restJson1TestCaseScenariosList = (output: any, context: __SerdeContext): TestCaseScenario[] => {
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1TestCaseScenario(entry, context);
});
return retVal;
};

const deserializeAws_restJson1TestResult = (output: any, context: __SerdeContext): TestResult => {
return {
groups: output.groups != null ? deserializeAws_restJson1GroupResultList(output.groups, context) : undefined,
Expand Down
Loading

0 comments on commit bb17b0c

Please sign in to comment.