| 1 | import type * as resourcegroups from "@distilled.cloud/aws/resource-groups"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `resource-groups:GetAccountSettings`. |
| 7 | * |
| 8 | * Reads the account's Resource Groups settings — most importantly whether |
| 9 | * group lifecycle events (the EventBridge feed consumed by |
| 10 | * {@link consumeGroupEvents}) are `ACTIVE`, `INACTIVE`, or stuck in |
| 11 | * `ERROR`. Provide the implementation with |
| 12 | * `Effect.provide(AWS.ResourceGroups.GetAccountSettingsHttp)`. |
| 13 | * ### Account Settings |
| 14 | * **Example:** Check Group Lifecycle Events Status |
| 15 | * ```typescript |
| 16 | * // init |
| 17 | * const getAccountSettings = yield* AWS.ResourceGroups.GetAccountSettings(); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { AccountSettings } = yield* getAccountSettings(); |
| 21 | * const status = AccountSettings?.GroupLifecycleEventsStatus; |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface GetAccountSettings extends Binding.Service< |
| 27 | GetAccountSettings, |
| 28 | "AWS.ResourceGroups.GetAccountSettings", |
| 29 | () => Effect.Effect< |
| 30 | () => Effect.Effect< |
| 31 | resourcegroups.GetAccountSettingsOutput, |
| 32 | resourcegroups.GetAccountSettingsError |
| 33 | > |
| 34 | > |
| 35 | > {} |
| 36 | export const GetAccountSettings = Binding.Service<GetAccountSettings>( |
| 37 | "AWS.ResourceGroups.GetAccountSettings", |
| 38 | ); |