You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2023/01/16 23:13:17 UTC

[GitHub] [beam] egalpin commented on a diff in pull request #25024: Add withDefaultHeaders to connection configuration for ElasticsearchIO

egalpin commented on code in PR #25024:
URL: https://github.com/apache/beam/pull/25024#discussion_r1071624010


##########
sdks/java/io/elasticsearch/src/main/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIO.java:
##########
@@ -514,6 +521,8 @@ public ConnectionConfiguration withApiKey(String apiKey) {
 
     /**
      * If Elasticsearch authentication is enabled, provide a bearer token.
+     * Be aware that you can only use one of {@Code withApiToken()}, {@code withBearerToken()} and
+     * {@code withDefaultHeaders} at the same time, as they will override eachother.

Review Comment:
   Is there a reasonable way to add Precondition checks to try to alert the user when these mutually exclusive fields have been used in conjunction?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org