Skip to content

list_stream_sessions_by_account

list_stream_sessions_by_account(
    *,
    config_overrides: Optional[GameLiftStreamsClientConfig] = None,
    status: Optional[StreamSessionStatus] = None,
    export_files_status: Optional[ExportFilesStatus] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListStreamSessionsByAccountOutput

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.

Parameters:

  • status (Optional[StreamSessionStatus], default: None ) –

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

  • export_files_status (Optional[ExportFilesStatus], default: None ) –

    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.

  • next_token (Optional[NextToken], default: None ) –

    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.

  • max_results (Optional[MaxResults], default: None ) –

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

Raises:

  • AccessDeniedException –

    You don't have the required permissions to access this Amazon GameLift Streams resource. Correct the permissions before you try again.

  • InternalServerException –

    The service encountered an internal error and is unable to complete the request.

  • ThrottlingException –

    The request was denied due to request throttling. Retry the request after the suggested wait time.

  • ValidationException –

    One or more parameter values in the request fail to satisfy the specified constraints. Correct the invalid parameter values before retrying the request.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_gameliftstreams/_services/game_lift_streams.py
def list_stream_sessions_by_account(
    self,
    *,
    config_overrides: Optional[GameLiftStreamsClientConfig] = None,
    status: Optional[
        "capo_gameliftstreams.types.stream_session_status.StreamSessionStatus"
    ] = None,
    export_files_status: Optional[
        "capo_gameliftstreams.types.export_files_status.ExportFilesStatus"
    ] = None,
    next_token: Optional["capo_gameliftstreams.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_gameliftstreams.types.max_results.MaxResults"
    ] = None,
) -> "capo_gameliftstreams.types.list_stream_sessions_by_account_output.ListStreamSessionsByAccountOutput":
    """<p>Retrieves a list of Amazon GameLift Streams stream sessions that this user account has access to.</p> <p>In the returned list of stream sessions, the <code>ExportFilesMetadata</code> property only shows the <code>Status</code> value. To get the <code>OutpurUri</code> and <code>StatusReason</code> values, use <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetStreamSession.html">GetStreamSession</a>.</p> <p>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 <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetStreamSession.html">GetStreamSession</a>.</p>

    Args:
        status: <p>Filter by the stream session status. You can specify one status in each request to retrieve only sessions that are currently in that status.</p>
        export_files_status: <p>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.</p>
        next_token: <p>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. </p>
        max_results: <p>The number of results to return. Use this parameter with <code>NextToken</code> to return results in sequential pages. Default value is <code>25</code>. </p>

    Raises:
        capo_gameliftstreams.errors.access_denied_exception.AccessDeniedException: <p>You don't have the required permissions to access this Amazon GameLift Streams resource. Correct the permissions before you try again.</p>
        capo_gameliftstreams.errors.internal_server_exception.InternalServerException: <p>The service encountered an internal error and is unable to complete the request.</p>
        capo_gameliftstreams.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request after the suggested wait time.</p>
        capo_gameliftstreams.errors.validation_exception.ValidationException: <p>One or more parameter values in the request fail to satisfy the specified constraints. Correct the invalid parameter values before retrying the request.</p>
        capo_gameliftstreams.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_gameliftstreams.types.list_stream_sessions_by_account_input.ListStreamSessionsByAccountInput]",
    ) -> OperationResponse[
        "capo_gameliftstreams.types.list_stream_sessions_by_account_output.ListStreamSessionsByAccountOutput"
    ]:
        import capo_gameliftstreams._operations.game_lift_streams.list_stream_sessions_by_account

        output, http_response = (
            capo_gameliftstreams._operations.game_lift_streams.list_stream_sessions_by_account.list_stream_sessions_by_account(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_gameliftstreams.types.list_stream_sessions_by_account_output.ListStreamSessionsByAccountOutput",
    ) -> dict[str, Any]:
        import capo_gameliftstreams.types.list_stream_sessions_by_account_output

        return capo_gameliftstreams.types.list_stream_sessions_by_account_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ListStreamSessionsByAccount", redact_output=_redact_output
        ),
    )
    input_: capo_gameliftstreams.types.list_stream_sessions_by_account_input.ListStreamSessionsByAccountInput = {}
    if status is not None:
        input_["status"] = status
    if export_files_status is not None:
        input_["export_files_status"] = export_files_status
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output