The best way to control Claude Code, Codex and more from any computer or phone

main
ts 37 lines 1.44 KB
Raw
1 import type * as ds from "@distilled.cloud/aws/directory-service";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for the `GetDirectoryLimits` operation (IAM action
7 * `ds:GetDirectoryLimits`).
8 *
9 * Reads the account's directory limits for the current region — how many
10 * cloud directories exist versus the allowed maximum — so an ops function
11 * can alert before directory creation starts failing. The action does not
12 * support resource-level permissions, so the grant is account-wide. Provide
13 * the implementation with
14 * `Effect.provide(AWS.DirectoryService.GetDirectoryLimitsHttp)`.
15 * ### Reading Account Limits
16 * **Example:** Alert When the Directory Limit Is Near
17 * ```typescript
18 * // init — request the account-level capability
19 * const getDirectoryLimits = yield* AWS.DirectoryService.GetDirectoryLimits();
20 *
21 * // runtime
22 * const { DirectoryLimits } = yield* getDirectoryLimits();
23 * if (DirectoryLimits?.CloudOnlyDirectoriesLimitReached) {
24 * yield* Effect.logWarning("directory limit reached");
25 * }
26 * ```
27 *
28 * @binding
29 */
30 export interface GetDirectoryLimits extends Binding.Service<
31 GetDirectoryLimits,
32 "AWS.DirectoryService.GetDirectoryLimits",
33 () => Effect.Effect<() => Effect.Effect<ds.GetDirectoryLimitsResult, ds.GetDirectoryLimitsError>>
34 > {}
35 export const GetDirectoryLimits = Binding.Service<GetDirectoryLimits>(
36 "AWS.DirectoryService.GetDirectoryLimits",
37 );