我试图通过aws ec2 ec2 describe-vpc-peering-connections
获得"活动"对等连接列表。以下是我尝试过的:
aws ec2 describe-vpc-peering-connections --region=eu-west-3
--filter 'Name=accepter-vpc-info.vpc-id,Values=vpc-xxxxxx Name=status-code,Values=active'
--query 'VpcPeeringConnections[*].VpcPeeringConnectionId' --output text
但是我得到错误:
Error parsing parameter '--filters': Second instance of key "Values" encountered for input:
Name=accepter-vpc-info.vpc-id,Values=vpc-xxxxxxxx Name=status-code,Values=active
^
This is often because there is a preceeding "," instead of a space.
我想我需要,
,对吗?还有什么地方我说错了吗?
aws ec2 describe-vpc-peering-connections
--region=eu-west-3
--filter Name=accepter-vpc-info.vpc-id,Values=vpc-xxxxxx
--filter Name=status-code,Values=active
--query 'VpcPeeringConnections[*].VpcPeeringConnectionId'
--output text
或
aws ec2 describe-vpc-peering-connections
--region=eu-west-3
--filter 'Name=accepter-vpc-info.vpc-id,Values=vpc-xxxxxx'
'Name=status-code,Values=active'
--query 'VpcPeeringConnections[*].VpcPeeringConnectionId'
--output text
结合服务器端和客户端过滤