Skip to content

DescribeEndpointGroup

Source: src/AWS/GlobalAccelerator/DescribeEndpointGroup.ts

Runtime binding for globalaccelerator:DescribeEndpointGroup.

Reads the bound EndpointGroup’s live state — most usefully the observed per-endpoint health (HEALTHY / UNHEALTHY / INITIAL) — so a function can monitor regional endpoint health or verify an endpoint it just registered. The endpoint group ARN is injected from the binding. Provide the implementation with Effect.provide(AWS.GlobalAccelerator.DescribeEndpointGroupHttp).

// init — bind the operation to the endpoint group
const describeEndpointGroup =
yield* AWS.GlobalAccelerator.DescribeEndpointGroup(group);
// runtime
const { EndpointGroup } = yield* describeEndpointGroup({});
const unhealthy = (EndpointGroup?.EndpointDescriptions ?? []).filter(
(endpoint) => endpoint.HealthState === "UNHEALTHY",
);