def display_ec2_tags(self, outputformat='json',
filter=None, aggr_and=False):
'''
Display Tags for all EC2 Resources
'''
ec2_client = aws_service.AwsService('ec2')
tagsobj = ec2_client.service.list_tags()
if filter is not None:
tagsobj = orcautils.filter_dict(tagsobj,
filter,
aggr_and=aggr_and)
if outputformat == "json":
pprinter = pprint.PrettyPrinter()
pprinter.pprint(tagsobj)
else:
self.display_ec2_tags_table(tagsobj)
评论列表
文章目录