Disconnects the incoming RTMPS stream for the specified channel. Can be used in conjunction with DeleteStreamKey to prevent further streaming to a channel.
Many streaming client-software libraries automatically reconnect a dropped RTMPS session, so to stop the stream permanently, you may want to first revoke the streamKey attached to the channel.
Parameters:
-
channel_arn
(ChannelArn)
–
ARN of the channel for which the stream is to be stopped.
Raises:
Source code in docs_src/capo_ivs/_services/async_ivs.py
| async def stop_stream(
self,
channel_arn: "capo_ivs.types.channel_arn.ChannelArn",
*,
config_overrides: Optional[AsyncivsClientConfig] = None,
) -> "capo_ivs.types.stop_stream_response.StopStreamResponse":
"""<p>Disconnects the incoming RTMPS stream for the specified channel. Can be used in conjunction with <a>DeleteStreamKey</a> to prevent further streaming to a channel.</p> <note> <p>Many streaming client-software libraries automatically reconnect a dropped RTMPS session, so to stop the stream permanently, you may want to first revoke the <code>streamKey</code> attached to the channel.</p> </note>
Args:
channel_arn: <p>ARN of the channel for which the stream is to be stopped.</p>
Raises:
capo_ivs.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
capo_ivs.errors.channel_not_broadcasting.ChannelNotBroadcasting: <p>The stream is offline for the given channel ARN.</p>
capo_ivs.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
capo_ivs.errors.stream_unavailable.StreamUnavailable: <p>The stream is temporarily unavailable.</p>
capo_ivs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_ivs.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_ivs.types.stop_stream_request.StopStreamRequest]",
) -> AsyncOperationResponse[
"capo_ivs.types.stop_stream_response.StopStreamResponse"
]:
import capo_ivs._operations.amazon_interactive_video_service.stop_stream
(
output,
http_response,
) = await capo_ivs._operations.amazon_interactive_video_service.stop_stream.async_stop_stream(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StopStream")
)
input_: capo_ivs.types.stop_stream_request.StopStreamRequest = {
"channel_arn": channel_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|