AWS Account Management
See AWS Account Management Reference Guide for general guidance with AWS account management functions.
API Access
The IAccountClient interface and its implementation TAccountClient provides access to all AWS account management operations.
Example Usage
This example lists the enabled regions for the AWS account of the calling identity.
program ListEnabledRegions;
{$APPTYPE CONSOLE}
{$R *.res}
uses
AWS.Account,
System.SysUtils;
var
Client: IAccountClient;
Response: IAccountListRegionsResponse;
begin
try
Client := TAccountClient.Create;
repeat
if Assigned(Response) then
Response := Client.ListRegions(['ENABLED', 'ENABLED_BY_DEFAULT'], 25, Response.NextToken)
else
Response := Client.ListRegions(['ENABLED', 'ENABLED_BY_DEFAULT'], 25);
if Response.IsSuccessful then
for var LRegion in Response.Regions do
Writeln(Format('%s: %s', [LRegion.RegionName, LRegion.RegionOptStatus]));
until Response.NextToken.IsEmpty;
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.