如何在S3ExportTaskDefinition中编写元数据。

0

【以下的问题经过翻译处理】 你好,

我正在尝试将元数据写入文件并将其上传到S3。

以下是我所拥有的内容。我不确定用户元数据的正确格式。

class MediaMeta(BaseModel):
        data:str

s3_export_task_definition = S3ExportTaskDefinition(input_url=self.src_file_path,
                                                           bucket=self.bucket_name,
                                                           key=self.key_to_file,
                                                           user_metadata=meta_data.dict())

感谢您的帮助。

profile picture
EXPERT
asked 6 months ago27 views
1 Answer
0

【以下的回答经过翻译处理】 这是一个添加元数据的示例:

        s3_task = S3ExportTaskDefinition(
            input_url = self.src_file_path,
            bucket = "foo",
            key = "bar",
            user_metadata = {
                "key": "value",
                "foo": "bar"
            }
        )

profile picture
EXPERT
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions