ListSecurityProfilesCommand

Lists the Device Defender security profiles you've created. You can filter security profiles by dimension or custom metric.

Requires permission to access the ListSecurityProfiles  action.

dimensionName and metricName cannot be used in the same request.

Example Syntax

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

import { IoTClient, ListSecurityProfilesCommand } from "@aws-sdk/client-iot"; // ES Modules import
// const { IoTClient, ListSecurityProfilesCommand } = require("@aws-sdk/client-iot"); // CommonJS import
const client = new IoTClient(config);
const input = { // ListSecurityProfilesRequest
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
  dimensionName: "STRING_VALUE",
  metricName: "STRING_VALUE",
};
const command = new ListSecurityProfilesCommand(input);
const response = await client.send(command);
// { // ListSecurityProfilesResponse
//   securityProfileIdentifiers: [ // SecurityProfileIdentifiers
//     { // SecurityProfileIdentifier
//       name: "STRING_VALUE", // required
//       arn: "STRING_VALUE", // required
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListSecurityProfilesCommand Input

Parameter
Type
Description
dimensionName
string | undefined

A filter to limit results to the security profiles that use the defined dimension. Cannot be used with metricName

maxResults
number | undefined

The maximum number of results to return at one time.

metricName
string | undefined

The name of the custom metric. Cannot be used with dimensionName.

nextToken
string | undefined

The token for the next set of results.

ListSecurityProfilesCommand Output

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

A token that can be used to retrieve the next set of results, or null if there are no additional results.

securityProfileIdentifiers
SecurityProfileIdentifier[] | undefined

A list of security profile identifiers (names and ARNs).

Throws

Name
Fault
Details
InternalFailureException
server

An unexpected error has occurred.

InvalidRequestException
client

The request is not valid.

ResourceNotFoundException
client

The specified resource does not exist.

ThrottlingException
client

The rate exceeds the limit.

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