Skip to content

create_hsm_configuration async

create_hsm_configuration(
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    hsm_configuration_identifier: Optional[String] = None,
    description: Optional[String] = None,
    hsm_ip_address: Optional[String] = None,
    hsm_partition_name: Optional[String] = None,
    hsm_partition_password: Optional[String] = None,
    hsm_server_public_certificate: Optional[String] = None,
    tags: Optional[TagList] = None,
) -> CreateHsmConfigurationResult

Creates an HSM configuration that contains the information required by an Amazon Redshift cluster to store and use database encryption keys in a Hardware Security Module (HSM). After creating the HSM configuration, you can specify it as a parameter when creating a cluster. The cluster will then store its encryption keys in the HSM.

In addition to creating an HSM configuration, you must also create an HSM client certificate. For more information, go to Hardware Security Modules in the Amazon Redshift Cluster Management Guide.

Parameters:

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

    The identifier to be assigned to the new Amazon Redshift HSM configuration.

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

    A text description of the HSM configuration to be created.

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

    The IP address that the Amazon Redshift cluster must use to access the HSM.

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

    The name of the partition in the HSM where the Amazon Redshift clusters will store their database encryption keys.

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

    The password required to access the HSM partition.

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

    The HSMs public certificate file. When using Cloud HSM, the file name is server.pem.

  • 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_configuration(
    self,
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    hsm_configuration_identifier: Optional[
        "capo_redshift.types.string.String"
    ] = None,
    description: Optional["capo_redshift.types.string.String"] = None,
    hsm_ip_address: Optional["capo_redshift.types.string.String"] = None,
    hsm_partition_name: Optional["capo_redshift.types.string.String"] = None,
    hsm_partition_password: Optional["capo_redshift.types.string.String"] = None,
    hsm_server_public_certificate: Optional[
        "capo_redshift.types.string.String"
    ] = None,
    tags: Optional["capo_redshift.types.tag_list.TagList"] = None,
) -> "capo_redshift.types.create_hsm_configuration_result.CreateHsmConfigurationResult":
    """<p>Creates an HSM configuration that contains the information required by an Amazon Redshift cluster to store and use database encryption keys in a Hardware Security Module (HSM). After creating the HSM configuration, you can specify it as a parameter when creating a cluster. The cluster will then store its encryption keys in the HSM.</p> <p>In addition to creating an HSM configuration, you must also create an HSM client certificate. For more information, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-HSM.html">Hardware Security Modules</a> in the Amazon Redshift Cluster Management Guide.</p>

    Args:
        hsm_configuration_identifier: <p>The identifier to be assigned to the new Amazon Redshift HSM configuration.</p>
        description: <p>A text description of the HSM configuration to be created.</p>
        hsm_ip_address: <p>The IP address that the Amazon Redshift cluster must use to access the HSM.</p>
        hsm_partition_name: <p>The name of the partition in the HSM where the Amazon Redshift clusters will store their database encryption keys.</p>
        hsm_partition_password: <p>The password required to access the HSM partition.</p>
        hsm_server_public_certificate: <p>The HSMs public certificate file. When using Cloud HSM, the file name is server.pem.</p>
        tags: <p>A list of tag instances.</p>

    Raises:
        capo_redshift.errors.hsm_configuration_already_exists_fault.HsmConfigurationAlreadyExistsFault: <p>There is already an existing Amazon Redshift HSM configuration with the specified identifier.</p>
        capo_redshift.errors.hsm_configuration_quota_exceeded_fault.HsmConfigurationQuotaExceededFault: <p>The quota for HSM configurations 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_configuration_message.CreateHsmConfigurationMessage]",
    ) -> AsyncOperationResponse[
        "capo_redshift.types.create_hsm_configuration_result.CreateHsmConfigurationResult"
    ]:
        import capo_redshift._operations.redshift_service_version20121201.create_hsm_configuration

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateHsmConfiguration")
    )
    input_: capo_redshift.types.create_hsm_configuration_message.CreateHsmConfigurationMessage = {}
    if hsm_configuration_identifier is not None:
        input_["hsm_configuration_identifier"] = hsm_configuration_identifier
    if description is not None:
        input_["description"] = description
    if hsm_ip_address is not None:
        input_["hsm_ip_address"] = hsm_ip_address
    if hsm_partition_name is not None:
        input_["hsm_partition_name"] = hsm_partition_name
    if hsm_partition_password is not None:
        input_["hsm_partition_password"] = hsm_partition_password
    if hsm_server_public_certificate is not None:
        input_["hsm_server_public_certificate"] = hsm_server_public_certificate
    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