Skip to content

ListAttachedLinks

Source: src/AWS/OAM/ListAttachedLinks.ts

Runtime binding for oam:ListAttachedLinks — enumerate the source-account links attached to the bound monitoring-account Sink (each item carries the link’s ARN, resolved label, and shared resource types). The sink’s ARN is injected automatically.

Provide AWS.OAM.ListAttachedLinksHttp on the hosting Lambda Function to satisfy the requirement.

// init — grants oam:ListAttachedLinks on the sink
const listAttachedLinks = yield* AWS.OAM.ListAttachedLinks(sink);
// runtime
const { Items } = yield* listAttachedLinks();
for (const item of Items) {
yield* Effect.log(`${item.Label} shares ${item.ResourceTypes?.join(", ")}`);
}