joa*_*oar 5 tags amazon-web-services aws-cli
尝试使用 aws cli 创建标记项目。
aws ec2 create-security-group --group-name $group_name --description $my_description
Run Code Online (Sandbox Code Playgroud)
我无法解析文档
--tag-specifications (list)
Run Code Online (Sandbox Code Playgroud)
我尝试过
--tag-specifications KEY=Name,Value=$something
and --tags Key=Name,Value=$something
and --tags [Key=Name,Value=$something]
and --tags {[Key=Name,Value=$something]}
Run Code Online (Sandbox Code Playgroud)
我们需要传递两个属性
资源类型:在本例中security-group
标签: key-value 对象数组
aws ec2 create-security-group --group-name 'test' --description 'test desc' --tag-specifications 'ResourceType=security-group,Tags=[{Key=purpose,Value=production},{Key=cost-center,Value=cc123}]'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
972 次 |
| 最近记录: |