Menu
AWS IoT
Developer Guide

ListPolicyPrincipals

Lists the principals associated with the specified policy.

Note: This API is deprecated. Please use ListTargetsForPolicy instead.

Request syntax:

GET /policy-principals?marker=marker&pageSize=pageSize&isAscendingOrder=ascendingOrder x-amzn-iot-policy: policyName

URI Request Parameters:

Name

Type

Req?

Description

policyName

PolicyName

yes

The policy name.

marker

Marker

no

The marker for the next set of results.

pageSize

PageSize

no

The result page size.

ascendingOrder

AscendingOrder

no

Specifies the order for results. If true, the results are returned in ascending creation order.

Response syntax:

Content-type: application/json { "principals": [ "string" ], "nextMarker": "string" }

Response Body Parameters:

Name

Type

Req?

Description

principals

Principals

no

The descriptions of the principals.

nextMarker

Marker

no

The marker for the next set of results, or null if there are no additional results.

Errors:

ResourceNotFoundException

The specified resource does not exist.

HTTP response code: 404

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

CLI

Synopsis:

aws iot list-policy-principals \ --policy-name <value> \ [--marker <value>] \ [--page-size <value>] \ [--ascending-order | --no-ascending-order] \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

{ "policyName": "string", "marker": "string", "pageSize": "integer", "ascendingOrder": "boolean" }

cli-input-json fields:

Name

Type

Description

policyName

string

length max:128 min:1

pattern: [w+=,.@-]+

The policy name.

marker

string

pattern: [A-Za-z0-9+/]+={0,2}

The marker for the next set of results.

pageSize

integer

java class: java.lang.Integer

range- max:250 min:1

The result page size.

ascendingOrder

boolean

Specifies the order for results. If true, the results are returned in ascending creation order.

Output:

{ "principals": [ "string" ], "nextMarker": "string" }

cli output fields:

Name

Type

Description

principals

list

member: PrincipalArn

java class: java.util.List

The descriptions of the principals.

PrincipalArn

string

nextMarker

string

pattern: [A-Za-z0-9+/]+={0,2}

The marker for the next set of results, or null if there are no additional results.

On this page: