- 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.
DisconnectUserCommand
Disconnects all connections using a specified user ID from a room. This replicates the DisconnectUser WebSocket operation in the Amazon IVS Chat Messaging API.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IvschatClient, DisconnectUserCommand } from "@aws-sdk/client-ivschat"; // ES Modules import
// const { IvschatClient, DisconnectUserCommand } = require("@aws-sdk/client-ivschat"); // CommonJS import
const client = new IvschatClient(config);
const input = { // DisconnectUserRequest
roomIdentifier: "STRING_VALUE", // required
userId: "STRING_VALUE", // required
reason: "STRING_VALUE",
};
const command = new DisconnectUserCommand(input);
const response = await client.send(command);
// {};
DisconnectUserCommand Input
See DisconnectUserCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
roomIdentifier Required | string | undefined | Identifier of the room from which the user's clients should be disconnected. Currently this must be an ARN. |
userId Required | string | undefined | ID of the user (connection) to disconnect from the room. |
reason | string | undefined | Reason for disconnecting the user. |
DisconnectUserCommand Output
See DisconnectUserCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | <p/> |
PendingVerification | client | <p/> |
ResourceNotFoundException | client | <p/> |
ThrottlingException | client | <p/> |
ValidationException | client | <p/> |
IvschatServiceException | Base exception class for all service exceptions from Ivschat service. |