Returns information about the Detective administrator account for an organization. Can only be called by the organization management account.
Parameters:
-
next_token
(Optional[PaginationToken], default:
None
)
–
For requests to get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token.
-
max_results
(Optional[MemberResultsLimit], default:
None
)
–
The maximum number of results to return.
Raises:
Source code in docs_src/capo_detective/_services/async_detective.py
| async def list_organization_admin_accounts(
self,
*,
config_overrides: Optional[AsyncDetectiveClientConfig] = None,
next_token: Optional[
"capo_detective.types.pagination_token.PaginationToken"
] = None,
max_results: Optional[
"capo_detective.types.member_results_limit.MemberResultsLimit"
] = None,
) -> "capo_detective.types.list_organization_admin_accounts_response.ListOrganizationAdminAccountsResponse":
"""<p>Returns information about the Detective administrator account for an organization. Can only be called by the organization management account.</p>
Args:
next_token: <p>For requests to get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token.</p>
max_results: <p>The maximum number of results to return.</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[capo_detective.types.list_organization_admin_accounts_request.ListOrganizationAdminAccountsRequest]",
) -> AsyncOperationResponse[
"capo_detective.types.list_organization_admin_accounts_response.ListOrganizationAdminAccountsResponse"
]:
import capo_detective._operations.amazon_detective.list_organization_admin_accounts
(
output,
http_response,
) = await capo_detective._operations.amazon_detective.list_organization_admin_accounts.async_list_organization_admin_accounts(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListOrganizationAdminAccounts")
)
input_: capo_detective.types.list_organization_admin_accounts_request.ListOrganizationAdminAccountsRequest = {}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|