You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/18 19:46:08 UTC

[GitHub] [airflow] eladkal commented on a diff in pull request #26652: Add GlacierUploadArchiveOperator

eladkal commented on code in PR #26652:
URL: https://github.com/apache/airflow/pull/26652#discussion_r998641399


##########
airflow/providers/amazon/aws/operators/glacier.py:
##########
@@ -54,3 +54,55 @@ def __init__(
     def execute(self, context: Context):
         hook = GlacierHook(aws_conn_id=self.aws_conn_id)
         return hook.retrieve_inventory(vault_name=self.vault_name)
+
+
+class GlacierUploadArchiveOperator(BaseOperator):
+    """
+    This operation adds an archive to a vault
+
+    .. seealso::
+        For more information on how to use this operator, take a look at the guide:
+        :ref:`howto/operator:GlacierUploadArchiveOperator`
+
+    :param account_id: The AWS account ID of the account that owns the vault.
+        You can either specify an AWS account ID or optionally a single `-` (hyphen),
+        in which case Amazon S3 Glacier uses the AWS account ID associated with
+        the credentials used to sign the request
+    :param vault_name: The name of the vault
+    :param archive: A bytes or seekable file-like object. The data to upload.
+    :param description: The description of the archive you are uploading

Review Comment:
   What is the reason for giving new names to the names boto3 choose?
   It's OK to do it I'm just interested in the reason.
   Specifically the function has parameter `archiveDescription`  In the operator we set `archive` and `description` but archive is actually body in boto3 and description is `archiveDescription` isn't that a bit confusing?
   https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glacier.html#Glacier.Client.upload_archive



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org