SecurityHub / Client / list_invitations

list_invitations#

SecurityHub.Client.list_invitations(**kwargs)#

Note

We recommend using Organizations instead of Security Hub invitations to manage your member accounts. For information, see Managing Security Hub administrator and member accounts with Organizations in the Security Hub User Guide.

Lists all Security Hub membership invitations that were sent to the calling account.

Only accounts that are managed by invitation can use this operation. Accounts that are managed using the integration with Organizations don’t receive invitations.

See also: AWS API Documentation

Request Syntax

response = client.list_invitations(
    MaxResults=123,
    NextToken='string'
)
Parameters:
  • 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 ListInvitations 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

{
    'Invitations': [
        {
            'AccountId': 'string',
            'InvitationId': 'string',
            'InvitedAt': datetime(2015, 1, 1),
            'MemberStatus': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Invitations (list) –

      The details of the invitations returned by the operation.

      • (dict) –

        Details about an invitation.

        • AccountId (string) –

          The account ID of the Security Hub administrator account that the invitation was sent from.

        • InvitationId (string) –

          The ID of the invitation sent to the member account.

        • InvitedAt (datetime) –

          The timestamp of when the invitation was sent.

        • MemberStatus (string) –

          The current status of the association between the member and administrator accounts.

    • 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