我正在尝试理解 aws ec2 cli 调用。我希望在自定义标签上描述所有 VPC 然后文件管理器(vpcname=myvpc,但是在尝试了多种组合之后,我不断收到关于格式和使用 --filters 的冲突错误。使用作为参考 [ http://docs.aws .amazon.com/cli/latest/reference/ec2/describe-vpcs.html][1]
aws --profile myProfile --region eu-west-1 ec2 describe-vpcs --filters vpcname,myvpc
但是这会返回
Error parsing parameter '--filters': should be: Key value pairs, where values are separated by commas, and multiple pairs are separated by spaces.
--filters Name=string1,Values=string1,string2 Name=string1,Values=string1,string2
如此努力
aws --profile myProfile --region eu-west-1 ec2 describe-vpcs --filters Name=vpcname,Values=myvpc
它返回
A client error (InvalidParameterValue) occurred when calling the DescribeVpcs operation: The filter 'vpcname' is invalid
所以尝试其他一些组合
aws --profile myProfile --region eu-west-1 ec2 describe-vpcs --filters tag :Name=vpcname,Values=myvpc
Error parsing parameter '--filters': should be: Key value pairs, where values are separated by commas, and multiple pairs are separated by spaces.
--filters Name=string1,Values=string1,string2 Name=string1,Values=string1,string2
关于如何格式化此请求的任何建议?