| 1 | import type * as ssm from "@distilled.cloud/aws/ssm-contacts"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { ContactChannel } from "./ContactChannel.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `ssm-contacts:ActivateContactChannel`. |
| 8 | * |
| 9 | * Activate the bound contact channel with the code its owner received, |
| 10 | * so Incident Manager can page through it. The channel's ARN is injected |
| 11 | * as `ContactChannelId`. |
| 12 | * Provide the implementation with |
| 13 | * `Effect.provide(AWS.SSMContacts.ActivateContactChannelHttp)`. |
| 14 | * ### Activating Contact Channels |
| 15 | * **Example:** Activate a Channel with the Received Code |
| 16 | * ```typescript |
| 17 | * const activateContactChannel = yield* AWS.SSMContacts.ActivateContactChannel(email); |
| 18 | * |
| 19 | * yield* activateContactChannel({ ActivationCode: "466136" }); |
| 20 | * ``` |
| 21 | * |
| 22 | * @binding |
| 23 | */ |
| 24 | export interface ActivateContactChannel extends Binding.Service< |
| 25 | ActivateContactChannel, |
| 26 | "AWS.SSMContacts.ActivateContactChannel", |
| 27 | ( |
| 28 | channel: ContactChannel, |
| 29 | ) => Effect.Effect< |
| 30 | ( |
| 31 | request: Omit<ssm.ActivateContactChannelRequest, "ContactChannelId">, |
| 32 | ) => Effect.Effect< |
| 33 | ssm.ActivateContactChannelResult, |
| 34 | ssm.ActivateContactChannelError |
| 35 | > |
| 36 | > |
| 37 | > {} |
| 38 | export const ActivateContactChannel = Binding.Service<ActivateContactChannel>( |
| 39 | "AWS.SSMContacts.ActivateContactChannel", |
| 40 | ); |