Organizations / Paginator / ListTargetsForPolicy

ListTargetsForPolicy#

class Organizations.Paginator.ListTargetsForPolicy#
paginator = client.get_paginator('list_targets_for_policy')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from Organizations.Client.list_targets_for_policy().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PolicyId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • PolicyId (string) –

    [REQUIRED]

    The unique identifier (ID) of the policy whose attachments you want to know.

    The regex pattern for a policy ID string requires “p-” followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (_).

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'Targets': [
        {
            'TargetId': 'string',
            'Arn': 'string',
            'Name': 'string',
            'Type': 'ACCOUNT'|'ORGANIZATIONAL_UNIT'|'ROOT'
        },
    ],

}

Response Structure

  • (dict) –

    • Targets (list) –

      A list of structures, each of which contains details about one of the entities to which the specified policy is attached.

      • (dict) –

        Contains information about a root, OU, or account that a policy is attached to.

        • TargetId (string) –

          The unique identifier (ID) of the policy target.

          The regex pattern for a target ID string requires one of the following:

          • Root - A string that begins with “r-” followed by from 4 to 32 lowercase letters or digits.

          • Account - A string that consists of exactly 12 digits.

          • Organizational unit (OU) - A string that begins with “ou-” followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second “-” dash and from 8 to 32 additional lowercase letters or digits.

        • Arn (string) –

          The Amazon Resource Name (ARN) of the policy target.

          For more information about ARNs in Organizations, see ARN Formats Supported by Organizations in the Amazon Web Services Service Authorization Reference.

        • Name (string) –

          The friendly name of the policy target.

          The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.

        • Type (string) –

          The type of the policy target.