Menu
AWS IoT
Developer Guide

ListAttachedPolicies

ListAttachedPolicies

Lists the policies attached to the specified thing group.

https

Request syntax:

POST /attached-policies/target?recursive=recursive&pageSize=pageSize&marker=marker

URI Request Parameters:

Name

Type

Req?

Description

target

PolicyTarget

yes

The group for which the policies will be listed.

recursive

Recursive

no

When true, recursively list attached policies.

marker

Marker

no

The token to retrieve the next set of results.

pageSize

PageSize

no

The maximum number of results to be returned per request.

Response syntax:

Content-type: application/json { "policies": [ { "policyName": "string", "policyArn": "string" } ], "nextMarker": "string" }

Response Body Parameters:

Name

Type

Req?

Description

policies

Policies

no

The policies.

nextMarker

Marker

no

The token to retrieve the next set of results, or null if there are no more 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-attached-policies \ --target <value> \ [--recursive | --no-recursive] \ [--marker <value>] \ [--page-size <value>] \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

{ "target": "string", "recursive": "boolean", "marker": "string", "pageSize": "integer" }

cli-input-json fields:

Name

Type

Description

target

string

The group for which the policies will be listed.

recursive

boolean

When true, recursively list attached policies.

marker

string

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

The token to retrieve the next set of results.

pageSize

integer

range- max:250 min:1

The maximum number of results to be returned per request.

Output:

{ "policies": [ { "policyName": "string", "policyArn": "string" } ], "nextMarker": "string" }

cli output fields:

Name

Type

Description

policies

list

member: Policy

java class: java.util.List

The policies.

policyName

string

length- max:128 min:1

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

The policy name.

policyArn

string

The policy ARN.

nextMarker

string

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

The token to retrieve the next set of results, or null if there are no more results.

Errors:

ResourceNotFoundException

The specified resource does not exist.

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.

ThrottlingException

The rate exceeds the limit.

UnauthorizedException

You are not authorized to perform this operation.

ServiceUnavailableException

The service is temporarily unavailable.

InternalFailureException

An unexpected error has occurred.

LimitExceededException

The number of attached entities exceeds the limit.