1import type * as sdb from "@distilled.cloud/aws/simpledb";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { RuntimeContext } from "../../RuntimeContext.ts";
5import type { Domain } from "./Domain.ts";
6
7export interface BatchPutAttributesRequest extends Omit<
8 sdb.BatchPutAttributesRequest,
9 "DomainName"
10> {}
11
12/**
13 * Runtime binding for `sdb:BatchPutAttributes`.
14 *
15 * Bind this operation to a {@link Domain} inside a function runtime to get a
16 * callable that automatically injects the domain name. Puts attributes on up
17 * to 25 items in a single call.
18 * ### Writing Items
19 * **Example:** Batch Put Multiple Items
20 * ```typescript
21 * const batchPutAttributes = yield* AWS.SimpleDB.BatchPutAttributes(domain);
22 *
23 * yield* batchPutAttributes({
24 * Items: [
25 * {
26 * ItemName: "user#1",
27 * Attributes: [{ Name: "plan", Value: "free", Replace: true }],
28 * },
29 * {
30 * ItemName: "user#2",
31 * Attributes: [{ Name: "plan", Value: "pro", Replace: true }],
32 * },
33 * ],
34 * });
35 * ```
36 *
37 * @binding
38 */
39export interface BatchPutAttributes extends Binding.Service<
40 BatchPutAttributes,
41 "AWS.SimpleDB.BatchPutAttributes",
42 (
43 domain: Domain,
44 ) => Effect.Effect<
45 (
46 request: BatchPutAttributesRequest,
47 ) => Effect.Effect<
48 sdb.BatchPutAttributesResponse,
49 sdb.BatchPutAttributesError,
50 RuntimeContext
51 >
52 >
53> {}
54export const BatchPutAttributes = Binding.Service<BatchPutAttributes>(
55 "AWS.SimpleDB.BatchPutAttributes",
56);