- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
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
Parameter | Type | Description |
---|
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 |
filterByRecordingState | ParticipantRecordingFilterByRecordingState | undefined | Filters the response list to only show participants with the specified recording state. Only one of |
filterByState | ParticipantState | undefined | Filters the response list to only show participants in the specified state. Only one of |
filterByUserId | string | undefined | Filters the response list to match the specified user ID. Only one of |
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 |
ListParticipantsCommand Output
Parameter | Type | Description |
---|
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 |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | <p/> |
ValidationException | client | <p/> |
IVSRealTimeServiceException | Base exception class for all service exceptions from IVSRealTime service. |