| 1 | import type * as detective from "@distilled.cloud/aws/detective"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Graph } from "./Graph.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `detective:CreateMembers`. |
| 8 | * |
| 9 | * Invites accounts into the behavior graph (or auto-enables organization |
| 10 | * accounts) — the automation hook for onboarding new accounts to Detective |
| 11 | * as they join the fleet. The graph ARN is injected from the bound |
| 12 | * {@link Graph}. |
| 13 | * Provide the implementation with |
| 14 | * `Effect.provide(AWS.Detective.CreateMembersHttp)`. |
| 15 | * ### Administering Member Accounts |
| 16 | * **Example:** Invite A New Member Account |
| 17 | * ```typescript |
| 18 | * // init |
| 19 | * const createMembers = yield* AWS.Detective.CreateMembers(graph); |
| 20 | * |
| 21 | * // runtime |
| 22 | * yield* createMembers({ |
| 23 | * Accounts: [{ AccountId: "111122223333", EmailAddress: email }], |
| 24 | * DisableEmailNotification: true, |
| 25 | * }); |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface CreateMembers extends Binding.Service< |
| 31 | CreateMembers, |
| 32 | "AWS.Detective.CreateMembers", |
| 33 | ( |
| 34 | graph: Graph, |
| 35 | ) => Effect.Effect< |
| 36 | ( |
| 37 | request: Omit<detective.CreateMembersRequest, "GraphArn">, |
| 38 | ) => Effect.Effect< |
| 39 | detective.CreateMembersResponse, |
| 40 | detective.CreateMembersError |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | export const CreateMembers = Binding.Service<CreateMembers>( |
| 45 | "AWS.Detective.CreateMembers", |
| 46 | ); |