1import type * as ga from "@distilled.cloud/aws/global-accelerator";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { EndpointGroup } from "./EndpointGroup.ts";
5
6/**
7 * Runtime binding for `globalaccelerator:RemoveEndpoints`.
8 *
9 * Deregisters endpoints from the bound {@link EndpointGroup} at runtime —
10 * e.g. draining an instance before it is terminated. Unlike a full
11 * `UpdateEndpointGroup`, removing endpoints leaves the group's other
12 * endpoints and health-check configuration untouched. The endpoint group
13 * ARN is injected from the binding. Provide the implementation with
14 * `Effect.provide(AWS.GlobalAccelerator.RemoveEndpointsHttp)`.
15 * ### Managing Endpoints
16 * **Example:** Deregister an Endpoint
17 * ```typescript
18 * // init — bind the operation to the endpoint group
19 * const removeEndpoints = yield* AWS.GlobalAccelerator.RemoveEndpoints(group);
20 *
21 * // runtime
22 * yield* removeEndpoints({
23 * EndpointIdentifiers: [{ EndpointId: allocationId }],
24 * });
25 * ```
26 *
27 * @binding
28 */
29export interface RemoveEndpoints extends Binding.Service<
30 RemoveEndpoints,
31 "AWS.GlobalAccelerator.RemoveEndpoints",
32 (
33 endpointGroup: EndpointGroup,
34 ) => Effect.Effect<
35 (
36 request: Omit<ga.RemoveEndpointsRequest, "EndpointGroupArn">,
37 ) => Effect.Effect<ga.RemoveEndpointsResponse, ga.RemoveEndpointsError>
38 >
39> {}
40export const RemoveEndpoints = Binding.Service<RemoveEndpoints>(
41 "AWS.GlobalAccelerator.RemoveEndpoints",
42);