public void setTargetVersion(String targetVersion) {
        this.targetVersion = targetVersion;
    }
<p>
OpenSearch or Elasticsearch version to which you want to upgrade, in the format Opensearch_X.Y or
Elasticsearch_X.Y.
</p>

@param targetVersion
       OpenSearch or Elasticsearch version to which you want to upgrade, in the format Opensearch_X.Y or
       Elasticsearch_X.Y.
aws-java-sdk-opensearch/src/main/java/com/amazonaws/services/opensearch/model/UpgradeDomainRequest.java