Organizations / Paginator / ListAccountsForParent

ListAccountsForParent

class Organizations.Paginator.ListAccountsForParent
paginator = client.get_paginator('list_accounts_for_parent')
paginate(**kwargs)

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

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

    The unique identifier (ID) for the parent root or organization unit (OU) whose accounts you want to list.

  • 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

{
    'Accounts': [
        {
            'Id': 'string',
            'Arn': 'string',
            'Email': 'string',
            'Name': 'string',
            'Status': 'ACTIVE'|'SUSPENDED'|'PENDING_CLOSURE',
            'State': 'PENDING_ACTIVATION'|'ACTIVE'|'SUSPENDED'|'PENDING_CLOSURE'|'CLOSED',
            'JoinedMethod': 'INVITED'|'CREATED',
            'JoinedTimestamp': datetime(2015, 1, 1)
        },
    ],

}

Response Structure

  • (dict) –

    • Accounts (list) –

      A list of the accounts in the specified root or OU.

      Warning

      The Status parameter in the API response will be retired on September 9, 2026. Although both the account State and account Status parameters are currently available in the Organizations APIs ( DescribeAccount, ListAccounts, ListAccountsForParent), we recommend that you update your scripts or other code to use the State parameter instead of Status before September 9, 2026.

      • (dict) –

        Contains information about an Amazon Web Services account that is a member of an organization.

        • Id (string) –

          The unique identifier (ID) of the account.

          The regex pattern for an account ID string requires exactly 12 digits.

        • Arn (string) –

          The Amazon Resource Name (ARN) of the account.

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

        • Email (string) –

          The email address associated with the Amazon Web Services account.

          The regex pattern for this parameter is a string of characters that represents a standard internet email address.

        • Name (string) –

          The friendly name of the account.

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

        • Status (string) –

          The status of the account in the organization.

          Warning

          The Status parameter in the Account object will be retired on September 9, 2026. Although both the account State and account Status parameters are currently available in the Organizations APIs ( DescribeAccount, ListAccounts, ListAccountsForParent), we recommend that you update your scripts or other code to use the State parameter instead of Status before September 9, 2026.

        • State (string) –

          Each state represents a specific phase in the account lifecycle. Use this information to manage account access, automate workflows, or trigger actions based on account state changes.

          For more information about account states and their implications, see Monitor the state of your Amazon Web Services accounts in the Organizations User Guide.

        • JoinedMethod (string) –

          The method by which the account joined the organization.

        • JoinedTimestamp (datetime) –

          The date the account became a part of the organization.