Removes the Detective administrator account in the current Region. Deletes the organization behavior graph.
Can only be called by the organization management account.
Removing the Detective administrator account does not affect the delegated administrator account for Detective in Organizations.
To remove the delegated administrator account in Organizations, use the Organizations API. Removing the delegated administrator account also removes the Detective administrator account in all Regions, except for Regions where the Detective administrator account is the organization management account.
Raises:
Source code in docs_src/capo_detective/_services/async_detective.py
| async def disable_organization_admin_account(
self, *, config_overrides: Optional[AsyncDetectiveClientConfig] = None
) -> None:
"""<p>Removes the Detective administrator account in the current Region. Deletes the organization behavior graph.</p> <p>Can only be called by the organization management account.</p> <p>Removing the Detective administrator account does not affect the delegated administrator account for Detective in Organizations.</p> <p>To remove the delegated administrator account in Organizations, use the Organizations API. Removing the delegated administrator account also removes the Detective administrator account in all Regions, except for Regions where the Detective administrator account is the organization management account.</p>
Raises:
capo_detective.errors.access_denied_exception.AccessDeniedException: <p>The request issuer does not have permission to access this resource or perform this operation.</p>
capo_detective.errors.internal_server_exception.InternalServerException: <p>The request was valid but failed because of a problem with the service.</p>
capo_detective.errors.too_many_requests_exception.TooManyRequestsException: <p>The request cannot be completed because too many other requests are occurring at the same time.</p>
capo_detective.errors.validation_exception.ValidationException: <p>The request parameters are invalid.</p>
capo_detective.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[None]",
) -> AsyncOperationResponse[None]:
import capo_detective._operations.amazon_detective.disable_organization_admin_account
(
output,
http_response,
) = await capo_detective._operations.amazon_detective.disable_organization_admin_account.async_disable_organization_admin_account(
req.options
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisableOrganizationAdminAccount")
)
response = await aexecute_pipeline(
AsyncOperationRequest(input=None, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|