Menu
AWS IoT
Developer Guide

ListPrincipalThings

Lists the things associated with the specified principal.

Request syntax:

GET /principals/things?maxResults=maxResults&nextToken=nextToken x-amzn-principal: principal

URI Request Parameters:

Name

Type

Req?

Description

nextToken

NextToken

no

The token used to get the next set of results, or null if there are no additional results.

maxResults

RegistryMaxResults

no

The maximum number of results to return in this operation.

principal

Principal

yes

The principal.

Response syntax:

Content-type: application/json { "things": [ "string" ], "nextToken": "string" }

Response Body Parameters:

Name

Type

Req?

Description

things

ThingNameList

no

The things.

nextToken

NextToken

no

The token used to get the next set of results, or null if there are no additional results.

Errors:

InvalidRequestException

The contents of the request were invalid. For example, this code is returned when an UpdateJobExecution request contains invalid status details. The message contains details about the error.

HTTP response code: 400

ThrottlingException

The rate exceeds the limit.

HTTP response code: 429

UnauthorizedException

You are not authorized to perform this operation.

HTTP response code: 401

ServiceUnavailableException

The service is temporarily unavailable.

HTTP response code: 503

InternalFailureException

An unexpected error has occurred.

HTTP response code: 500

ResourceNotFoundException

The specified resource does not exist.

HTTP response code: 404

CLI

Synopsis:

aws iot list-principal-things \ [--next-token <value>] \ [--max-results <value>] \ --principal <value> \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

{ "nextToken": "string", "maxResults": "integer", "principal": "string" }

cli-input-json fields:

Name

Type

Description

nextToken

string

The token used to get the next set of results, or null if there are no additional results.

maxResults

integer

java class: java.lang.Integer

range- max:250 min:1

The maximum number of results to return in this operation.

principal

string

The principal.

Output:

{ "things": [ "string" ], "nextToken": "string" }

cli output fields:

Name

Type

Description

things

list

member: ThingName

The things.

ThingName

string

length max:128 min:1

pattern: [a-zA-Z0-9:_-]+

nextToken

string

The token used to get the next set of results, or null if there are no additional results.

On this page: