:doc:`SecurityIncidentResponse <../../security-ir>` / Client / list_memberships

****************
list_memberships
****************



.. py:method:: SecurityIncidentResponse.Client.list_memberships(**kwargs)

  

  Returns the memberships that the calling principal can access.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/security-ir-2018-05-10/ListMemberships>`_  


  **Request Syntax**
  ::

    response = client.list_memberships(
        nextToken='string',
        maxResults=123
    )
    
  :type nextToken: string
  :param nextToken: 

    An optional string that, if supplied, must be copied from the output of a previous call to ListMemberships. When provided in this manner, the API fetches the next page of results.

    

  
  :type maxResults: integer
  :param maxResults: 

    Request element for ListMemberships to limit the number of responses.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'nextToken': 'string',
          'items': [
              {
                  'membershipId': 'string',
                  'accountId': 'string',
                  'region': 'af-south-1'|'ap-east-1'|'ap-east-2'|'ap-northeast-1'|'ap-northeast-2'|'ap-northeast-3'|'ap-south-1'|'ap-south-2'|'ap-southeast-1'|'ap-southeast-2'|'ap-southeast-3'|'ap-southeast-4'|'ap-southeast-5'|'ap-southeast-6'|'ap-southeast-7'|'ca-central-1'|'ca-west-1'|'cn-north-1'|'cn-northwest-1'|'eu-central-1'|'eu-central-2'|'eu-north-1'|'eu-south-1'|'eu-south-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'il-central-1'|'me-central-1'|'me-south-1'|'mx-central-1'|'sa-east-1'|'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2',
                  'membershipArn': 'string',
                  'membershipStatus': 'Active'|'Cancelled'|'Terminated'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **nextToken** *(string) --* 

        An optional string that, if supplied on subsequent calls to ListMemberships, allows the API to fetch the next page of results.

        
      

      - **items** *(list) --* 

        Request element for ListMemberships including the accountID, membershipARN, membershipID, membershipStatus, and region for each response.

        
        

        - *(dict) --* 
          

          - **membershipId** *(string) --* 
          

          - **accountId** *(string) --* 
          

          - **region** *(string) --* 
          

          - **membershipArn** *(string) --* 
          

          - **membershipStatus** *(string) --* 
      
    
  
  **Exceptions**
  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.ValidationException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.SecurityIncidentResponseNotActiveException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.InternalServerException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.ThrottlingException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.ConflictException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.InvalidTokenException`

  