我使用以下aws cli命令。我一遍又一遍地看了一遍又一遍,不知道这个命令到底出了什么问题。
aws s3api put-bucket-tagging --bucket s3://****edited**** --tagging TagSet=[{Key=Name,Value=FHWA_Packaging_Logs},{Key=Project,Value=FHWA_Processing},{Key=Team,Value=Production}]我得到以下错误:
Unknown options: TagSet=[Key=Name,Value=FHWA_Processing,Key=Team], TagSet=[Key=Name,Value=FHWA_Processing,Value=Production], TagSet=[Value=FHWA_Packaging_Logs,Key=Project,Key=Team], TagSet=[Value=FHWA_Packaging_Logs,Key=Project,Value=Production], TagSet=[Value=FHWA_Packaging_Logs,Value=FHWA_Processing,Key=Team], TagSet=[Value=FHWA_Packaging_Logs,Value=FHWA_Processing,Value=Production], TagSet=[Key=Name,Key=Project,Value=Production]这命令怎么了?
发布于 2016-03-04 19:47:19
Amazon中的文档是不正确的,因此如果您复制它们的示例,您将无法运行该命令。CLI命令有两处问题:
1)桶名前面不应该有s3://。
( 2) TagSet应该有引号。"TagSet={Key=xxxxx,Value=ddddd}“(这不在AWS文档中)。
发布于 2020-10-11 20:23:45
我使用这个解决方案来标记bash脚本中的桶:
customer="customername"
awsbucket="bucketname"
tag="TagSet=[{Key=Customer,Value=$customer}]"
aws s3api put-bucket-tagging --bucket $awsbucket --tagging $tag我必须将TagSet部分放在一个单独的变量中,这样标记才能正常工作。
https://stackoverflow.com/questions/35781795
复制相似问题