hankehly commented on code in PR #26003:
URL: https://github.com/apache/airflow/pull/26003#discussion_r963196297
##########
airflow/providers/amazon/aws/sensors/rds.py:
##########
@@ -51,17 +50,29 @@ def _describe_item(self, item_type: str, item_name: str) ->
list:
elif item_type == 'export_task':
exports =
self.hook.conn.describe_export_tasks(ExportTaskIdentifier=item_name)
return exports['ExportTasks']
+ elif item_type == "db_instance":
+ instances =
self.hook.conn.describe_db_instances(DBInstanceIdentifier=item_name)
+ return instances["DBInstances"]
+ elif item_type == "db_cluster":
+ clusters =
self.hook.conn.describe_db_clusters(DBClusterIdentifier=item_name)
+ return clusters["DBClusters"]
else:
raise AirflowException(f"Method for {item_type} is not
implemented")
def _check_item(self, item_type: str, item_name: str) -> bool:
"""Get certain item from `_describe_item()` and check its status"""
+ if item_type == "db_instance":
Review Comment:
Update 2022/09/06
https://github.com/apache/airflow/pull/26003#discussion_r963185967
--
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]