ferruzzi commented on code in PR #25416:
URL: https://github.com/apache/airflow/pull/25416#discussion_r937023309


##########
docs/apache-airflow-providers-amazon/connections/aws.rst:
##########
@@ -104,6 +104,33 @@ If you are configuring the connection via a URI, ensure 
that all components of t
 Examples
 --------
 
+**Snippet for create Connection as URI**:
+  .. code-block:: python
+
+    import os
+    from airflow.models.connection import Connection
+
+
+    conn = Connection(
+        conn_id="sample_aws_connection",
+        conn_type="aws",
+        login="AKIAIOSFODNN7EXAMPLE",  # Reference to AWS Access Key ID
+        password="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",  # Reference to 
AWS Secret Access Key
+        extra={
+            # Specify extra parameters here
+            "region_name": "eu-central-1",
+        },
+    )
+
+    # Generate Environment Variable Name and Connection URI
+    env_key, conn_uri = f"AIRFLOW_CONN_{conn.conn_id.upper()}", conn.get_uri()

Review Comment:
   Nitpick, is there a reason these two assignments are on the same line?



##########
docs/apache-airflow-providers-amazon/connections/aws.rst:
##########
@@ -104,6 +104,33 @@ If you are configuring the connection via a URI, ensure 
that all components of t
 Examples
 --------
 

Review Comment:
   :1st_place_medal:  Nice addition



##########
airflow/providers/amazon/aws/hooks/base_aws.py:
##########
@@ -582,6 +582,34 @@ def decorator_f(self, *args, **kwargs):
 
         return retry_decorator
 
+    @staticmethod
+    def get_ui_field_behaviour() -> Dict[str, Any]:
+        """Returns custom UI field behaviour for AWS Connection."""
+        return {

Review Comment:
   Very minor nitpick, the flipping back and forth between single and double 
quotes in the return value is odd.
   



-- 
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: [email protected]

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

Reply via email to