GameLiftStreams / Client / list_stream_sessions_by_account

list_stream_sessions_by_account

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.

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.

See also: AWS API Documentation

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
)
Parameters:
  • Status (string) – Filter by the stream session status. You can specify one status in each request to retrieve only sessions that are currently in that status.

  • ExportFilesStatus (string) – 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.

  • NextToken (string) – 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.

  • MaxResults (integer) – The number of results to return. Use this parameter with NextToken to return results in sequential pages. Default value is 25.

Return type:

dict

Returns:

Response Syntax

{
    'Items': [
        {
            'Arn': 'string',
            'UserId': 'string',
            'Status': 'ACTIVATING'|'ACTIVE'|'CONNECTED'|'PENDING_CLIENT_RECONNECTION'|'RECONNECTING'|'TERMINATING'|'TERMINATED'|'ERROR',
            '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.

        • Arn (string) –

          An Amazon Resource Name (ARN) 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.

          • 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.

        • 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) 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 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 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

  • GameLiftStreams.Client.exceptions.AccessDeniedException

  • GameLiftStreams.Client.exceptions.ThrottlingException

  • GameLiftStreams.Client.exceptions.InternalServerException

  • GameLiftStreams.Client.exceptions.ValidationException