英文:
How to set "Name" of security group (AWS EC2)
问题
通过控制台创建一个EC2安全组允许你设置一个“组名称”,并自动提供一个“组ID”。
但是,“名称”始终为空,除非安全组是由弹性Beanstalk或其他资源自动生成的。
是否有办法在控制台中设置此名称,否则在CLI中如何完成?
英文:
Creating an EC2 security group through the console allows you to set a "group name" and it automatically provides a "group id".
However the "name" is always blank, unless the security group was generated automatically by elastic beanstalk or another resource.
Is there any way to set this name in the console, otherwise how is it done in the CLI?
答案1
得分: 4
使用AWS CLI:
aws ec2 create-tags --resources <sg_id> --tags Key=Name,Value=Test-Sg
英文:
You can either edit the name directly in the console or attach a Name
tag to your security group.
Using AWS CLI:
aws ec2 create-tags --resources <sg_id> --tags Key=Name,Value=Test-Sg
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论