| 1 | import type * as incidents from "@distilled.cloud/aws/ssm-incidents"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `ssm-incidents:ListRelatedItems`. |
| 7 | * |
| 8 | * Lists the related items of an incident — attached metrics, runbook |
| 9 | * executions, parent tickets, and links. Related items live under runtime |
| 10 | * incident-record ARNs, so the deploy-time grant is account-level |
| 11 | * (`Resource: "*"`). |
| 12 | * Provide the implementation with |
| 13 | * `Effect.provide(AWS.SSMIncidents.ListRelatedItemsHttp)`. |
| 14 | * ### Related Items |
| 15 | * **Example:** List An Incident's Related Items |
| 16 | * ```typescript |
| 17 | * // init |
| 18 | * const listRelatedItems = yield* AWS.SSMIncidents.ListRelatedItems(); |
| 19 | * |
| 20 | * // runtime |
| 21 | * const { relatedItems } = yield* listRelatedItems({ incidentRecordArn }); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface ListRelatedItems extends Binding.Service< |
| 27 | ListRelatedItems, |
| 28 | "AWS.SSMIncidents.ListRelatedItems", |
| 29 | () => Effect.Effect< |
| 30 | ( |
| 31 | request: incidents.ListRelatedItemsInput, |
| 32 | ) => Effect.Effect< |
| 33 | incidents.ListRelatedItemsOutput, |
| 34 | incidents.ListRelatedItemsError |
| 35 | > |
| 36 | > |
| 37 | > {} |
| 38 | export const ListRelatedItems = Binding.Service<ListRelatedItems>( |
| 39 | "AWS.SSMIncidents.ListRelatedItems", |
| 40 | ); |