Import a public key to be used for signing stage participant tokens.
Parameters:
-
public_key_material
(PublicKeyMaterial)
–
The content of the public key to be imported.
-
name
(Optional[PublicKeyName], default:
None
)
–
Name of the public key to be imported.
-
tags
(Optional[Tags], default:
None
)
–
Tags attached to the resource. Array of maps, each of the form string:string (key:value). See Best practices and strategies in Tagging AWS Resources and Tag Editor for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.
Raises:
Source code in docs_src/capo_ivs_realtime/_services/ivs_real_time.py
| def import_public_key(
self,
public_key_material: "capo_ivs_realtime.types.public_key_material.PublicKeyMaterial",
*,
config_overrides: Optional[IVSRealTimeClientConfig] = None,
name: Optional["capo_ivs_realtime.types.public_key_name.PublicKeyName"] = None,
tags: Optional["capo_ivs_realtime.types.tags.Tags"] = None,
) -> "capo_ivs_realtime.types.import_public_key_response.ImportPublicKeyResponse":
"""<p>Import a public key to be used for signing stage participant tokens.</p>
Args:
public_key_material: <p>The content of the public key to be imported.</p>
name: <p>Name of the public key to be imported.</p>
tags: <p>Tags attached to the resource. Array of maps, each of the form <code>string:string (key:value)</code>. 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 AWS Resources and Tag Editor</i> for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.</p>
Raises:
capo_ivs_realtime.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
capo_ivs_realtime.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
capo_ivs_realtime.errors.pending_verification.PendingVerification: <p>Your account is pending verification.</p>
capo_ivs_realtime.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</p>
capo_ivs_realtime.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_ivs_realtime.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_ivs_realtime.types.import_public_key_request.ImportPublicKeyRequest]",
) -> OperationResponse[
"capo_ivs_realtime.types.import_public_key_response.ImportPublicKeyResponse"
]:
import capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.import_public_key
output, http_response = (
capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.import_public_key.import_public_key(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ImportPublicKey")
)
input_: capo_ivs_realtime.types.import_public_key_request.ImportPublicKeyRequest = {
"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
|