| :mod:`airflow.contrib.operators.imap_attachment_to_s3_operator` |
| =============================================================== |
| |
| .. py:module:: airflow.contrib.operators.imap_attachment_to_s3_operator |
| |
| |
| Module Contents |
| --------------- |
| |
| .. py:class:: ImapAttachmentToS3Operator(imap_attachment_name, s3_key, imap_mail_folder='INBOX', imap_check_regex=False, s3_overwrite=False, imap_conn_id='imap_default', s3_conn_id='aws_default', *args, **kwargs) |
| |
| Bases: :class:`airflow.models.BaseOperator` |
| |
| Transfers a mail attachment from a mail server into s3 bucket. |
| |
| :param imap_attachment_name: The file name of the mail attachment that you want to transfer. |
| :type imap_attachment_name: str |
| :param s3_key: The destination file name in the s3 bucket for the attachment. |
| :type s3_key: str |
| :param imap_mail_folder: The folder on the mail server to look for the attachment. |
| :type imap_mail_folder: str |
| :param imap_check_regex: If set checks the `imap_attachment_name` for a regular expression. |
| :type imap_check_regex: bool |
| :param s3_overwrite: If set overwrites the s3 key if already exists. |
| :type s3_overwrite: bool |
| :param imap_conn_id: The reference to the connection details of the mail server. |
| :type imap_conn_id: str |
| :param s3_conn_id: The reference to the s3 connection details. |
| :type s3_conn_id: str |
| |
| .. attribute:: template_fields |
| :annotation: = ['imap_attachment_name', 's3_key'] |
| |
| |
| |
| |
| .. method:: execute(self, context) |
| |
| This function executes the transfer from the email server (via imap) into s3. |
| |
| :param context: The context while executing. |
| :type context: dict |
| |
| |
| |
| |