awsc.base_control.tag_finder_generator
- awsc.base_control.tag_finder_generator(tagname, default='', taglist_key='Tags')
Generates a predicate function which can locate a tag in a raw AWS object. Useful if certain important fields are actually just tags. I’m looking at you, EC2 instance names.
- Parameters:
- tagnamestr
The name of the tag to find.
- defaultstr, default=””
The default value of the tag, if not found.
- taglist_keystr, default=”Tags”
The name for the list of tags in the object. Believe it or not, this is less than consistent among the AWS services.
- Returns:
- callable(dict-like) -> str
A function which finds a tag in a dict-like object when called.