| 1 | import type * as account from "@distilled.cloud/aws/account"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `account:GetAccountInformation`. |
| 7 | * |
| 8 | * Reads the calling account's metadata — account id, account name, creation |
| 9 | * date, and account state. Account Management is an account singleton, so the |
| 10 | * binding takes no resource argument. Provide the implementation with |
| 11 | * `Effect.provide(AWS.Account.GetAccountInformationHttp)`. |
| 12 | * ### Reading Account Settings |
| 13 | * **Example:** Read the Account's Name and State |
| 14 | * ```typescript |
| 15 | * // init — account-level binding, no resource argument |
| 16 | * const getAccountInformation = yield* AWS.Account.GetAccountInformation(); |
| 17 | * |
| 18 | * // runtime |
| 19 | * const info = yield* getAccountInformation(); |
| 20 | * console.log(info.AccountId, info.AccountState); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface GetAccountInformation extends Binding.Service< |
| 26 | GetAccountInformation, |
| 27 | "AWS.Account.GetAccountInformation", |
| 28 | () => Effect.Effect< |
| 29 | ( |
| 30 | request?: account.GetAccountInformationRequest, |
| 31 | ) => Effect.Effect< |
| 32 | account.GetAccountInformationResponse, |
| 33 | account.GetAccountInformationError |
| 34 | > |
| 35 | > |
| 36 | > {} |
| 37 | export const GetAccountInformation = Binding.Service<GetAccountInformation>( |
| 38 | "AWS.Account.GetAccountInformation", |
| 39 | ); |