describeAccount method
Retrieves Organizations-related information about the specified account.
You can only call this operation from the management account or a member account that is a delegated administrator.
May throw AccessDeniedException.
May throw AccountNotFoundException.
May throw AWSOrganizationsNotInUseException.
May throw InvalidInputException.
May throw ServiceException.
May throw TooManyRequestsException.
Parameter accountId :
The unique identifier (ID) of the Amazon Web Services account that you
want information about. You can get the ID from the ListAccounts or
ListAccountsForParent operations.
The regex pattern for an account ID string requires exactly 12 digits.
Implementation
Future<DescribeAccountResponse> describeAccount({
required String accountId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSOrganizationsV20161128.DescribeAccount'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AccountId': accountId,
},
);
return DescribeAccountResponse.fromJson(jsonResponse.body);
}