1import type * as cloudhsm from "@distilled.cloud/aws/cloudhsm-v2";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for the `InitializeCluster` operation (IAM action
7 * `cloudhsm:InitializeCluster`).
8 *
9 * Claims an `UNINITIALIZED` CloudHSM cluster by submitting the cluster
10 * certificate (the cluster's CSR signed by your issuing CA) and the CA's
11 * root certificate — lets a Function automate the activation ceremony
12 * around your CA. The certificates are public key material. Provide the
13 * implementation with `Effect.provide(AWS.CloudHSMV2.InitializeClusterHttp)`.
14 * ### Activating a Cluster
15 * **Example:** Submit The Signed Cluster Certificate
16 * ```typescript
17 * const initializeCluster = yield* AWS.CloudHSMV2.InitializeCluster();
18 *
19 * const result = yield* initializeCluster({
20 * ClusterId: clusterId,
21 * SignedCert: signedClusterCertPem,
22 * TrustAnchor: issuingCaRootPem,
23 * });
24 * // result.State === "INITIALIZE_IN_PROGRESS"
25 * ```
26 *
27 * @binding
28 */
29export interface InitializeCluster extends Binding.Service<
30 InitializeCluster,
31 "AWS.CloudHSMV2.InitializeCluster",
32 () => Effect.Effect<
33 (
34 request: cloudhsm.InitializeClusterRequest,
35 ) => Effect.Effect<
36 cloudhsm.InitializeClusterResponse,
37 cloudhsm.InitializeClusterError
38 >
39 >
40> {}
41export const InitializeCluster = Binding.Service<InitializeCluster>(
42 "AWS.CloudHSMV2.InitializeCluster",
43);