sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ AMP/ DescribeWorkspace.ts

import type * as amp from "@distilled.cloud/aws/amp";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";
import type { Workspace } from "./Workspace.ts";

/**
 * Runtime binding for `aps:DescribeWorkspace`.
 *
 * Bind this operation to a {@link Workspace} inside a function runtime to get
 * a callable that reads the workspace's control-plane metadata (status,
 * alias, endpoint). Provide the `DescribeWorkspaceHttp` layer on the Function
 * to satisfy the binding.
 *
 * ### Workspace Metadata
 * **Example:** Describe the Bound Workspace
 * ```typescript
 * const describeWorkspace = yield* AMP.DescribeWorkspace(workspace);
 *
 * const response = yield* describeWorkspace();
 * const status = response.workspace.status.statusCode;
 * ```
 *
 * @binding
 */
export interface DescribeWorkspace extends Binding.Service<
  DescribeWorkspace,
  "AWS.AMP.DescribeWorkspace",
  (
    workspace: Workspace,
  ) => Effect.Effect<() => Effect.Effect<amp.DescribeWorkspaceResponse, amp.DescribeWorkspaceError>>
> {}
export const DescribeWorkspace = Binding.Service<DescribeWorkspace>("AWS.AMP.DescribeWorkspace");