Skip to content

create_hsm_client_certificate async

create_hsm_client_certificate(
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    hsm_client_certificate_identifier: Optional[String] = None,
    tags: Optional[TagList] = None,
) -> CreateHsmClientCertificateResult

Creates an HSM client certificate that an Amazon Redshift cluster will use to connect to the client's HSM in order to store and retrieve the keys used to encrypt the cluster databases.

The command returns a public key, which you must store in the HSM. In addition to creating the HSM certificate, you must create an Amazon Redshift HSM configuration that provides a cluster the information needed to store and use encryption keys in the HSM. For more information, go to Hardware Security Modules in the Amazon Redshift Cluster Management Guide.

Parameters:

  • hsm_client_certificate_identifier (Optional[String], default: None ) –

    The identifier to be assigned to the new HSM client certificate that the cluster will use to connect to the HSM to use the database encryption keys.

  • tags (Optional[TagList], default: None ) –

    A list of tag instances.

Raises:

Source code in docs_src/capo_redshift/_services/async_redshift.py
async def create_hsm_client_certificate(
    self,
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    hsm_client_certificate_identifier: Optional[
        "capo_redshift.types.string.String"
    ] = None,
    tags: Optional["capo_redshift.types.tag_list.TagList"] = None,
) -> "capo_redshift.types.create_hsm_client_certificate_result.CreateHsmClientCertificateResult":
    """<p>Creates an HSM client certificate that an Amazon Redshift cluster will use to connect to the client's HSM in order to store and retrieve the keys used to encrypt the cluster databases.</p> <p>The command returns a public key, which you must store in the HSM. In addition to creating the HSM certificate, you must create an Amazon Redshift HSM configuration that provides a cluster the information needed to store and use encryption keys in the HSM. For more information, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html#working-with-HSM">Hardware Security Modules</a> in the <i>Amazon Redshift Cluster Management Guide</i>.</p>

    Args:
        hsm_client_certificate_identifier: <p>The identifier to be assigned to the new HSM client certificate that the cluster will use to connect to the HSM to use the database encryption keys.</p>
        tags: <p>A list of tag instances.</p>

    Raises:
        capo_redshift.errors.hsm_client_certificate_already_exists_fault.HsmClientCertificateAlreadyExistsFault: <p>There is already an existing Amazon Redshift HSM client certificate with the specified identifier.</p>
        capo_redshift.errors.hsm_client_certificate_quota_exceeded_fault.HsmClientCertificateQuotaExceededFault: <p>The quota for HSM client certificates has been reached. For information about increasing your quota, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html">Limits in Amazon Redshift</a> in the <i>Amazon Redshift Cluster Management Guide</i>. </p>
        capo_redshift.errors.invalid_tag_fault.InvalidTagFault: <p>The tag is invalid.</p>
        capo_redshift.errors.tag_limit_exceeded_fault.TagLimitExceededFault: <p>You have exceeded the number of tags allowed.</p>
        capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_redshift.types.create_hsm_client_certificate_message.CreateHsmClientCertificateMessage]",
    ) -> AsyncOperationResponse[
        "capo_redshift.types.create_hsm_client_certificate_result.CreateHsmClientCertificateResult"
    ]:
        import capo_redshift._operations.redshift_service_version20121201.create_hsm_client_certificate

        (
            output,
            http_response,
        ) = await capo_redshift._operations.redshift_service_version20121201.create_hsm_client_certificate.async_create_hsm_client_certificate(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateHsmClientCertificate")
    )
    input_: capo_redshift.types.create_hsm_client_certificate_message.CreateHsmClientCertificateMessage = {}
    if hsm_client_certificate_identifier is not None:
        input_["hsm_client_certificate_identifier"] = (
            hsm_client_certificate_identifier
        )
    if tags is not None:
        input_["tags"] = tags

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