Skip to main content

thing_principals_v2s

Creates, updates, deletes, gets or lists a thing_principals_v2s resource.

Overview

Namething_principals_v2s
TypeResource
Idaws.iot.thing_principals_v2s

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
principalstringThe principal of the thing principal object.
thing_principal_typestringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
list_thing_principals_v2selectthing_name, regionnextToken, maxResults, thingPrincipalTypeLists 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
thing_namestringThe name of the thing.
maxResultsintegerThe maximum number of results to return in this operation.
nextTokenstringTo retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
thingPrincipalTypestringThe 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

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 }}'
;