list_members

list_members(**kwargs)

Lists details about all member accounts for the current Security Hub administrator account.

The results include both member accounts that belong to an organization and member accounts that were invited manually.

See also: AWS API Documentation

Request Syntax

response = client.list_members(
    OnlyAssociated=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • OnlyAssociated (boolean) --

    Specifies which member accounts to include in the response based on their relationship status with the administrator account. The default value is TRUE .

    If OnlyAssociated is set to TRUE , the response includes member accounts whose relationship status with the administrator account is set to ENABLED .

    If OnlyAssociated is set to FALSE , the response includes all existing member accounts.

  • MaxResults (integer) -- The maximum number of items to return in the response.
  • NextToken (string) --

    The token that is required for pagination. On your first call to the ListMembers operation, set the value of this parameter to NULL .

    For subsequent calls to the operation, to continue listing data, set the value of this parameter to the value returned from the previous response.

Return type

dict

Returns

Response Syntax

{
    'Members': [
        {
            'AccountId': 'string',
            'Email': 'string',
            'MasterId': 'string',
            'AdministratorId': 'string',
            'MemberStatus': 'string',
            'InvitedAt': datetime(2015, 1, 1),
            'UpdatedAt': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Members (list) --

      Member details returned by the operation.

      • (dict) --

        The details about a member account.

        • AccountId (string) --

          The Amazon Web Services account ID of the member account.

        • Email (string) --

          The email address of the member account.

        • MasterId (string) --

          This is replaced by AdministratorID .

          The Amazon Web Services account ID of the Security Hub administrator account associated with this member account.

        • AdministratorId (string) --

          The Amazon Web Services account ID of the Security Hub administrator account associated with this member account.

        • MemberStatus (string) --

          The status of the relationship between the member account and its administrator account.

          The status can have one of the following values:

          • Created - Indicates that the administrator account added the member account, but has not yet invited the member account.
          • Invited - Indicates that the administrator account invited the member account. The member account has not yet responded to the invitation.
          • Enabled - Indicates that the member account is currently active. For manually invited member accounts, indicates that the member account accepted the invitation.
          • Removed - Indicates that the administrator account disassociated the member account.
          • Resigned - Indicates that the member account disassociated themselves from the administrator account.
          • Deleted - Indicates that the administrator account deleted the member account.
          • AccountSuspended - Indicates that an organization account was suspended from Amazon Web Services at the same time that the administrator account tried to enable the organization account as a member account.
        • InvitedAt (datetime) --

          A timestamp for the date and time when the invitation was sent to the member account.

        • UpdatedAt (datetime) --

          The timestamp for the date and time when the member account was updated.

    • NextToken (string) --

      The pagination token to use to request the next page of results.

Exceptions

  • SecurityHub.Client.exceptions.InternalException
  • SecurityHub.Client.exceptions.InvalidInputException
  • SecurityHub.Client.exceptions.InvalidAccessException
  • SecurityHub.Client.exceptions.LimitExceededException