ListProvisioningTemplatesCommand

Lists the provisioning templates in your Amazon Web Services account.

Requires permission to access the ListProvisioningTemplates  action.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { IoTClient, ListProvisioningTemplatesCommand } from "@aws-sdk/client-iot"; // ES Modules import
// const { IoTClient, ListProvisioningTemplatesCommand } = require("@aws-sdk/client-iot"); // CommonJS import
const client = new IoTClient(config);
const input = { // ListProvisioningTemplatesRequest
  maxResults: Number("int"),
  nextToken: "STRING_VALUE",
};
const command = new ListProvisioningTemplatesCommand(input);
const response = await client.send(command);
// { // ListProvisioningTemplatesResponse
//   templates: [ // ProvisioningTemplateListing
//     { // ProvisioningTemplateSummary
//       templateArn: "STRING_VALUE",
//       templateName: "STRING_VALUE",
//       description: "STRING_VALUE",
//       creationDate: new Date("TIMESTAMP"),
//       lastModifiedDate: new Date("TIMESTAMP"),
//       enabled: true || false,
//       type: "FLEET_PROVISIONING" || "JITP",
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListProvisioningTemplatesCommand Input

Parameter
Type
Description
maxResults
number | undefined

The maximum number of results to return at one time.

nextToken
string | undefined

A token to retrieve the next set of results.

ListProvisioningTemplatesCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
nextToken
string | undefined

A token to retrieve the next set of results.

templates
ProvisioningTemplateSummary[] | undefined

A list of provisioning templates

Throws

Name
Fault
Details
InternalFailureException
server

An unexpected error has occurred.

InvalidRequestException
client

The request is not valid.

ThrottlingException
client

The rate exceeds the limit.

UnauthorizedException
client

You are not authorized to perform this operation.

IoTServiceException
Base exception class for all service exceptions from IoT service.