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