@Override
    public UpgradeDomainResult upgradeDomain(UpgradeDomainRequest request) {
        request = beforeClientExecution(request);
        return executeUpgradeDomain(request);
    }
<p>
Allows you to either upgrade your Amazon OpenSearch Service domain or perform an upgrade eligibility check to a
compatible version of OpenSearch or Elasticsearch.
</p>

@param upgradeDomainRequest
       Container for the request parameters to the <code>UpgradeDomain</code> operation.
@return Result of the UpgradeDomain operation returned by the service.
@throws BaseException
        An error occurred while processing the request.
@throws ResourceNotFoundException
        An exception for accessing or deleting a resource that doesn't exist.
@throws ResourceAlreadyExistsException
        An exception for creating a resource that already exists.
@throws DisabledOperationException
        An error occured because the client wanted to access an unsupported operation.
@throws ValidationException
        An exception for accessing or deleting a resource that doesn't exist.
@throws InternalException
        Request processing failed because of an unknown error, exception, or internal failure.
@sample AmazonOpenSearch.UpgradeDomain
aws-java-sdk-opensearch/src/main/java/com/amazonaws/services/opensearch/AmazonOpenSearchClient.java