Adding VPN Gateway filters (#3155)
* Adding attchment.vpc-id, attachment.state, type, and vpn-gateway-id filters for VPN Gateways. fixes #3154 * Run formatting on tests Co-authored-by: Alan Baldwin <alan.baldwin.jr@gmail.com>
This commit is contained in:
parent
a507314d45
commit
b09c8034e6
2 changed files with 142 additions and 1 deletions
|
|
@ -4973,6 +4973,14 @@ class VpnGateway(TaggedEC2Resource):
|
|||
super(VpnGateway, self).__init__()
|
||||
|
||||
def get_filter_value(self, filter_name):
|
||||
if filter_name == "attachment.vpc-id":
|
||||
return self.attachments.keys()
|
||||
elif filter_name == "attachment.state":
|
||||
return [attachment.state for attachment in self.attachments.values()]
|
||||
elif filter_name == "vpn-gateway-id":
|
||||
return self.id
|
||||
elif filter_name == "type":
|
||||
return self.type
|
||||
return super(VpnGateway, self).get_filter_value(
|
||||
filter_name, "DescribeVpnGateways"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue