def filter_ip_permission__group_name(self, values): for value in values: for rule in self.ingress_rules: for group in rule.source_groups: if aws_api_matches(value, group.get("GroupName", None)): return True return False
def filter_ip_permission__cidr(self, values): for value in values: for rule in self.ingress_rules: for cidr in rule.ip_ranges: if aws_api_matches(value, cidr.get("CidrIp", "NONE")): return True return False
def filter_egress__ip_permission__group_id(self, values): for value in values: for rule in self.egress_rules: for sg in rule.source_groups: if aws_api_matches(value, sg.get("GroupId", None)): return True return False
def filter_egress__ip_permission__from_port(self, values): for value in values: for rule in self.egress_rules: if rule.ip_protocol != -1 and aws_api_matches( value, str(rule.from_port)): return True return False
def filter_vpc_id(self, values): for value in values: if aws_api_matches(value, self.vpc_id): return True return False
def filter_ip_permission__user_id(self, values): for value in values: for rule in self.ingress_rules: if aws_api_matches(value, rule.owner_id): return True return False
def filter_ip_permission__to_port(self, values): for value in values: for rule in self.ingress_rules: if aws_api_matches(value, rule.to_port): return True return False
def filter_ip_permission__protocol(self, values): for value in values: for rule in self.ingress_rules: if aws_api_matches(value, rule.protocol): return True return False
def filter_group_name(self, values): for value in values: if aws_api_matches(value, self.group_name): return True return False
def filter_description(self, values): for value in values: if aws_api_matches(value, self.description): return True return False