Given an event_source dictionary, create the object and remove the event source.
(
event_source: Dict[str, Any], lambda_arn: str, target_function: str, boto_session: boto3.Session, dry: bool = False
)
| 756 | |
| 757 | |
| 758 | def remove_event_source( |
| 759 | event_source: Dict[str, Any], lambda_arn: str, target_function: str, boto_session: boto3.Session, dry: bool = False |
| 760 | ) -> Union[BaseEventSource, bool, Dict[str, Any], None]: |
| 761 | """ |
| 762 | Given an event_source dictionary, create the object and remove the event source. |
| 763 | """ |
| 764 | event_source_obj, function_arn = get_event_source(event_source, lambda_arn, target_function, boto_session, dry=False) |
| 765 | |
| 766 | if not dry: |
| 767 | rule_response = event_source_obj.remove(function_arn) |
| 768 | return rule_response |
| 769 | else: |
| 770 | return event_source_obj |
| 771 | |
| 772 | |
| 773 | def get_event_source_status( |