The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import type * as SVC from "@distilled.cloud/aws/emr"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { Cluster } from "./Cluster.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `elasticmapreduce:ListInstanceGroups` — lists the bound cluster's instance groups (instance-group clusters only) with requested/running counts — the ids feed {@link ModifyInstanceGroups} and {@link PutAutoScalingPolicy}. |
| 8 | * ### Inspecting the Cluster |
| 9 | * **Example:** Find the Core Group |
| 10 | * ```typescript |
| 11 | * const listInstanceGroups = yield* AWS.EMR.ListInstanceGroups(cluster); |
| 12 | * |
| 13 | * const { InstanceGroups } = yield* listInstanceGroups(); |
| 14 | * const core = InstanceGroups?.find( |
| 15 | * (group) => group.InstanceGroupType === "CORE", |
| 16 | * ); |
| 17 | * ``` |
| 18 | * |
| 19 | * @binding |
| 20 | */ |
| 21 | export interface ListInstanceGroups extends Binding.Service< |
| 22 | ListInstanceGroups, |
| 23 | "AWS.EMR.ListInstanceGroups", |
| 24 | <C extends Cluster>( |
| 25 | cluster: C, |
| 26 | ) => Effect.Effect< |
| 27 | ( |
| 28 | request?: Omit<SVC.ListInstanceGroupsInput, "ClusterId">, |
| 29 | ) => Effect.Effect<SVC.ListInstanceGroupsOutput, SVC.ListInstanceGroupsError> |
| 30 | > |
| 31 | > {} |
| 32 | export const ListInstanceGroups = Binding.Service<ListInstanceGroups>("AWS.EMR.ListInstanceGroups"); |