1
有没有办法使用一个单一的put-object-tagging cli命令将标记(或一组标记)应用于S3目录中的所有对象?AWS S3 cli - 标记目录中的所有对象
也就是说,如果我有两个文件(test0.txt
,test.txt
)我可以做运行以下两个命令:
>aws s3api put-object-tagging --bucket mybucket --key foo/bar/test0.txt --tagging 'TagSet=[{Key=colour,Value=blue}]'
>aws s3api put-object-tagging --bucket mybucket --key foo/bar/test1.txt --tagging 'TagSet=[{Key=colour,Value=blue}]'
当试图通过文件夹本身作为--key选项我得到以下错误(因为它必须引用单个对象):
>aws s3api put-object-tagging --bucket mybucket --key foo/bar/ --tagging 'TagSet=[{Key=colour,Value=blue}]
An error occurred (NoSuchKey) when calling the PutObjectTagging operation: The specified key does not exist.
是否有解决方法?