v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-142381,278956.3 KB

Tests if a specified principal is authorized to perform an IoT action on a specified resource. Use this to test and debug the authorization behavior of devices that connect to the IoT device gateway.

Requires permission to access the TestAuthorization action.

post/test-authorization

Query parameters

clientIdstring

The MQTT client ID.

Request body

principalstring

The principal. Valid principals are CertificateArn (arn:aws:iot:<i>region</i>:<i>accountId</i>:cert/<i>certificateId</i>), thingGroupArn (arn:aws:iot:<i>region</i>:<i>accountId</i>:thinggroup/<i>groupName</i>) and CognitoId (<i>region</i>:<i>id</i>).

cognitoIdentityPoolIdstring

The Cognito identity pool ID.

policyNamesToAddPolicyName[]

When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.

policyNamesToSkipPolicyName[]

When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.

Response

Success