thing_principals_v2s
Creates, updates, deletes, gets or lists a thing_principals_v2s resource.
Overview
| Name | thing_principals_v2s |
| Type | Resource |
| Id | aws.iot.thing_principals_v2s |
Fields
The following fields are returned by SELECT queries:
- list_thing_principals_v2
| Name | Datatype | Description |
|---|---|---|
principal | string | The principal of the thing principal object. |
thing_principal_type | string | The type of the relation you want to specify when you attach a principal to a thing. The value defaults to NON_EXCLUSIVE_THING. EXCLUSIVE_THING - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s attached to the principal. NON_EXCLUSIVE_THING - Attaches the specified principal to the specified thing. Multiple things can be attached to the principal. (EXCLUSIVE_THING, NON_EXCLUSIVE_THING) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_thing_principals_v2 | select | thing_name, region | nextToken, maxResults, thingPrincipalType | Lists the principals associated with the specified thing. A principal can be an X.509 certificate or an Amazon Cognito ID. Requires permission to access the ListThingPrincipals action. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
thing_name | string | The name of the thing. |
maxResults | integer | The maximum number of results to return in this operation. |
nextToken | string | To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results. |
thingPrincipalType | string | The type of the relation you want to filter in the response. If no value is provided in this field, the response will list all principals, including both the EXCLUSIVE_THING and NON_EXCLUSIVE_THING attachment types. EXCLUSIVE_THING - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s attached to the principal. NON_EXCLUSIVE_THING - Attaches the specified principal to the specified thing. Multiple things can be attached to the principal. |
SELECT examples
- list_thing_principals_v2
Lists the principals associated with the specified thing. A principal can be an X.509 certificate or an Amazon Cognito ID. Requires permission to access the ListThingPrincipals action.
SELECT
principal,
thing_principal_type
FROM aws.iot.thing_principals_v2s
WHERE thing_name = '{{ thing_name }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND thingPrincipalType = '{{ thingPrincipalType }}'
;