sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ IoT/ ListThings.ts

import type * as iot from "@distilled.cloud/aws/iot";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

export interface ListThingsRequest extends iot.ListThingsRequest {}

/**
 * Runtime binding for the `ListThings` operation (IAM action
 * `iot:ListThings`, granted on `*` — the action does not support
 * resource-level permissions).
 *
 * Lists things in the registry, optionally filtered by attribute or thing
 * type. Provide the implementation with
 * `Effect.provide(AWS.IoT.ListThingsHttp)`.
 * ### Registry
 * **Example:** List Things by Attribute
 * ```typescript
 * const listThings = yield* AWS.IoT.ListThings();
 *
 * const { things } = yield* listThings({
 *   attributeName: "location",
 *   attributeValue: "warehouse-a",
 * });
 * ```
 *
 * @binding
 */
export interface ListThings extends Binding.Service<
  ListThings,
  "AWS.IoT.ListThings",
  () => Effect.Effect<
    (request?: ListThingsRequest) => Effect.Effect<iot.ListThingsResponse, iot.ListThingsError>
  >
> {}

export const ListThings = Binding.Service<ListThings>("AWS.IoT.ListThings");