Account Management
AWS Account Management (account) on fakecloud: alternate contacts, primary contact information and phone-number verification, account information, primary-email OTP flow, and Region opt-in control. restJson1.
fakecloud implements AWS Account Management (account) as a restJson1 control plane. The complete 18-operation surface ships — alternate contacts, primary contact information and its phone-number verification, account information, primary-email management, and Region opt-in control — backed by account-partitioned state that persists across restarts in persistent mode.
Every operation honors the optional AccountId member, so an organization's management account can read and write a member account's settings exactly as it would against real AWS; absent AccountId, the operation targets the caller's own account. (The primary-email operations mark AccountId as required, matching the AWS Smithy model.)
Supported now (all 18 operations)
- Alternate contacts —
PutAlternateContact,GetAlternateContact,DeleteAlternateContact. Each account exposes three independent contact slots —BILLING,OPERATIONS, andSECURITY— storingName,Title,EmailAddress, andPhoneNumber. Field length limits from the model are enforced (Name <= 64, Title <= 50, EmailAddress <= 254, PhoneNumber <= 25), and reading or deleting an unset slot returnsResourceNotFoundException. - Primary contact information —
PutContactInformation,GetContactInformation. The fullContactInformationobject round-trips (FullName,AddressLine1-3,City,CountryCode,PhoneNumber,PostalCode,CompanyName,DistrictOrCounty,StateOrRegion,WebsiteUrl); the model's required members are validated on write.GetContactInformationalso returnsVerificationStatusfor the contact phone number (UNVERIFIED,PENDING, orVERIFIED). - Phone-number verification:
SendPhoneNumberVerification,VerifyPhoneNumber. Sending issues a one-time passcode for the current contact phone number and returnsStatus: PENDING; verifying with the passcode returnsStatus: VERIFIED. fakecloud sends no SMS, so the passcode is always000000(the same fixed code the primary-email flow uses). A malformed or wrong passcode returnsValidationException; verifying with nothing pending, or sending/verifying an already-verified number, returnsConflictException; with no contact information both returnResourceNotFoundException. Changing the contactPhoneNumberwithPutContactInformationresets the status toUNVERIFIED. - Account information —
GetAccountInformation(returnsAccountId,AccountName,AccountCreatedDate,AccountState),PutAccountName(AccountName<= 50), andGetGovCloudAccountInformation(returns a deterministically-pairedGovCloudAccountIdfor a standard account id). - Primary email —
GetPrimaryEmail,StartPrimaryEmailUpdate,AcceptPrimaryEmailUpdate,GetPrimaryEmailUpdateStatus. Starting an update records a pending change and returnsStatus: PENDING; accepting it with the matching one-time password commits the new address and returnsStatus: ACCEPTED(the one-time password is always000000). A wrong OTP or email returnsValidationException.GetPrimaryEmailUpdateStatusreports the in-flight status (PENDINGwhile an update awaits acceptance,ACCEPTEDonce committed) and returnsResourceNotFoundExceptionwhen no update has been started. - Region opt-in —
ListRegions,GetRegionOptStatus,EnableRegion,DisableRegion. Backed by the real AWS Region catalogue: always-on regions reportENABLED_BY_DEFAULT, opt-in regions default toDISABLED.EnableRegion/DisableRegionmove an opt-in region toENABLING/DISABLING, which settles toENABLED/DISABLEDon the nextGetRegionOptStatusorListRegionsread (mirroring the real service's eventual transition).ListRegionssupports theRegionOptStatusContainsfilter andMaxResults/NextTokenpagination; toggling an always-on region returnsValidationException.
Persistence
All account data — contacts, contact information and its phone verification, account name, the pending and committed primary email, and per-region opt overrides — is account-partitioned and written through to the persistence snapshot, so it survives a restart in persistent mode.
Not implemented
CloseAccount is not part of the current AWS Account Smithy model surface and is therefore not implemented. There is no billing or organization-membership side effect beyond the contact/region metadata this API manages.