我需要创建一个策略 IAM 来仅停止或终止具有特定标签(多个实例)的实例,我已经写了这个:
{
"Action": [
"ec2:StopInstances",
"ec2:TerminateInstances"
],
"Effect": "Allow",
"Resource": "*",
"Condition": {
"StringEquals": {
"ec2:ResourceTag/Name": "tag1",
"ec2:ResourceTag/Name": "tag2",
"ec2:ResourceTag/Name": "tag3"
}
}
},
但是表格无效,只能ec2:ResourceTag/Name
写一个字符串。如何停止和终止具有不同标签的实例Name
?