ListDimensionsCommand

List the set of dimensions that are defined for your Amazon Web Services accounts.

Requires permission to access the ListDimensions  action.

Example Syntax

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

import { IoTClient, ListDimensionsCommand } from "@aws-sdk/client-iot"; // ES Modules import
// const { IoTClient, ListDimensionsCommand } = require("@aws-sdk/client-iot"); // CommonJS import
const client = new IoTClient(config);
const input = { // ListDimensionsRequest
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
};
const command = new ListDimensionsCommand(input);
const response = await client.send(command);
// { // ListDimensionsResponse
//   dimensionNames: [ // DimensionNames
//     "STRING_VALUE",
//   ],
//   nextToken: "STRING_VALUE",
// };

ListDimensionsCommand Input

See ListDimensionsCommandInput for more details

Parameter
Type
Description
maxResults
number | undefined

The maximum number of results to retrieve at one time.

nextToken
string | undefined

The token for the next set of results.

ListDimensionsCommand Output

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

A list of the names of the defined dimensions. Use DescribeDimension to get details for a dimension.

nextToken
string | undefined

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

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.

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