如何将描述添加到AWS CLI的安全组中
我正在尝试将IP地址添加到CLI的安全组中,但我可以这样做,但是我正在尝试添加描述。有人可以支持我知道如何添加描述。
我在下面尝试:
aws ec2 authorize-security-group-ingress --group-id sg-123456778 --protocol tcp --port 22 --cidr `echo "$(curl -s https://checkip.amazonaws.com)/32"` --description "testing"
似乎正常工作的确切命令如下,但是如何通过同一命令传递IP,
下面的命令正常工作,但是有什么方法可以使用卷曲通过CIDR?我尝试的方式与所讨论的方式相同,但不陷入困境
aws ec2 authorize-security-group-ingress \
--group-id sg-12345678 \
--ip-permissions IpProtocol=tcp,FromPort=22,ToPort=22,IpRanges='[{CidrIp=1.1.1.1/32,Description="Testing"}]' --profile xyz
I am trying to add the IP address to a security group from CLI and I am able to do so, however I am trying to add the description . Can someone support me to know how to add description.
I am trying below way:
aws ec2 authorize-security-group-ingress --group-id sg-123456778 --protocol tcp --port 22 --cidr `echo "$(curl -s https://checkip.amazonaws.com)/32"` --description "testing"
seems the exact command for that to work is as below, but how to pass IP in the same command
The below command is working fine, but is there a way I can pass my cidr using curl? I tried same way as in question but not going trough
aws ec2 authorize-security-group-ingress \
--group-id sg-12345678 \
--ip-permissions IpProtocol=tcp,FromPort=22,ToPort=22,IpRanges='[{CidrIp=1.1.1.1/32,Description="Testing"}]' --profile xyz
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)