ListParticipantsCommand

Lists all participants in a specified stage session.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { IVSRealTimeClient, ListParticipantsCommand } from "@aws-sdk/client-ivs-realtime"; // ES Modules import
// const { IVSRealTimeClient, ListParticipantsCommand } = require("@aws-sdk/client-ivs-realtime"); // CommonJS import
const client = new IVSRealTimeClient(config);
const input = { // ListParticipantsRequest
  stageArn: "STRING_VALUE", // required
  sessionId: "STRING_VALUE", // required
  filterByUserId: "STRING_VALUE",
  filterByPublished: true || false,
  filterByState: "STRING_VALUE",
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
  filterByRecordingState: "STRING_VALUE",
};
const command = new ListParticipantsCommand(input);
const response = await client.send(command);
// { // ListParticipantsResponse
//   participants: [ // ParticipantList // required
//     { // ParticipantSummary
//       participantId: "STRING_VALUE",
//       userId: "STRING_VALUE",
//       state: "STRING_VALUE",
//       firstJoinTime: new Date("TIMESTAMP"),
//       published: true || false,
//       recordingState: "STRING_VALUE",
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListParticipantsCommand Input

See ListParticipantsCommandInput for more details

Parameter
Type
Description
sessionId
Required
string | undefined

ID of the session within the stage.

stageArn
Required
string | undefined

Stage ARN.

filterByPublished
boolean | undefined

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.

filterByRecordingState
ParticipantRecordingFilterByRecordingState | undefined

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.

filterByState
ParticipantState | undefined

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.

filterByUserId
string | undefined

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.

maxResults
number | undefined

Maximum number of results to return. Default: 50.

nextToken
string | undefined

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

ListParticipantsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
participants
Required
ParticipantSummary[] | undefined

List of the matching participants (summary information only).

nextToken
string | undefined

If there are more participants than maxResults, use nextToken in the request to get the next set.

Throws

Name
Fault
Details
AccessDeniedException
client
<p/>
ValidationException
client
<p/>
IVSRealTimeServiceException
Base exception class for all service exceptions from IVSRealTime service.