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

main
ts 39 lines 1.36 KB
Raw
1 import type * as shield from "@distilled.cloud/aws/shield";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `shield:GetSubscriptionState`.
7 *
8 * Returns whether the account's Shield Advanced subscription is `ACTIVE` or
9 * `INACTIVE` — available to every account, subscribed or not, so a handler
10 * can branch on Shield Advanced availability before calling gated operations.
11 * Provide the implementation with
12 * `Effect.provide(AWS.Shield.GetSubscriptionStateHttp)`.
13 * ### Subscription Visibility
14 * **Example:** Check Shield Advanced Availability
15 * ```typescript
16 * // init — account-level binding, no resource argument
17 * const getSubscriptionState = yield* AWS.Shield.GetSubscriptionState();
18 *
19 * // runtime
20 * const { SubscriptionState } = yield* getSubscriptionState();
21 * if (SubscriptionState === "ACTIVE") {
22 * // Shield Advanced operations are available
23 * }
24 * ```
25 *
26 * @binding
27 */
28 export interface GetSubscriptionState extends Binding.Service<
29 GetSubscriptionState,
30 "AWS.Shield.GetSubscriptionState",
31 () => Effect.Effect<
32 (
33 request?: shield.GetSubscriptionStateRequest,
34 ) => Effect.Effect<shield.GetSubscriptionStateResponse, shield.GetSubscriptionStateError>
35 >
36 > {}
37 export const GetSubscriptionState = Binding.Service<GetSubscriptionState>(
38 "AWS.Shield.GetSubscriptionState",
39 );