- 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.
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
See ListProvisioningTemplatesCommandInput for more details
Parameter | Type | Description |
---|
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
See ListProvisioningTemplatesCommandOutput for details
Parameter | Type | Description |
---|
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 |
---|
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. |