Skip to content

list_participants

list_participants(
    stage_arn: StageArn,
    session_id: StageSessionId,
    *,
    config_overrides: Optional[IVSRealTimeClientConfig] = None,
    filter_by_user_id: Optional[UserId] = None,
    filter_by_published: Optional[Published] = None,
    filter_by_state: Optional[ParticipantState] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxParticipantResults] = None,
    filter_by_recording_state: Optional[
        ParticipantRecordingFilterByRecordingState
    ] = None,
) -> ListParticipantsResponse

Lists all participants in a specified stage session.

Parameters:

  • stage_arn (StageArn) –

    Stage ARN.

  • session_id (StageSessionId) –

    ID of the session within the stage.

  • filter_by_user_id (Optional[UserId], default: None ) –

    Filters the response list to match the specified user ID. Only one of filterByUserId, filterByPublished, filterByState, or filterByRecordingState can be provided per request. A userId is a customer-assigned name to help identify the token; this can be used to link a participant to a user in the customer’s own systems.

  • filter_by_published (Optional[Published], default: None ) –

    Filters the response list to only show participants who published during the stage session. Only one of filterByUserId, filterByPublished, filterByState, or filterByRecordingState can be provided per request.

  • filter_by_state (Optional[ParticipantState], default: None ) –

    Filters the response list to only show participants in the specified state. Only one of filterByUserId, filterByPublished, filterByState, or filterByRecordingState can be provided per request.

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

    The first participant to retrieve. This is used for pagination; see the nextToken response field.

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

    Maximum number of results to return. Default: 50.

  • filter_by_recording_state (Optional[ParticipantRecordingFilterByRecordingState], default: None ) –

    Filters the response list to only show participants with the specified recording state. Only one of filterByUserId, filterByPublished, filterByState, or filterByRecordingState can be provided per request.

Raises:

Source code in docs_src/capo_ivs_realtime/_services/ivs_real_time.py
def list_participants(
    self,
    stage_arn: "capo_ivs_realtime.types.stage_arn.StageArn",
    session_id: "capo_ivs_realtime.types.stage_session_id.StageSessionId",
    *,
    config_overrides: Optional[IVSRealTimeClientConfig] = None,
    filter_by_user_id: Optional["capo_ivs_realtime.types.user_id.UserId"] = None,
    filter_by_published: Optional[
        "capo_ivs_realtime.types.published.Published"
    ] = None,
    filter_by_state: Optional[
        "capo_ivs_realtime.types.participant_state.ParticipantState"
    ] = None,
    next_token: Optional[
        "capo_ivs_realtime.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional[
        "capo_ivs_realtime.types.max_participant_results.MaxParticipantResults"
    ] = None,
    filter_by_recording_state: Optional[
        "capo_ivs_realtime.types.participant_recording_filter_by_recording_state.ParticipantRecordingFilterByRecordingState"
    ] = None,
) -> "capo_ivs_realtime.types.list_participants_response.ListParticipantsResponse":
    """<p>Lists all participants in a specified stage session.</p>

    Args:
        stage_arn: <p>Stage ARN.</p>
        session_id: <p>ID of the session within the stage.</p>
        filter_by_user_id: <p>Filters the response list to match the specified user ID. Only one of <code>filterByUserId</code>, <code>filterByPublished</code>, <code>filterByState</code>, or <code>filterByRecordingState</code> can be provided per request. A <code>userId</code> is a customer-assigned name to help identify the token; this can be used to link a participant to a user in the customer’s own systems.</p>
        filter_by_published: <p>Filters the response list to only show participants who published during the stage session. Only one of <code>filterByUserId</code>, <code>filterByPublished</code>, <code>filterByState</code>, or <code>filterByRecordingState</code> can be provided per request.</p>
        filter_by_state: <p>Filters the response list to only show participants in the specified state. Only one of <code>filterByUserId</code>, <code>filterByPublished</code>, <code>filterByState</code>, or <code>filterByRecordingState</code> can be provided per request.</p>
        next_token: <p>The first participant to retrieve. This is used for pagination; see the <code>nextToken</code> response field.</p>
        max_results: <p>Maximum number of results to return. Default: 50.</p>
        filter_by_recording_state: <p>Filters the response list to only show participants with the specified recording state. Only one of <code>filterByUserId</code>, <code>filterByPublished</code>, <code>filterByState</code>, or <code>filterByRecordingState</code> can be provided per request.</p>

    Raises:
        capo_ivs_realtime.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_ivs_realtime.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ivs_realtime.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ivs_realtime.types.list_participants_request.ListParticipantsRequest]",
    ) -> OperationResponse[
        "capo_ivs_realtime.types.list_participants_response.ListParticipantsResponse"
    ]:
        import capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.list_participants

        output, http_response = (
            capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.list_participants.list_participants(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListParticipants")
    )
    input_: capo_ivs_realtime.types.list_participants_request.ListParticipantsRequest = {
        "stage_arn": stage_arn,
        "session_id": session_id,
    }
    if filter_by_user_id is not None:
        input_["filter_by_user_id"] = filter_by_user_id
    if filter_by_published is not None:
        input_["filter_by_published"] = filter_by_published
    if filter_by_state is not None:
        input_["filter_by_state"] = filter_by_state
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if filter_by_recording_state is not None:
        input_["filter_by_recording_state"] = filter_by_recording_state

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