list_policy_principals

IoT.Client.list_policy_principals(**kwargs)

Lists the principals associated with the specified policy.

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

Requires permission to access the ListPolicyPrincipals 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_policy_principals(
    policyName='string',
    marker='string',
    pageSize=123,
    ascendingOrder=True|False
)
Parameters
  • policyName (string) --

    [REQUIRED]

    The policy name.

  • 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, the results are returned in ascending creation order.
Return type

dict

Returns

Response Syntax

{
    'principals': [
        'string',
    ],
    'nextMarker': 'string'
}

Response Structure

  • (dict) --

    The output from the ListPolicyPrincipals operation.

    • principals (list) --

      The descriptions of the principals.

      • (string) --
    • nextMarker (string) --

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

Exceptions

  • IoT.Client.exceptions.ResourceNotFoundException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException