Enables an Amazon Web Services account within the organization as the delegated administrator for Audit Manager.
Parameters:
-
admin_account_id
(AccountId)
–
The identifier for the delegated administrator account.
Raises:
Source code in docs_src/capo_auditmanager/_services/audit_manager.py
| def register_organization_admin_account(
self,
admin_account_id: "capo_auditmanager.types.account_id.AccountId",
*,
config_overrides: Optional[AuditManagerClientConfig] = None,
) -> "capo_auditmanager.types.register_organization_admin_account_response.RegisterOrganizationAdminAccountResponse":
"""<p> Enables an Amazon Web Services account within the organization as the delegated administrator for Audit Manager. </p>
Args:
admin_account_id: <p> The identifier for the delegated administrator account. </p>
Raises:
capo_auditmanager.errors.access_denied_exception.AccessDeniedException: <p> Your account isn't registered with Audit Manager. Check the delegated administrator setup on the Audit Manager settings page, and try again. </p>
capo_auditmanager.errors.internal_server_exception.InternalServerException: <p> An internal service error occurred during the processing of your request. Try again later. </p>
capo_auditmanager.errors.resource_not_found_exception.ResourceNotFoundException: <p> The resource that's specified in the request can't be found. </p>
capo_auditmanager.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_auditmanager.errors.validation_exception.ValidationException: <p> The request has invalid or missing parameters. </p>
capo_auditmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_auditmanager.types.register_organization_admin_account_request.RegisterOrganizationAdminAccountRequest]",
) -> OperationResponse[
"capo_auditmanager.types.register_organization_admin_account_response.RegisterOrganizationAdminAccountResponse"
]:
import capo_auditmanager._operations.bedrock_assessment_manager_lambda.register_organization_admin_account
output, http_response = (
capo_auditmanager._operations.bedrock_assessment_manager_lambda.register_organization_admin_account.register_organization_admin_account(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RegisterOrganizationAdminAccount")
)
input_: capo_auditmanager.types.register_organization_admin_account_request.RegisterOrganizationAdminAccountRequest = {
"admin_account_id": admin_account_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|