Skip to content

get_stream_key

get_stream_key(
    arn: StreamKeyArn, *, config_overrides: Optional[ivsClientConfig] = None
) -> GetStreamKeyResponse

Gets stream-key information for a specified ARN.

Parameters:

  • arn (StreamKeyArn) –

    ARN for the stream key to be retrieved.

Raises:

Source code in docs_src/capo_ivs/_services/ivs.py
def get_stream_key(
    self,
    arn: "capo_ivs.types.stream_key_arn.StreamKeyArn",
    *,
    config_overrides: Optional[ivsClientConfig] = None,
) -> "capo_ivs.types.get_stream_key_response.GetStreamKeyResponse":
    """<p>Gets stream-key information for a specified ARN.</p>

    Args:
        arn: <p>ARN for the stream key to be retrieved.</p>

    Raises:
        capo_ivs.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</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_key_request.GetStreamKeyRequest]",
    ) -> OperationResponse[
        "capo_ivs.types.get_stream_key_response.GetStreamKeyResponse"
    ]:
        import capo_ivs._operations.amazon_interactive_video_service.get_stream_key

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

    def _redact_output(
        output: "capo_ivs.types.get_stream_key_response.GetStreamKeyResponse",
    ) -> dict[str, Any]:
        import capo_ivs.types.get_stream_key_response

        return capo_ivs.types.get_stream_key_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetStreamKey", redact_output=_redact_output),
    )
    input_: capo_ivs.types.get_stream_key_request.GetStreamKeyRequest = {"arn": arn}

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