Skip to main content

attached_policies

Creates, updates, deletes, gets or lists an attached_policies resource.

Overview​

Nameattached_policies
TypeResource
Idaws.iot.attached_policies

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
policy_arnstringThe policy ARN.
policy_namestringThe policy name. (pattern: <code>[\w+=,.@-]+</code>)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_attached_policiesselecttarget, regionrecursive, marker, pageSizeLists the policies attached to the specified thing group. Requires permission to access the ListAttachedPolicies 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)
targetstringThe group or principal for which the policies will be listed. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
markerstringThe token to retrieve the next set of results.
pageSizeintegerThe maximum number of results to be returned per request.
recursivebooleanWhen true, recursively list attached policies.

SELECT examples​

Lists the policies attached to the specified thing group. Requires permission to access the ListAttachedPolicies action.

SELECT
policy_arn,
policy_name
FROM aws.iot.attached_policies
WHERE target = '{{ target }}' -- required
AND region = '{{ region }}' -- required
AND recursive = '{{ recursive }}'
AND marker = '{{ marker }}'
AND pageSize = '{{ pageSize }}'
;