首页 > 解决方案 > 我可以在使用 aws ec2 run-instances 创建实例时标记接口吗?

问题描述

当我使用 AWS-CLI 创建具有多个接口的实例时,我想标记一个接口。

例如

aws ec2 run-instances --image-id {$byolimageid} --count 1 --instance-type c5.18xlarge --key-name thomaskeypair --network-interfaces '[ { "DeviceIndex": 0, "Groups": ["sg-06ec2ed1714b4b548"], "SubnetId": "subnet-0c36ed5c120    21bbb3", "DeleteOnTermination": true}, {"DeviceIndex": 1, "Groups": ["sg-06ec2ed1714b4b548"], "SubnetId": "subnet-011f43adb412986e0", "DeleteOnTermination": true}]

在这种情况下,我想用 key,value 标记带有 deviceindex 0 的接口。

我可以在 aws ec2 run-instances 命令中执行此操作吗?

找不到有关文档的信息。

标签: amazon-web-servicescommand-line-interfaceaws-cli

解决方案


推荐阅读