:doc:`Omics <../../omics>` / Client / list_shares

***********
list_shares
***********



.. py:method:: Omics.Client.list_shares(**kwargs)

  

  Retrieves the resource shares associated with an account. Use the filter parameter to retrieve a specific subset of the shares.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/omics-2022-11-28/ListShares>`_  


  **Request Syntax**
  ::

    response = client.list_shares(
        resourceOwner='SELF'|'OTHER',
        filter={
            'resourceArns': [
                'string',
            ],
            'status': [
                'PENDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'DELETED'|'FAILED',
            ],
            'type': [
                'VARIANT_STORE'|'ANNOTATION_STORE'|'WORKFLOW',
            ]
        },
        nextToken='string',
        maxResults=123
    )
    
  :type resourceOwner: string
  :param resourceOwner: **[REQUIRED]** 

    The account that owns the resource shares.

    

  
  :type filter: dict
  :param filter: 

    Attributes that you use to filter for a specific subset of resource shares.

    

  
    - **resourceArns** *(list) --* 

      Filter based on the Amazon Resource Number (ARN) of the resource. You can specify up to 10 values.

      

    
      - *(string) --* 

      
  
    - **status** *(list) --* 

      Filter based on the resource status. You can specify up to 10 values.

      

    
      - *(string) --* 

      
  
    - **type** *(list) --* 

      The type of resources to be filtered. You can specify one or more of the resource types.

      

    
      - *(string) --* 

      
  
  
  :type nextToken: string
  :param nextToken: 

    Next token returned in the response of a previous ListReadSetUploadPartsRequest call. Used to get the next page of results.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of shares to return in one page of results.

    

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

    
    ::

      {
          'shares': [
              {
                  'shareId': 'string',
                  'resourceArn': 'string',
                  'resourceId': 'string',
                  'principalSubscriber': 'string',
                  'ownerId': 'string',
                  'status': 'PENDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'DELETED'|'FAILED',
                  'statusMessage': 'string',
                  'shareName': 'string',
                  'creationTime': datetime(2015, 1, 1),
                  'updateTime': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **shares** *(list) --* 

        The shares available and their metadata details.

        
        

        - *(dict) --* 

          The details of a resource share.

          
          

          - **shareId** *(string) --* 

            The ID of the resource share.

            
          

          - **resourceArn** *(string) --* 

            The Arn of the shared resource.

            
          

          - **resourceId** *(string) --* 

            The ID of the shared resource.

            
          

          - **principalSubscriber** *(string) --* 

            The principal subscriber is the account that is sharing the resource.

            
          

          - **ownerId** *(string) --* 

            The account ID for the data owner. The owner creates the resource share.

            
          

          - **status** *(string) --* 

            The status of the share.

            
          

          - **statusMessage** *(string) --* 

            The status message for a resource share. It provides additional details about the share status.

            
          

          - **shareName** *(string) --* 

            The name of the resource share.

            
          

          - **creationTime** *(datetime) --* 

            The timestamp of when the resource share was created.

            
          

          - **updateTime** *(datetime) --* 

            The timestamp of the resource share update.

            
      
    
      

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

        Next token returned in the response of a previous ListSharesResponse call. Used to get the next page of results.

        
  
  **Exceptions**
  
  *   :py:class:`Omics.Client.exceptions.InternalServerException`

  
  *   :py:class:`Omics.Client.exceptions.ServiceQuotaExceededException`

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

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

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

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

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

  