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 DeleteAttributesRequest extends Omit<
8 sdb.DeleteAttributesRequest,
9 "DomainName"
10> {}
11
12/**
13 * Runtime binding for `sdb:DeleteAttributes`.
14 *
15 * Bind this operation to a {@link Domain} inside a function runtime to get a
16 * callable that automatically injects the domain name. Omitting `Attributes`
17 * deletes the whole item.
18 * ### Deleting Items
19 * **Example:** Delete a Whole Item
20 * ```typescript
21 * const deleteAttributes = yield* AWS.SimpleDB.DeleteAttributes(domain);
22 *
23 * yield* deleteAttributes({ ItemName: "user#123" });
24 * ```
25 *
26 * **Example:** Delete a Single Attribute
27 * ```typescript
28 * yield* deleteAttributes({
29 * ItemName: "user#123",
30 * Attributes: [{ Name: "plan" }],
31 * });
32 * ```
33 *
34 * @binding
35 */
36export interface DeleteAttributes extends Binding.Service<
37 DeleteAttributes,
38 "AWS.SimpleDB.DeleteAttributes",
39 (
40 domain: Domain,
41 ) => Effect.Effect<
42 (
43 request: DeleteAttributesRequest,
44 ) => Effect.Effect<
45 sdb.DeleteAttributesResponse,
46 sdb.DeleteAttributesError,
47 RuntimeContext
48 >
49 >
50> {}
51export const DeleteAttributes = Binding.Service<DeleteAttributes>(
52 "AWS.SimpleDB.DeleteAttributes",
53);