getAdministratorAccount method
Provides the details of the GuardDuty administrator account associated with the current GuardDuty member account.
Based on the type of account that runs this API, the following list shows how the API behavior varies:
-
When the GuardDuty administrator account runs this API, it will return
success (
HTTP 200) but no content. - When a member account runs this API, it will return the details of the GuardDuty administrator account that is associated with this calling member account.
-
When an individual account (not associated with an organization) runs this
API, it will return success (
HTTP 200) but no content.
May throw BadRequestException.
May throw InternalServerErrorException.
Parameter detectorId :
The unique ID of the detector of the GuardDuty member account.
Implementation
Future<GetAdministratorAccountResponse> getAdministratorAccount({
required String detectorId,
}) async {
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/detector/${Uri.encodeComponent(detectorId)}/administrator',
exceptionFnMap: _exceptionFns,
);
return GetAdministratorAccountResponse.fromJson(response);
}