sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ AppRegistry/ GetApplication.ts

import type * as appregistry from "@distilled.cloud/aws/service-catalog-appregistry";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";
import type { Application } from "./Application.ts";

/**
 * Runtime binding for `servicecatalog:GetApplication`.
 *
 * Reads the bound application's metadata — description, tags, the
 * `awsApplication` tag value, integrations, and the associated resource
 * count. Provide the implementation with
 * `Effect.provide(AWS.AppRegistry.GetApplicationHttp)`.
 * ### Reading Application Metadata
 * **Example:** Read the Application at Runtime
 * ```typescript
 * // init — bind the operation to the application
 * const getApplication = yield* AWS.AppRegistry.GetApplication(app);
 *
 * // runtime
 * const details = yield* getApplication();
 * console.log(details.name, details.associatedResourceCount);
 * ```
 *
 * @binding
 */
export interface GetApplication extends Binding.Service<
  GetApplication,
  "AWS.AppRegistry.GetApplication",
  (
    application: Application,
  ) => Effect.Effect<
    () => Effect.Effect<appregistry.GetApplicationResponse, appregistry.GetApplicationError>
  >
> {}

export const GetApplication = Binding.Service<GetApplication>("AWS.AppRegistry.GetApplication");