Skip to content

get_stream

get_stream(
    channel_arn: ChannelArn, *, config_overrides: Optional[ivsClientConfig] = None
) -> GetStreamResponse

Gets information about the active (live) stream on a specified channel.

Parameters:

  • channel_arn (ChannelArn) –

    Channel ARN for stream to be accessed.

Raises:

Source code in docs_src/capo_ivs/_services/ivs.py
def get_stream(
    self,
    channel_arn: "capo_ivs.types.channel_arn.ChannelArn",
    *,
    config_overrides: Optional[ivsClientConfig] = None,
) -> "capo_ivs.types.get_stream_response.GetStreamResponse":
    """<p>Gets information about the active (live) stream on a specified channel.</p>

    Args:
        channel_arn: <p>Channel ARN for stream to be accessed.</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.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.
    """

    def _handler(
        req: "OperationRequest[capo_ivs.types.get_stream_request.GetStreamRequest]",
    ) -> OperationResponse["capo_ivs.types.get_stream_response.GetStreamResponse"]:
        import capo_ivs._operations.amazon_interactive_video_service.get_stream

        output, http_response = (
            capo_ivs._operations.amazon_interactive_video_service.get_stream.get_stream(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetStream")
    )
    input_: capo_ivs.types.get_stream_request.GetStreamRequest = {
        "channel_arn": channel_arn
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output