Skip to content

get_playback_key_pair async

get_playback_key_pair(
    arn: PlaybackKeyPairArn, *, config_overrides: Optional[AsyncivsClientConfig] = None
) -> GetPlaybackKeyPairResponse

Gets a specified playback authorization key pair and returns the arn and fingerprint. The privateKey held by the caller can be used to generate viewer authorization tokens, to grant viewers access to private channels. For more information, see Setting Up Private Channels in the Amazon IVS User Guide.

Parameters:

Raises:

Source code in docs_src/capo_ivs/_services/async_ivs.py
async def get_playback_key_pair(
    self,
    arn: "capo_ivs.types.playback_key_pair_arn.PlaybackKeyPairArn",
    *,
    config_overrides: Optional[AsyncivsClientConfig] = None,
) -> "capo_ivs.types.get_playback_key_pair_response.GetPlaybackKeyPairResponse":
    """<p>Gets a specified playback authorization key pair and returns the <code>arn</code> and <code>fingerprint</code>. The <code>privateKey</code> held by the caller can be used to generate viewer authorization tokens, to grant viewers access to private channels. For more information, see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/private-channels.html">Setting Up Private Channels</a> in the <i>Amazon IVS User Guide</i>.</p>

    Args:
        arn: <p>ARN of the key pair to be returned.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ivs.types.get_playback_key_pair_request.GetPlaybackKeyPairRequest]",
    ) -> AsyncOperationResponse[
        "capo_ivs.types.get_playback_key_pair_response.GetPlaybackKeyPairResponse"
    ]:
        import capo_ivs._operations.amazon_interactive_video_service.get_playback_key_pair

        (
            output,
            http_response,
        ) = await capo_ivs._operations.amazon_interactive_video_service.get_playback_key_pair.async_get_playback_key_pair(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetPlaybackKeyPair")
    )
    input_: capo_ivs.types.get_playback_key_pair_request.GetPlaybackKeyPairRequest = {
        "arn": arn
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output