1import type * as incidents from "@distilled.cloud/aws/ssm-incidents";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `ssm-incidents:UpdateRelatedItems`.
7 *
8 * Attaches or removes a related item on an incident — link the dashboard,
9 * ticket, or runbook execution your automation is working from. Related items
10 * live under runtime incident-record ARNs, so the deploy-time grant is
11 * account-level (`Resource: "*"`).
12 * Provide the implementation with
13 * `Effect.provide(AWS.SSMIncidents.UpdateRelatedItemsHttp)`.
14 * ### Related Items
15 * **Example:** Attach A Link To An Incident
16 * ```typescript
17 * // init
18 * const updateRelatedItems = yield* AWS.SSMIncidents.UpdateRelatedItems();
19 *
20 * // runtime
21 * yield* updateRelatedItems({
22 * incidentRecordArn,
23 * relatedItemsUpdate: {
24 * itemToAdd: {
25 * title: "Grafana dashboard",
26 * identifier: { type: "OTHER", value: { url: "https://grafana.example.com/d/abc" } },
27 * },
28 * },
29 * });
30 * ```
31 *
32 * @binding
33 */
34export interface UpdateRelatedItems extends Binding.Service<
35 UpdateRelatedItems,
36 "AWS.SSMIncidents.UpdateRelatedItems",
37 () => Effect.Effect<
38 (
39 request: incidents.UpdateRelatedItemsInput,
40 ) => Effect.Effect<
41 incidents.UpdateRelatedItemsOutput,
42 incidents.UpdateRelatedItemsError
43 >
44 >
45> {}
46export const UpdateRelatedItems = Binding.Service<UpdateRelatedItems>(
47 "AWS.SSMIncidents.UpdateRelatedItems",
48);