Skip to main content

principal_things_v2s

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

Overview

Nameprincipal_things_v2s
TypeResource
Idaws.iot.principal_things_v2s

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
thing_namestringThe name of the thing. (pattern: <code>[a-zA-Z0-9:_-]+</code>)
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_principal_things_v2selectx-amzn-principal, regionnextToken, maxResults, thingPrincipalTypeLists the things associated with the specified principal. A principal can be an X.509 certificate or an Amazon Cognito ID. Requires permission to access the ListPrincipalThings 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)
x-amzn-principalstringThe principal. A principal can be an X.509 certificate or an Amazon Cognito ID.
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 things, 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 things associated with the specified principal. A principal can be an X.509 certificate or an Amazon Cognito ID. Requires permission to access the ListPrincipalThings action.

SELECT
thing_name,
thing_principal_type
FROM aws.iot.principal_things_v2s
WHERE `x-amzn-principal` = '{{ x-amzn-principal }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND thingPrincipalType = '{{ thingPrincipalType }}'
;