def searchObject()

in resource-selector-lambda/handler.py [0:0]


    def searchObject(self, tags, cfg):
        findObj = False
        if 'Tags' in cfg:
            findTag = []
            for t in cfg['Tags']:
                if self.searchTag(tags, t['Key'], t['Value']):
                    findTag.append('y')
            # depend on configuration check if either any tag or all tags matching provided criteria
            findObj = (True if (self.match == 'any' and len(findTag) > 0) or (len(findTag) == len(cfg['Tags'])) else False)
        else:
            findObj = True

        return findObj