attached_policies
Creates, updates, deletes, gets or lists an attached_policies resource.
Overview
| Name | attached_policies |
| Type | Resource |
| Id | aws.iot.attached_policies |
Fields
The following fields are returned by SELECT queries:
- list_attached_policies
| Name | Datatype | Description |
|---|---|---|
policy_arn | string | The policy ARN. |
policy_name | string | The policy name. (pattern: <code>[\w+=,.@-]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_attached_policies | select | target, region | recursive, marker, pageSize | Lists 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
target | string | The 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). |
marker | string | The token to retrieve the next set of results. |
pageSize | integer | The maximum number of results to be returned per request. |
recursive | boolean | When true, recursively list attached policies. |
SELECT examples
- list_attached_policies
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 }}'
;