IoT / Client / list_principal_policies

list_principal_policies#

IoT.Client.list_principal_policies(**kwargs)#

Lists the policies attached to the specified principal. If you use an Cognito identity, the ID must be in AmazonCognito Identity format.

Note: This action is deprecated and works as expected for backward compatibility, but we won’t add enhancements. Use ListAttachedPolicies instead.

Requires permission to access the ListPrincipalPolicies action.

Danger

This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response = client.list_principal_policies(
    principal='string',
    marker='string',
    pageSize=123,
    ascendingOrder=True|False
)
Parameters:
  • principal (string) –

    [REQUIRED]

    The principal. 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 marker for the next set of results.

  • pageSize (integer) – The result page size.

  • ascendingOrder (boolean) – Specifies the order for results. If true, results are returned in ascending creation order.

Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    The output from the ListPrincipalPolicies operation.

    • policies (list) –

      The policies.

      • (dict) –

        Describes an IoT policy.

        • policyName (string) –

          The policy name.

        • policyArn (string) –

          The policy ARN.

    • nextMarker (string) –

      The marker for the next set of results, or null if there are no additional results.

Exceptions