eladkal commented on code in PR #26652:
URL: https://github.com/apache/airflow/pull/26652#discussion_r1000984512
##########
docs/apache-airflow-providers-amazon/operators/glacier.rst:
##########
@@ -46,6 +46,20 @@ This Operator returns a dictionary of information related to
the initiated job s
:start-after: [START howto_operator_glacier_create_job]
:end-before: [END howto_operator_glacier_create_job]
+.. _howto/operator:GlacierUploadArchiveOperator:
+
+Upload archive to an Amazon Glacier
+===================================
+
+To adds an archive to a Amazon Glacier vault
Review Comment:
```suggestion
To add an archive to a Amazon Glacier vault
```
##########
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 body: A bytes or seekable file-like object. The data to upload.
Review Comment:
Noting that my concern of
https://github.com/apache/airflow/pull/22758#discussion_r843298615 is also
applied here. The question of where the bytes come from is very important. If
it's from Xcom then body probably need to be templated (but I guess we don't
really want users to push it to Xcom?) if it's from somewhere else then we
probably a transfer operator is more suitable.
To me it seems like the only use case for this operator is when the body is
hard coded and I'm not sure how useful that is?
That said... If people find this useful as is I'm OK with it.
--
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]