Imports the public portion of a new key pair and returns its arn and fingerprint. The privateKey can then 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:
-
public_key_material
(PlaybackPublicKeyMaterial)
–
The public portion of a customer-generated key pair.
-
name
(Optional[PlaybackKeyPairName], default:
None
)
–
Playback-key-pair name. The value does not need to be unique.
-
tags
(Optional[Tags], default:
None
)
–
Any tags provided with the request are added to the playback key pair tags. See Best practices and strategies in Tagging Amazon Web Services Resources and Tag Editor for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is documented there.
Raises:
Source code in docs_src/capo_ivs/_services/ivs.py
| def import_playback_key_pair(
self,
public_key_material: "capo_ivs.types.playback_public_key_material.PlaybackPublicKeyMaterial",
*,
config_overrides: Optional[ivsClientConfig] = None,
name: Optional[
"capo_ivs.types.playback_key_pair_name.PlaybackKeyPairName"
] = None,
tags: Optional["capo_ivs.types.tags.Tags"] = None,
) -> (
"capo_ivs.types.import_playback_key_pair_response.ImportPlaybackKeyPairResponse"
):
"""<p>Imports the public portion of a new key pair and returns its <code>arn</code> and <code>fingerprint</code>. The <code>privateKey</code> can then 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:
public_key_material: <p>The public portion of a customer-generated key pair.</p>
name: <p>Playback-key-pair name. The value does not need to be unique.</p>
tags: <p>Any tags provided with the request are added to the playback key pair tags. See <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html">Best practices and strategies</a> in <i>Tagging Amazon Web Services Resources and Tag Editor</i> for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is documented there.</p>
Raises:
capo_ivs.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
capo_ivs.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
capo_ivs.errors.pending_verification.PendingVerification: <p>Your account is pending verification.</p>
capo_ivs.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</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.import_playback_key_pair_request.ImportPlaybackKeyPairRequest]",
) -> OperationResponse[
"capo_ivs.types.import_playback_key_pair_response.ImportPlaybackKeyPairResponse"
]:
import capo_ivs._operations.amazon_interactive_video_service.import_playback_key_pair
output, http_response = (
capo_ivs._operations.amazon_interactive_video_service.import_playback_key_pair.import_playback_key_pair(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ImportPlaybackKeyPair")
)
input_: capo_ivs.types.import_playback_key_pair_request.ImportPlaybackKeyPairRequest = {
"public_key_material": public_key_material
}
if name is not None:
input_["name"] = name
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|