| 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 | |
| 5 | export interface ListWorkspacesRequest extends amp.ListWorkspacesRequest {} |
| 6 | |
| 7 | /** |
| 8 | * Runtime binding for `aps:ListWorkspaces`. |
| 9 | * |
| 10 | * An account-level binding — call it with no arguments to get a callable that |
| 11 | * lists AMP workspaces in the region. Provide the `ListWorkspacesHttp` layer |
| 12 | * on the Function to satisfy the binding. |
| 13 | * |
| 14 | * ### Workspace Metadata |
| 15 | * **Example:** List Workspaces in the Region |
| 16 | * ```typescript |
| 17 | * const listWorkspaces = yield* AMP.ListWorkspaces(); |
| 18 | * |
| 19 | * const response = yield* listWorkspaces(); |
| 20 | * const ids = response.workspaces.map((workspace) => workspace.workspaceId); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface ListWorkspaces extends Binding.Service< |
| 26 | ListWorkspaces, |
| 27 | "AWS.AMP.ListWorkspaces", |
| 28 | () => Effect.Effect< |
| 29 | ( |
| 30 | request?: ListWorkspacesRequest, |
| 31 | ) => Effect.Effect<amp.ListWorkspacesResponse, amp.ListWorkspacesError> |
| 32 | > |
| 33 | > {} |
| 34 | export const ListWorkspaces = Binding.Service<ListWorkspaces>( |
| 35 | "AWS.AMP.ListWorkspaces", |
| 36 | ); |