Menu
AWS IoT
Developer Guide

GetEffectivePolicies

Gets effective policies.

Request syntax:

POST /effective-policies?thingName=thingName Content-type: application/json { "principal": "string", "cognitoIdentityPoolId": "string" }

URI Request Parameters:

Name

Type

Req?

Description

thingName

ThingName

no

The thing name.

Request Body Parameters:

Name

Type

Req?

Description

principal

Principal

no

The principal.

cognitoIdentityPoolId

CognitoIdentityPoolId

no

The Cognito identity pool ID.

Response syntax:

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

Response Body Parameters:

Name

Type

Req?

Description

effectivePolicies

EffectivePolicies

no

The effective policies.

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 get-effective-policies \ [--principal <value>] \ [--cognito-identity-pool-id <value>] \ [--thing-name <value>] \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

{ "principal": "string", "cognitoIdentityPoolId": "string", "thingName": "string" }

cli-input-json fields:

Name

Type

Description

principal

string

The principal.

cognitoIdentityPoolId

string

The Cognito identity pool ID.

thingName

string

length max:128 min:1

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

The thing name.

Output:

{ "effectivePolicies": [ { "policyName": "string", "policyArn": "string", "policyDocument": "string" } ] }

cli output fields:

Name

Type

Description

effectivePolicies

list

member: EffectivePolicy

java class: java.util.List

The effective policies.

EffectivePolicy

EffectivePolicy

policyName

string

length max:128 min:1

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

The policy name.

policyArn

string

The policy ARN.

policyDocument

string

The IAM policy document.

On this page: