xinbinhuang commented on a change in pull request #15104:
URL: https://github.com/apache/airflow/pull/15104#discussion_r606082085



##########
File path: airflow/providers/amazon/aws/secrets/secrets_manager.py
##########
@@ -102,17 +102,66 @@ def client(self):
         )
         return session.client(service_name="secretsmanager", **self.kwargs)
 
-    def get_conn_uri(self, conn_id: str) -> Optional[str]:
+    def _get_extra(self, secret, conn_string):
+        if 'extra' in secret:
+            extra_dict = ast.literal_eval(secret['extra'])
+            counter = 0
+            for key, value in extra_dict.items():
+                if counter == 0:
+                    conn_string += f'?{key}={value}'
+                else:
+                    conn_string += f'&{key}={value}'
+
+                counter += 1
+
+        return conn_string

Review comment:
       ```suggestion
           kvs = "&".join([f"{key}={value} for key, value in 
extra_dict.items()])
           return f"{conn_string}?{kvs}"
   ```




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to