@SdkInternalApi
    final EnableOrganizationAdminAccountResult executeEnableOrganizationAdminAccount(EnableOrganizationAdminAccountRequest enableOrganizationAdminAccountRequest) {

        ExecutionContext executionContext = createExecutionContext(enableOrganizationAdminAccountRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<EnableOrganizationAdminAccountRequest> request = null;
        Response<EnableOrganizationAdminAccountResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new EnableOrganizationAdminAccountRequestProtocolMarshaller(protocolFactory).marshall(super
                        .beforeMarshalling(enableOrganizationAdminAccountRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
                request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
                request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
                request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
                request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Detective");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "EnableOrganizationAdminAccount");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

            } finally {
                awsRequestMetrics.endEvent(Field.RequestMarshallTime);
            }

            HttpResponseHandler<AmazonWebServiceResponse<EnableOrganizationAdminAccountResult>> responseHandler = protocolFactory.createResponseHandler(
                    new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
                    new EnableOrganizationAdminAccountResultJsonUnmarshaller());
            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Designates the Detective administrator account for the organization in the current Region.
</p>
<p>
If the account does not have Detective enabled, then enables Detective for that account and creates a new
behavior graph.
</p>
<p>
Can only be called by the organization management account.
</p>
<p>
If the organization has a delegated administrator account in Organizations, then the Detective administrator
account must be either the delegated administrator account or the organization management account.
</p>
<p>
If the organization does not have a delegated administrator account in Organizations, then you can choose any
account in the organization. If you choose an account other than the organization management account, Detective
calls Organizations to make that account the delegated administrator account for Detective. The organization
management account cannot be the delegated administrator account.
</p>

@param enableOrganizationAdminAccountRequest
@return Result of the EnableOrganizationAdminAccount operation returned by the service.
@throws AccessDeniedException
        The request issuer does not have permission to access this resource or perform this operation.
@throws InternalServerException
        The request was valid but failed because of a problem with the service.
@throws ValidationException
        The request parameters are invalid.
@throws TooManyRequestsException
        The request cannot be completed because too many other requests are occurring at the same time.
@sample AmazonDetective.EnableOrganizationAdminAccount
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/EnableOrganizationAdminAccount"
     target="_top">AWS API Documentation</a>
aws-java-sdk-detective/src/main/java/com/amazonaws/services/detective/AmazonDetectiveClient.java