Claims an CloudHSM cluster by submitting the cluster certificate issued by your issuing certificate authority (CA) and the CA's root certificate. Before you can claim a cluster, you must sign the cluster's certificate signing request (CSR) with your issuing CA. To get the cluster's CSR, use DescribeClusters.
Cross-account use: No. You cannot perform this operation on an CloudHSM cluster in a different Amazon Web Services account.
Parameters:
-
cluster_id
(ClusterId)
–
The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use DescribeClusters.
-
signed_cert
(Cert)
–
The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in PEM format and can contain a maximum of 5000 characters.
-
trust_anchor
(Cert)
–
The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 characters.
Raises:
Source code in docs_src/capo_cloudhsm_v2/_services/cloud_hsmv2.py
| def initialize_cluster(
self,
cluster_id: "capo_cloudhsm_v2.types.cluster_id.ClusterId",
signed_cert: "capo_cloudhsm_v2.types.cert.Cert",
trust_anchor: "capo_cloudhsm_v2.types.cert.Cert",
*,
config_overrides: Optional[CloudHSMV2ClientConfig] = None,
) -> "capo_cloudhsm_v2.types.initialize_cluster_response.InitializeClusterResponse":
"""<p>Claims an CloudHSM cluster by submitting the cluster certificate issued by your issuing certificate authority (CA) and the CA's root certificate. Before you can claim a cluster, you must sign the cluster's certificate signing request (CSR) with your issuing CA. To get the cluster's CSR, use <a>DescribeClusters</a>.</p> <p> <b>Cross-account use:</b> No. You cannot perform this operation on an CloudHSM cluster in a different Amazon Web Services account.</p>
Args:
cluster_id: <p>The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use <a>DescribeClusters</a>.</p>
signed_cert: <p>The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in PEM format and can contain a maximum of 5000 characters.</p>
trust_anchor: <p>The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 characters.</p>
Raises:
capo_cloudhsm_v2.errors.cloud_hsm_access_denied_exception.CloudHsmAccessDeniedException: <p>The request was rejected because the requester does not have permission to perform the requested operation.</p>
capo_cloudhsm_v2.errors.cloud_hsm_internal_failure_exception.CloudHsmInternalFailureException: <p>The request was rejected because of an CloudHSM internal failure. The request can be retried.</p>
capo_cloudhsm_v2.errors.cloud_hsm_invalid_request_exception.CloudHsmInvalidRequestException: <p>The request was rejected because it is not a valid request.</p>
capo_cloudhsm_v2.errors.cloud_hsm_resource_not_found_exception.CloudHsmResourceNotFoundException: <p>The request was rejected because it refers to a resource that cannot be found.</p>
capo_cloudhsm_v2.errors.cloud_hsm_service_exception.CloudHsmServiceException: <p>The request was rejected because an error occurred.</p>
capo_cloudhsm_v2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudhsm_v2.types.initialize_cluster_request.InitializeClusterRequest]",
) -> OperationResponse[
"capo_cloudhsm_v2.types.initialize_cluster_response.InitializeClusterResponse"
]:
import capo_cloudhsm_v2._operations.baldr_api_service.initialize_cluster
output, http_response = (
capo_cloudhsm_v2._operations.baldr_api_service.initialize_cluster.initialize_cluster(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("InitializeCluster")
)
input_: capo_cloudhsm_v2.types.initialize_cluster_request.InitializeClusterRequest = {
"cluster_id": cluster_id,
"signed_cert": signed_cert,
"trust_anchor": trust_anchor,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|