IoT / Client / list_attached_policies

list_attached_policies#

IoT.Client.list_attached_policies(**kwargs)#

Lists the policies attached to the specified thing group.

Requires permission to access the ListAttachedPolicies action.

See also: AWS API Documentation

Request Syntax

response = client.list_attached_policies(
    target='string',
    recursive=True|False,
    marker='string',
    pageSize=123
)
Parameters:
  • target (string) –

    [REQUIRED]

    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).

  • recursive (boolean) – When true, recursively list attached policies.

  • marker (string) – The token to retrieve the next set of results.

  • pageSize (integer) – The maximum number of results to be returned per request.

Return type:

dict

Returns:

Response Syntax

{
    'policies': [
        {
            'policyName': 'string',
            'policyArn': 'string'
        },
    ],
    'nextMarker': 'string'
}

Response Structure

  • (dict) –

    • policies (list) –

      The policies.

      • (dict) –

        Describes an IoT policy.

        • policyName (string) –

          The policy name.

        • policyArn (string) –

          The policy ARN.

    • nextMarker (string) –

      The token to retrieve the next set of results, or null if there are no more results.

Exceptions