1import type * as xray from "@distilled.cloud/aws/xray";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5export interface GetRetrievedTracesGraphRequest
6 extends xray.GetRetrievedTracesGraphRequest {}
7
8/**
9 * Retrieve the service graph of the traces fetched by a Transaction
10 * Search retrieval job.
11 *
12 * Bind the operation in the function's init phase to get a runtime callable;
13 * provide the implementation with `Effect.provide(XRay.GetRetrievedTracesGraphHttp)`.
14 * The action is account-scoped: X-Ray does not support resource-level
15 * permissions for `xray:GetRetrievedTracesGraph`, so the binding grants it on `*`.
16 * ### Transaction Search
17 * **Example:** Graph a retrieval job's traces
18 * ```typescript
19 * import * as XRay from "alchemy/AWS/XRay";
20 *
21 * // init — grants xray:GetRetrievedTracesGraph
22 * const getRetrievedTracesGraph = yield* XRay.GetRetrievedTracesGraph();
23 *
24 * // runtime
25 * const graph = yield* getRetrievedTracesGraph({ RetrievalToken: token });
26 * const services = graph.Services ?? [];
27 * ```
28 *
29 * @binding
30 */
31export interface GetRetrievedTracesGraph extends Binding.Service<
32 GetRetrievedTracesGraph,
33 "AWS.XRay.GetRetrievedTracesGraph",
34 () => Effect.Effect<
35 (
36 request: GetRetrievedTracesGraphRequest,
37 ) => Effect.Effect<
38 xray.GetRetrievedTracesGraphResult,
39 xray.GetRetrievedTracesGraphError
40 >
41 >
42> {}
43export const GetRetrievedTracesGraph = Binding.Service<GetRetrievedTracesGraph>(
44 "AWS.XRay.GetRetrievedTracesGraph",
45);