sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ GreengrassV2/ ListComponentVersions.ts

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

/**
 * Runtime binding for `greengrass:ListComponentVersions`.
 *
 * Enumerates every registered version of a component, newest first. The
 * caller supplies the component's base ARN
 * (`arn:aws:greengrass:…:components:{name}`, without the `:versions:`
 * suffix). Provide the implementation with
 * `Effect.provide(AWS.GreengrassV2.ListComponentVersionsHttp)`.
 * ### Reading Components
 * **Example:** List A Component's Versions
 * ```typescript
 * // init — account-level binding, no resource argument
 * const listComponentVersions = yield* AWS.GreengrassV2.ListComponentVersions();
 *
 * // runtime
 * const { componentVersions } = yield* listComponentVersions({
 *   arn: componentBaseArn,
 * });
 * ```
 *
 * @binding
 */
export interface ListComponentVersions extends Binding.Service<
  ListComponentVersions,
  "AWS.GreengrassV2.ListComponentVersions",
  () => Effect.Effect<
    (
      request: greengrassv2.ListComponentVersionsRequest,
    ) => Effect.Effect<
      greengrassv2.ListComponentVersionsResponse,
      greengrassv2.ListComponentVersionsError
    >
  >
> {}
export const ListComponentVersions = Binding.Service<ListComponentVersions>(
  "AWS.GreengrassV2.ListComponentVersions",
);