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.
Parameters:
-
detector_id
(DetectorId)
–
The unique ID of the detector of the GuardDuty member account.
Raises:
Source code in docs_src/capo_guardduty/_services/async_guard_duty.py
| async def get_administrator_account(
self,
detector_id: "capo_guardduty.types.detector_id.DetectorId",
*,
config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
) -> "capo_guardduty.types.get_administrator_account_response.GetAdministratorAccountResponse":
"""<p>Provides the details of the GuardDuty administrator account associated with the current GuardDuty member account.</p> <p>Based on the type of account that runs this API, the following list shows how the API behavior varies:</p> <ul> <li> <p>When the GuardDuty administrator account runs this API, it will return success (<code>HTTP 200</code>) but no content.</p> </li> <li> <p>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.</p> </li> <li> <p>When an individual account (not associated with an organization) runs this API, it will return success (<code>HTTP 200</code>) but no content.</p> </li> </ul>
Args:
detector_id: <p>The unique ID of the detector of the GuardDuty member account.</p>
Raises:
capo_guardduty.errors.bad_request_exception.BadRequestException: <p>A bad request exception object.</p>
capo_guardduty.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error exception object.</p>
capo_guardduty.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_guardduty.types.get_administrator_account_request.GetAdministratorAccountRequest]",
) -> AsyncOperationResponse[
"capo_guardduty.types.get_administrator_account_response.GetAdministratorAccountResponse"
]:
import capo_guardduty._operations.guard_duty_api_service.get_administrator_account
(
output,
http_response,
) = await capo_guardduty._operations.guard_duty_api_service.get_administrator_account.async_get_administrator_account(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetAdministratorAccount")
)
input_: capo_guardduty.types.get_administrator_account_request.GetAdministratorAccountRequest = {
"detector_id": detector_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|