如何设置安全组的“名称”(AWS EC2)

huangapple go评论46阅读模式
英文:

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 &lt;sg_id&gt; --tags Key=Name,Value=Test-Sg

huangapple
  • 本文由 发表于 2020年1月3日 18:17:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/59576754.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定