[英]How to get the instances in the Amazon EC2 autoscaling group with specific tags using AWS CLI?
[英]How to create AMIfrom existing ec2 with tags from AWS Cli?
我正在嘗試從我現有的帶有標簽的 ec2 實例創建一個新的 Ami。 我嘗試了以下命令,但它不起作用。
aws ec2 create-image --instance-id i-xxxxxxxxxxxxx --name "TEST_AMI" --no-reboot --tag-specifications 'ResourceType=instance,Tags=[{Key=name,Value=TEST_AMI}
及其返回以下錯誤。
用法:aws [options] [...] [parameters] 要查看幫助文本,您可以運行:aws help aws help aws help 未知選項:--tag-specifications, ResourceType=instance,Tags=[{Key=name,值=TEST_AMI}]
我只需要在一個命令中完成這兩項任務。
ResourceType
的值無效。 從創建圖像文檔:
在創建時應用於 AMI 和快照的標簽。 您可以標記 AMI、快照或兩者。
image
。snapshot
。 相同的標簽應用於創建的所有快照。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.