如何在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
ESPERTO
posta 6 mesi fa27 visualizzazioni
1 Risposta
0

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

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

profile picture
ESPERTO
con risposta 6 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande