AWS.Account reference
AccountName
Section titled “AccountName”Source:
src/AWS/Account/AccountName.ts
The display name of an AWS account. Every account has exactly one name; this
account-global singleton sets it via account:PutAccountName. Deleting the
resource stops managing the name and leaves the last value in place (an
account always has a name).
AccountName: Naming the Account
Section titled “AccountName: Naming the Account”Set the Calling Account’s Name
const name = yield* AccountName("Name", { accountName: "acme-prod",});Rename an Organizations Member Account
const name = yield* AccountName("MemberName", { accountName: "acme-sandbox", accountId: "123456789012",});AlternateContact
Section titled “AlternateContact”Source:
src/AWS/Account/AlternateContact.ts
An alternate contact for an AWS account. AWS accounts support one alternate
contact for each of the BILLING, OPERATIONS, and SECURITY categories.
These are account-global singletons: setting one overwrites any existing
contact of the same type, and deleting removes it entirely.
AlternateContact: Setting an Alternate Contact
Section titled “AlternateContact: Setting an Alternate Contact”Operations Contact
const contact = yield* AlternateContact("OpsContact", { alternateContactType: "OPERATIONS", name: "Ops Team", title: "On-Call Engineer", emailAddress: "ops@example.com", phoneNumber: "+15555550123",});Billing Contact for an Organizations Member Account
const contact = yield* AlternateContact("BillingContact", { alternateContactType: "BILLING", name: "Finance", title: "AP Clerk", emailAddress: "ap@example.com", phoneNumber: "+15555550124", accountId: "123456789012",});ContactInformation
Section titled “ContactInformation”Source:
src/AWS/Account/ContactInformation.ts
The primary contact information of an AWS account — the account-global
mailing address and phone number AWS uses to reach the account owner. Every
account has exactly one primary contact; this resource upserts it via
account:PutContactInformation. AWS does not allow deleting the primary
contact, so destroying the resource stops managing it and leaves the last
value in place.
ContactInformation: Setting the Primary Contact
Section titled “ContactInformation: Setting the Primary Contact”Primary Contact for the Calling Account
const contact = yield* ContactInformation("PrimaryContact", { fullName: "Jane Doe", addressLine1: "123 Any Street", city: "Seattle", stateOrRegion: "WA", postalCode: "98101", countryCode: "US", phoneNumber: "+12065551234", companyName: "Acme Corp", websiteUrl: "https://acme.example.com",});Primary Contact for an Organizations Member Account
const contact = yield* ContactInformation("MemberContact", { fullName: "Acme Ops", addressLine1: "123 Any Street", city: "Seattle", postalCode: "98101", countryCode: "US", phoneNumber: "+12065551234", accountId: "123456789012",});GetAccountInformation
Section titled “GetAccountInformation”Source:
src/AWS/Account/GetAccountInformation.ts
Runtime binding for account:GetAccountInformation.
Reads the calling account’s metadata — account id, account name, creation
date, and account state. Account Management is an account singleton, so the
binding takes no resource argument. Provide the implementation with
Effect.provide(AWS.Account.GetAccountInformationHttp).
GetAccountInformation: Reading Account Settings
Section titled “GetAccountInformation: Reading Account Settings”// init — account-level binding, no resource argumentconst getAccountInformation = yield* AWS.Account.GetAccountInformation();
// runtimeconst info = yield* getAccountInformation();console.log(info.AccountId, info.AccountState);GetAlternateContact
Section titled “GetAlternateContact”Source:
src/AWS/Account/GetAlternateContact.ts
Runtime binding for account:GetAlternateContact.
Reads one of the calling account’s alternate contacts (BILLING,
OPERATIONS, or SECURITY). When the requested contact type has never
been set, the operation fails with the typed
ResourceNotFoundException. Account Management is an account singleton,
so the binding takes no resource argument. Provide the implementation with
Effect.provide(AWS.Account.GetAlternateContactHttp).
GetAlternateContact: Reading Account Settings
Section titled “GetAlternateContact: Reading Account Settings”// init — account-level binding, no resource argumentconst getAlternateContact = yield* AWS.Account.GetAlternateContact();
// runtimeconst billing = yield* getAlternateContact({ AlternateContactType: "BILLING",}).pipe( Effect.catchTag("ResourceNotFoundException", () => Effect.succeed({ AlternateContact: undefined }), ),);GetContactInformation
Section titled “GetContactInformation”Source:
src/AWS/Account/GetContactInformation.ts
Runtime binding for account:GetContactInformation.
Reads the calling account’s primary contact — full name, address, phone
number, and company. The contact fields are marked sensitive at the wire
level, so distilled returns them as string | Redacted<string>. Account
Management is an account singleton, so the binding takes no resource
argument. Provide the implementation with
Effect.provide(AWS.Account.GetContactInformationHttp).
GetContactInformation: Reading Account Settings
Section titled “GetContactInformation: Reading Account Settings”// init — account-level binding, no resource argumentconst getContactInformation = yield* AWS.Account.GetContactInformation();
// runtimeconst { ContactInformation } = yield* getContactInformation();console.log(ContactInformation?.CountryCode);GetRegionOptStatus
Section titled “GetRegionOptStatus”Source:
src/AWS/Account/GetRegionOptStatus.ts
Runtime binding for account:GetRegionOptStatus.
Reads the opt-in status of a single Region for the calling account
(ENABLED, DISABLED, ENABLING, DISABLING, or
ENABLED_BY_DEFAULT). Account Management is an account singleton, so the
binding takes no resource argument. Provide the implementation with
Effect.provide(AWS.Account.GetRegionOptStatusHttp).
GetRegionOptStatus: Reading Region Opt Status
Section titled “GetRegionOptStatus: Reading Region Opt Status”// init — account-level binding, no resource argumentconst getRegionOptStatus = yield* AWS.Account.GetRegionOptStatus();
// runtimeconst status = yield* getRegionOptStatus({ RegionName: "ap-east-1" });console.log(status.RegionOptStatus);ListRegions
Section titled “ListRegions”Source:
src/AWS/Account/ListRegions.ts
Runtime binding for account:ListRegions.
Lists every Region available to the calling account together with its
opt-in status (ENABLED, DISABLED, ENABLED_BY_DEFAULT, …), optionally
filtered by RegionOptStatusContains. Account Management is an account
singleton, so the binding takes no resource argument. Provide the
implementation with Effect.provide(AWS.Account.ListRegionsHttp).
ListRegions: Reading Region Opt Status
Section titled “ListRegions: Reading Region Opt Status”// init — account-level binding, no resource argumentconst listRegions = yield* AWS.Account.ListRegions();
// runtimeconst { Regions } = yield* listRegions({ RegionOptStatusContains: ["ENABLED_BY_DEFAULT"],});for (const region of Regions ?? []) { console.log(region.RegionName, region.RegionOptStatus);}Region
Section titled “Region”Source:
src/AWS/Account/Region.ts
The opt-in status of an AWS Region for an account. Opt-in Regions (e.g.
ap-east-1, me-south-1) are disabled by default and must be enabled
before use; this resource drives account:EnableRegion /
account:DisableRegion to converge the Region to the desired status.
Enabling or disabling a Region is asynchronous and can take several
minutes; reconcile waits (bounded) for the transition to settle and records
the observed status either way. Disabling a Region removes all IAM access
to resources in it, so destroying this resource intentionally does NOT
disable the Region — it only stops managing it (set enabled: false
explicitly to opt out).
Region: Managing Region Opt-In
Section titled “Region: Managing Region Opt-In”Enable an Opt-In Region
const region = yield* Account.Region("HongKong", { regionName: "ap-east-1", enabled: true,});Track a Default Region
const region = yield* Account.Region("UsEast1", { regionName: "us-east-1", enabled: true, // ENABLED_BY_DEFAULT — reconcile makes no API mutation});Opt Out of a Region
const region = yield* Account.Region("HongKong", { regionName: "ap-east-1", enabled: false,});