| 1 | import type * as amp from "@distilled.cloud/aws/amp"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Workspace } from "./Workspace.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `aps:DescribeWorkspace`. |
| 8 | * |
| 9 | * Bind this operation to a {@link Workspace} inside a function runtime to get |
| 10 | * a callable that reads the workspace's control-plane metadata (status, |
| 11 | * alias, endpoint). Provide the `DescribeWorkspaceHttp` layer on the Function |
| 12 | * to satisfy the binding. |
| 13 | * |
| 14 | * ### Workspace Metadata |
| 15 | * **Example:** Describe the Bound Workspace |
| 16 | * ```typescript |
| 17 | * const describeWorkspace = yield* AMP.DescribeWorkspace(workspace); |
| 18 | * |
| 19 | * const response = yield* describeWorkspace(); |
| 20 | * const status = response.workspace.status.statusCode; |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface DescribeWorkspace extends Binding.Service< |
| 26 | DescribeWorkspace, |
| 27 | "AWS.AMP.DescribeWorkspace", |
| 28 | ( |
| 29 | workspace: Workspace, |
| 30 | ) => Effect.Effect< |
| 31 | () => Effect.Effect< |
| 32 | amp.DescribeWorkspaceResponse, |
| 33 | amp.DescribeWorkspaceError |
| 34 | > |
| 35 | > |
| 36 | > {} |
| 37 | export const DescribeWorkspace = Binding.Service<DescribeWorkspace>( |
| 38 | "AWS.AMP.DescribeWorkspace", |
| 39 | ); |