The best way to control Claude Code, Codex and more from any computer or phone

main
ts 41 lines 1.28 KB
Raw
1 import type * as SD from "@distilled.cloud/aws/servicediscovery";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Service } from "./Service.ts";
5
6 export interface DeregisterInstanceRequest extends Omit<
7 SD.DeregisterInstanceRequest,
8 "ServiceId"
9 > {}
10
11 /**
12 * Runtime binding for `servicediscovery:DeregisterInstance` — lets a
13 * self-registering workload remove its own Cloud Map instance (and the
14 * Route 53 records/health check Cloud Map created for it).
15 *
16 * The response carries an `OperationId`; deregistration completes
17 * asynchronously on the Cloud Map side.
18 * ### Deregistering Instances
19 * **Example:** Deregister on Shutdown
20 * ```typescript
21 * const deregisterInstance = yield* AWS.CloudMap.DeregisterInstance(service);
22 *
23 * yield* deregisterInstance({ InstanceId: "worker-1" });
24 * ```
25 *
26 * @binding
27 */
28 export interface DeregisterInstance extends Binding.Service<
29 DeregisterInstance,
30 "AWS.CloudMap.DeregisterInstance",
31 <S extends Service>(
32 service: S,
33 ) => Effect.Effect<
34 (
35 request: DeregisterInstanceRequest,
36 ) => Effect.Effect<SD.DeregisterInstanceResponse, SD.DeregisterInstanceError>
37 >
38 > {}
39 export const DeregisterInstance = Binding.Service<DeregisterInstance>(
40 "AWS.CloudMap.DeregisterInstance",
41 );