The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 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 | /** |
| 7 | * `GetInstance` request with `ServiceId` injected from the bound |
| 8 | * {@link Service}. |
| 9 | */ |
| 10 | export interface GetInstanceRequest extends Omit<SD.GetInstanceRequest, "ServiceId"> {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for `servicediscovery:GetInstance` — reads a single |
| 14 | * registered instance of the bound {@link Service} by its instance ID, |
| 15 | * returning its full attribute map. Provide the implementation with |
| 16 | * `Effect.provide(AWS.CloudMap.GetInstanceHttp)`. |
| 17 | * ### Reading Instances |
| 18 | * **Example:** Read an Instance's Attributes |
| 19 | * ```typescript |
| 20 | * const getInstance = yield* AWS.CloudMap.GetInstance(service); |
| 21 | * |
| 22 | * const { Instance } = yield* getInstance({ InstanceId: "worker-1" }); |
| 23 | * console.log(Instance?.Attributes?.AWS_INSTANCE_IPV4); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface GetInstance extends Binding.Service< |
| 29 | GetInstance, |
| 30 | "AWS.CloudMap.GetInstance", |
| 31 | <S extends Service>( |
| 32 | service: S, |
| 33 | ) => Effect.Effect< |
| 34 | (request: GetInstanceRequest) => Effect.Effect<SD.GetInstanceResponse, SD.GetInstanceError> |
| 35 | > |
| 36 | > {} |
| 37 | export const GetInstance = Binding.Service<GetInstance>("AWS.CloudMap.GetInstance"); |