- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListDetectorModelVersionsCommand
Lists all the versions of a detector model. Only the metadata associated with each detector model version is returned.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IoTEventsClient, ListDetectorModelVersionsCommand } from "@aws-sdk/client-iot-events"; // ES Modules import
// const { IoTEventsClient, ListDetectorModelVersionsCommand } = require("@aws-sdk/client-iot-events"); // CommonJS import
const client = new IoTEventsClient(config);
const input = { // ListDetectorModelVersionsRequest
detectorModelName: "STRING_VALUE", // required
nextToken: "STRING_VALUE",
maxResults: Number("int"),
};
const command = new ListDetectorModelVersionsCommand(input);
const response = await client.send(command);
// { // ListDetectorModelVersionsResponse
// detectorModelVersionSummaries: [ // DetectorModelVersionSummaries
// { // DetectorModelVersionSummary
// detectorModelName: "STRING_VALUE",
// detectorModelVersion: "STRING_VALUE",
// detectorModelArn: "STRING_VALUE",
// roleArn: "STRING_VALUE",
// creationTime: new Date("TIMESTAMP"),
// lastUpdateTime: new Date("TIMESTAMP"),
// status: "ACTIVE" || "ACTIVATING" || "INACTIVE" || "DEPRECATED" || "DRAFT" || "PAUSED" || "FAILED",
// evaluationMethod: "BATCH" || "SERIAL",
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListDetectorModelVersionsCommand Input
See ListDetectorModelVersionsCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
detectorModelName Required | string | undefined | The name of the detector model whose versions are returned. |
maxResults | number | undefined | The maximum number of results to be returned per request. |
nextToken | string | undefined | The token that you can use to return the next set of results. |
ListDetectorModelVersionsCommand Output
See ListDetectorModelVersionsCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
detectorModelVersionSummaries | DetectorModelVersionSummary[] | undefined | Summary information about the detector model versions. |
nextToken | string | undefined | The token that you can use to return the next set of results, or |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalFailureException | server | An internal failure occurred. |
InvalidRequestException | client | The request was invalid. |
ResourceNotFoundException | client | The resource was not found. |
ServiceUnavailableException | server | The service is currently unavailable. |
ThrottlingException | client | The request could not be completed due to throttling. |
IoTEventsServiceException | Base exception class for all service exceptions from IoTEvents service. |