Menu
AWS IoT
Developer Guide

ListTargetsForPolicy

List targets for the specified policy.

Request syntax:

POST /policy-targets/policyName?marker=marker&pageSize=pageSize

URI Request Parameters:

Name

Type

Req?

Description

policyName

PolicyName

yes

The policy name.

marker

Marker

no

A marker used to get the next set of results.

pageSize

PageSize

no

The maximum number of results to return at one time.

Response syntax:

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

Response Body Parameters:

Name

Type

Req?

Description

targets

PolicyTargets

no

The policy targets.

nextMarker

Marker

no

A marker used to get the next set of 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

LimitExceededException

The number of attached entities exceeds the limit.

HTTP response code: 410

CLI

Synopsis:

aws iot list-targets-for-policy \ --policy-name <value> \ [--marker <value>] \ [--page-size <value>] \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

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

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}

A marker used to get the next set of results.

pageSize

integer

java class: java.lang.Integer

range- max:250 min:1

The maximum number of results to return at one time.

Output:

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

cli output fields:

Name

Type

Description

targets

list

member: PolicyTarget

java class: java.util.List

The policy targets.

PolicyTarget

string

nextMarker

string

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

A marker used to get the next set of results.

On this page: