Reputation: 902
As per aws cli put-bucket-tagging doc, I am able to execute following command
aws s3api put-bucket-tagging --bucket my-bucket --tagging file://tagging.json
with tagging.json file (case 1)
{
"TagSet": [
{
"Key": "organization",
"Value": "marketing"
}
]
}
Suppose my tagging.json file contains multiple TagSet nodes like (case 2)
{
"TagSet":[
{
"Key":"organization",
"Value":"marketing"
}
],
"TagSet":[
{
"Key":"test",
"Value":"market"
}
]
}
In this case, aws cli parses only first TagSet node which is similar to that of case 1. So the question is
<Tagging>
<TagSet>
<Tag>
<Key>Tag Name</Key>
<Value>Tag Value</Value>
</Tag>
</TagSet>
<TagSet>
<Tag>
<Key>Tag Name2</Key>
<Value>Tag Value2</Value>
</Tag>
</TagSet>
</Tagging>
Upvotes: 1
Views: 254
Reputation:
To answer your question about multiple TagSet nodes, I think the syntax of the file will need to be like so:
{
"TagSet":[
{
"Key":"organization",
"Value":"marketing"
},
{
"Key":"test",
"Value":"market"
}
]
}
TagSet will require to be a Single Key that contains a list of Key/Value tags so that AWS can parse them correctly, having multiple TagSet key's in the JSON Structure looks like AWS accepts the first one and drops anything after.
Upvotes: 1