- 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.
ListDetectorModelsCommand
Lists the detector models you have created. Only the metadata associated with each detector model is returned.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IoTEventsClient, ListDetectorModelsCommand } from "@aws-sdk/client-iot-events"; // ES Modules import
// const { IoTEventsClient, ListDetectorModelsCommand } = require("@aws-sdk/client-iot-events"); // CommonJS import
const client = new IoTEventsClient(config);
const input = { // ListDetectorModelsRequest
nextToken: "STRING_VALUE",
maxResults: Number("int"),
};
const command = new ListDetectorModelsCommand(input);
const response = await client.send(command);
// { // ListDetectorModelsResponse
// detectorModelSummaries: [ // DetectorModelSummaries
// { // DetectorModelSummary
// detectorModelName: "STRING_VALUE",
// detectorModelDescription: "STRING_VALUE",
// creationTime: new Date("TIMESTAMP"),
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListDetectorModelsCommand Input
See ListDetectorModelsCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
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. |
ListDetectorModelsCommand Output
See ListDetectorModelsCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
detectorModelSummaries | DetectorModelSummary[] | undefined | Summary information about the detector models. |
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. |
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. |