Disconnects a specified participant from a specified stage. If the participant is publishing using an IngestConfiguration, DisconnectParticipant also updates the stageArn in the IngestConfiguration to be an empty string.
Parameters:
Raises:
Source code in docs_src/capo_ivs_realtime/_services/ivs_real_time.py
| def disconnect_participant(
self,
stage_arn: "capo_ivs_realtime.types.stage_arn.StageArn",
participant_id: "capo_ivs_realtime.types.participant_token_id.ParticipantTokenId",
*,
config_overrides: Optional[IVSRealTimeClientConfig] = None,
reason: Optional[
"capo_ivs_realtime.types.disconnect_participant_reason.DisconnectParticipantReason"
] = None,
) -> "capo_ivs_realtime.types.disconnect_participant_response.DisconnectParticipantResponse":
"""<p>Disconnects a specified participant from a specified stage. If the participant is publishing using an <a>IngestConfiguration</a>, DisconnectParticipant also updates the <code>stageArn</code> in the IngestConfiguration to be an empty string.</p>
Args:
stage_arn: <p>ARN of the stage to which the participant is attached.</p>
participant_id: <p>Identifier of the participant to be disconnected. IVS assigns this; it is returned by <a>CreateParticipantToken</a> (for streams using WebRTC ingest) or <a>CreateIngestConfiguration</a> (for streams using RTMP ingest).</p>
reason: <p>Description of why this participant is being disconnected.</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.pending_verification.PendingVerification: <p>Your account is pending verification.</p>
capo_ivs_realtime.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</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.disconnect_participant_request.DisconnectParticipantRequest]",
) -> OperationResponse[
"capo_ivs_realtime.types.disconnect_participant_response.DisconnectParticipantResponse"
]:
import capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.disconnect_participant
output, http_response = (
capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.disconnect_participant.disconnect_participant(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisconnectParticipant")
)
input_: capo_ivs_realtime.types.disconnect_participant_request.DisconnectParticipantRequest = {
"stage_arn": stage_arn,
"participant_id": participant_id,
}
if reason is not None:
input_["reason"] = reason
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|