| 1 | import type * as sdb from "@distilled.cloud/aws/simpledb"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { RuntimeContext } from "../../RuntimeContext.ts"; |
| 5 | import type { Domain } from "./Domain.ts"; |
| 6 | |
| 7 | /** |
| 8 | * Runtime binding for `sdb:DomainMetadata`. |
| 9 | * |
| 10 | * Bind this operation to a {@link Domain} inside a function runtime to get a |
| 11 | * callable that returns the domain's item/attribute counts and sizes. |
| 12 | * ### Domain Introspection |
| 13 | * **Example:** Read Domain Metadata |
| 14 | * ```typescript |
| 15 | * const domainMetadata = yield* AWS.SimpleDB.DomainMetadata(domain); |
| 16 | * |
| 17 | * const metadata = yield* domainMetadata(); |
| 18 | * // metadata.ItemCount, metadata.AttributeValueCount, ... |
| 19 | * ``` |
| 20 | * |
| 21 | * @binding |
| 22 | */ |
| 23 | export interface DomainMetadata extends Binding.Service< |
| 24 | DomainMetadata, |
| 25 | "AWS.SimpleDB.DomainMetadata", |
| 26 | ( |
| 27 | domain: Domain, |
| 28 | ) => Effect.Effect< |
| 29 | () => Effect.Effect< |
| 30 | sdb.DomainMetadataResponse, |
| 31 | sdb.DomainMetadataError, |
| 32 | RuntimeContext |
| 33 | > |
| 34 | > |
| 35 | > {} |
| 36 | export const DomainMetadata = Binding.Service<DomainMetadata>( |
| 37 | "AWS.SimpleDB.DomainMetadata", |
| 38 | ); |