:doc:`GameLiftStreams <../../gameliftstreams>` / Client / list_stream_sessions_by_account

*******************************
list_stream_sessions_by_account
*******************************



.. py:method:: GameLiftStreams.Client.list_stream_sessions_by_account(**kwargs)

  

  Retrieves a list of Amazon GameLift Streams stream sessions that this user account has access to.

   

  In the returned list of stream sessions, the ``ExportFilesMetadata`` property only shows the ``Status`` value. To get the ``OutpurUri`` and ``StatusReason`` values, use `GetStreamSession <https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetStreamSession.html>`__.

   

  We don't recommend using this operation to regularly check stream session statuses because it's costly. Instead, to check status updates for a specific stream session, use `GetStreamSession <https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetStreamSession.html>`__.

  

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


  **Request Syntax**
  ::

    response = client.list_stream_sessions_by_account(
        Status='ACTIVATING'|'ACTIVE'|'CONNECTED'|'PENDING_CLIENT_RECONNECTION'|'RECONNECTING'|'TERMINATING'|'TERMINATED'|'ERROR',
        ExportFilesStatus='SUCCEEDED'|'FAILED'|'PENDING',
        NextToken='string',
        MaxResults=123
    )
    
  :type Status: string
  :param Status: 

    Filter by the stream session status. You can specify one status in each request to retrieve only sessions that are currently in that status.

    

  
  :type ExportFilesStatus: string
  :param ExportFilesStatus: 

    Filter by the exported files status. You can specify one status in each request to retrieve only sessions that currently have that exported files status.

    

  
  :type NextToken: string
  :param NextToken: 

    The token that marks the start of the next set of results. Use this token when you retrieve results as sequential pages. To get the first page of results, omit a token value. To get the remaining pages, provide the token returned with the previous result set.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The number of results to return. Use this parameter with ``NextToken`` to return results in sequential pages. Default value is ``25``.

    

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

    
    ::

      {
          'Items': [
              {
                  'Arn': 'string',
                  'UserId': 'string',
                  'Status': 'ACTIVATING'|'ACTIVE'|'CONNECTED'|'PENDING_CLIENT_RECONNECTION'|'RECONNECTING'|'TERMINATING'|'TERMINATED'|'ERROR',
                  'StatusReason': 'internalError'|'invalidSignalRequest'|'placementTimeout'|'applicationLogS3DestinationError'|'applicationExit'|'connectionTimeout'|'reconnectionTimeout'|'maxSessionLengthTimeout'|'idleTimeout'|'apiTerminated',
                  'Protocol': 'WebRTC',
                  'LastUpdatedAt': datetime(2015, 1, 1),
                  'CreatedAt': datetime(2015, 1, 1),
                  'ApplicationArn': 'string',
                  'ExportFilesMetadata': {
                      'Status': 'SUCCEEDED'|'FAILED'|'PENDING',
                      'StatusReason': 'string',
                      'OutputUri': 'string'
                  },
                  'Location': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Items** *(list) --* 

        A collection of Amazon GameLift Streams stream sessions that are associated with a stream group and returned in response to a list request. Each item includes stream session metadata and status.

        
        

        - *(dict) --* 

          Describes an Amazon GameLift Streams stream session. To retrieve additional details for the stream session, call `GetStreamSession <https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetStreamSession.html>`__.

          
          

          - **Arn** *(string) --* 

            An `Amazon Resource Name (ARN) <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html>`__ that uniquely identifies the stream session resource. Example ARN: ``arn:aws:gameliftstreams:us-west-2:111122223333:streamsession/sg-1AB2C3De4/ABC123def4567``.

            
          

          - **UserId** *(string) --* 

            An opaque, unique identifier for an end-user, defined by the developer.

            
          

          - **Status** *(string) --* 

            The current status of the stream session resource.

             

            
            * ``ACTIVATING``: The stream session is starting and preparing to stream.
             
            * ``ACTIVE``: The stream session is ready and waiting for a client connection. A client has ``ConnectionTimeoutSeconds`` (specified in ``StartStreamSession``) from when the session reaches ``ACTIVE`` state to establish a connection. If no client connects within this timeframe, the session automatically terminates.
             
            * ``CONNECTED``: The stream session has a connected client. A session will automatically terminate if there is no user input for 60 minutes, or if the maximum length of a session specified by ``SessionLengthSeconds`` in ``StartStreamSession`` is exceeded.
             
            * ``ERROR``: The stream session failed to activate. See ``StatusReason`` (returned by ``GetStreamSession`` and ``StartStreamSession``) for more information.
             
            * ``PENDING_CLIENT_RECONNECTION``: A client has recently disconnected and the stream session is waiting for the client to reconnect. A client has ``ConnectionTimeoutSeconds`` (specified in ``StartStreamSession``) from when the session reaches ``PENDING_CLIENT_RECONNECTION`` state to re-establish a connection. If no client connects within this timeframe, the session automatically terminates.
             
            * ``RECONNECTING``: A client has initiated a reconnect to a session that was in ``PENDING_CLIENT_RECONNECTION`` state.
             
            * ``TERMINATING``: The stream session is ending.
             
            * ``TERMINATED``: The stream session has ended.
            

            
          

          - **StatusReason** *(string) --* 

            A short description of the reason the stream session is in ``ERROR`` status or ``TERMINATED`` status.

             

            ``ERROR`` status reasons:

             

            
            * ``applicationLogS3DestinationError``: Could not write the application log to the Amazon S3 bucket that is configured for the streaming application. Make sure the bucket still exists.
             
            * ``internalError``: An internal service error occurred. Start a new stream session to continue streaming.
             
            * ``invalidSignalRequest``: The WebRTC signal request that was sent is not valid. When starting or reconnecting to a stream session, use ``generateSignalRequest`` in the Amazon GameLift Streams Web SDK to generate a new signal request.
             
            * ``placementTimeout``: Amazon GameLift Streams could not find available stream capacity to start a stream session. Increase the stream capacity in the stream group or wait until capacity becomes available.
            

             

            ``TERMINATED`` status reasons:

             

            
            * ``apiTerminated``: The stream session was terminated by an API call to `TerminateStreamSession <https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_TerminateStreamSession.html>`__.
             
            * ``applicationExit``: The streaming application exited or crashed. The stream session was terminated because the application is no longer running.
             
            * ``connectionTimeout``: The stream session was terminated because the client failed to connect within the connection timeout period specified by ``ConnectionTimeoutSeconds``.
             
            * ``idleTimeout``: The stream session was terminated because it exceeded the idle timeout period of 60 minutes with no user input activity.
             
            * ``maxSessionLengthTimeout``: The stream session was terminated because it exceeded the maximum session length timeout period specified by ``SessionLengthSeconds``.
             
            * ``reconnectionTimeout``: The stream session was terminated because the client failed to reconnect within the reconnection timeout period specified by ``ConnectionTimeoutSeconds`` after losing connection.
            

            
          

          - **Protocol** *(string) --* 

            The data transfer protocol in use with the stream session.

            
          

          - **LastUpdatedAt** *(datetime) --* 

            A timestamp that indicates when this resource was last updated. Timestamps are expressed using in ISO8601 format, such as: ``2022-12-27T22:29:40+00:00`` (UTC).

            
          

          - **CreatedAt** *(datetime) --* 

            A timestamp that indicates when this resource was created. Timestamps are expressed using in ISO8601 format, such as: ``2022-12-27T22:29:40+00:00`` (UTC).

            
          

          - **ApplicationArn** *(string) --* 

            An `Amazon Resource Name (ARN) <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html>`__ that uniquely identifies the application resource. Example ARN: ``arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6``.

            
          

          - **ExportFilesMetadata** *(dict) --* 

            Provides details about the stream session's exported files.

            
            

            - **Status** *(string) --* 

              The result of the `ExportStreamSessionFiles <https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_ExportStreamSessionFiles.html>`__ operation.

              
            

            - **StatusReason** *(string) --* 

              A short description of the reason the export is in ``FAILED`` status.

              
            

            - **OutputUri** *(string) --* 

              The S3 bucket URI where Amazon GameLift Streams uploaded the set of compressed exported files for a stream session. Amazon GameLift Streams generates a ZIP file name based on the stream session metadata. Alternatively, you can provide a custom file name with a ``.zip`` file extension.

               

              Example 1: If you provide an S3 URI called ``s3://amzn-s3-demo-destination-bucket/MyGame_Session1.zip``, then Amazon GameLift Streams will save the files at that location.

               

              Example 2: If you provide an S3 URI called ``s3://amzn-s3-demo-destination-bucket/MyGameSessions_ExportedFiles/``, then Amazon GameLift Streams will save the files at ``s3://amzn-s3-demo-destination-bucket/MyGameSessions_ExportedFiles/YYYYMMDD-HHMMSS-appId-sg-Id-sessionId.zip`` or another similar name.

              
        
          

          - **Location** *(string) --* 

            The location where Amazon GameLift Streams hosts and streams your application. For example, ``us-east-1``. For a complete list of locations that Amazon GameLift Streams supports, refer to `Regions, quotas, and limitations <https://docs.aws.amazon.com/gameliftstreams/latest/developerguide/regions-quotas.html>`__ in the *Amazon GameLift Streams Developer Guide*.

            
      
    
      

      - **NextToken** *(string) --* 

        A token that marks the start of the next sequential page of results. If an operation doesn't return a token, you've reached the end of the list.

        
  
  **Exceptions**
  
  *   :py:class:`GameLiftStreams.Client.exceptions.AccessDeniedException`

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

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

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

  