1import type * as ses from "@distilled.cloud/aws/ses";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `ses:SendBounce` (classic SES).
7 *
8 * Generates and sends a bounce message to the sender of an email you received
9 * through SES receiving — the data-plane counterpart to `SES.ReceiptRule`
10 * inbound processing. You can only bounce a message within 24 hours of
11 * receiving it, and only for mail SES actually received.
12 *
13 * Account-level operation with no resource-level IAM scoping. Provide the
14 * implementation with `Effect.provide(AWS.SES.SendBounceHttp)`.
15 * ### Bouncing Inbound Mail
16 * **Example:** Bounce a Received Message
17 * ```typescript
18 * // init — account-level binding, no resource argument
19 * const sendBounce = yield* SES.SendBounce();
20 *
21 * // runtime — inside the Lambda that a ReceiptRule invokes
22 * yield* sendBounce({
23 * OriginalMessageId: messageId,
24 * BounceSender: "mailer-daemon@example.com",
25 * BouncedRecipientInfoList: [
26 * {
27 * Recipient: "nobody@example.com",
28 * BounceType: "DoesNotExist",
29 * },
30 * ],
31 * });
32 * ```
33 *
34 * @binding
35 */
36export interface SendBounce extends Binding.Service<
37 SendBounce,
38 "AWS.SES.SendBounce",
39 () => Effect.Effect<
40 (
41 request: ses.SendBounceRequest,
42 ) => Effect.Effect<ses.SendBounceResponse, ses.SendBounceError>
43 >
44> {}
45export const SendBounce = Binding.Service<SendBounce>("AWS.SES.SendBounce");