import type * as SD from "@distilled.cloud/aws/servicediscovery"; import type * as Effect from "effect/Effect"; import * as Binding from "../../Binding.ts"; import type { Service } from "./Service.ts"; export interface RegisterInstanceRequest extends Omit< SD.RegisterInstanceRequest, "ServiceId" > {} /** * Runtime binding for `servicediscovery:RegisterInstance` — lets a * self-registering workload create or update its own Cloud Map instance * (an upsert on the instance ID). * * The response carries an `OperationId`; registration completes * asynchronously on the Cloud Map side. * ### Registering Instances * **Example:** Self-register on Startup * ```typescript * const registerInstance = yield* AWS.CloudMap.RegisterInstance(service); * * yield* registerInstance({ * InstanceId: "worker-1", * Attributes: { AWS_INSTANCE_IPV4: "10.0.1.10" }, * }); * ``` * * @binding */ export interface RegisterInstance extends Binding.Service< RegisterInstance, "AWS.CloudMap.RegisterInstance", ( service: S, ) => Effect.Effect< ( request: RegisterInstanceRequest, ) => Effect.Effect > > {} export const RegisterInstance = Binding.Service( "AWS.CloudMap.RegisterInstance", );