def get_tags(self, arn): group_name = arn.split(':')[-1].split('/')[-1] response = self.client.describe_tags(Filters=[{ 'Name': 'auto-scaling-group', 'Values': [group_name] }]) tags_dict = tags_to_dict(response['Tags']) return tags_dict
def get_tags(self, arn): bucket_name = arn.split(':')[5] try: response = self.client.get_bucket_tagging(Bucket=bucket_name) tags_dict = tags_to_dict(response['TagSet']) except Exception: tags_dict = {} return tags_dict
def get_tags(self, arn): resource_id = arn.split(':')[-1].split('/')[-1] response = self.client.describe_tags(Filters=[{ 'Name': 'resource-id', 'Values': [resource_id] }, { 'Name': 'resource-type', 'Values': ['instance'] }], ) tags_dict = tags_to_dict(response['Tags']) return tags_dict
def get_tags(self, arn): response = self.client.list_tags_of_resource(ResourceArn=arn) tags_dict = tags_to_dict(response['Tags']) return tags_dict
def get_tags(self, arn): filesystem_id = arn.split(':')[5].split('/')[1] response = self.client.describe_tags(FileSystemId=filesystem_id) tags_dict = tags_to_dict(response['Tags']) return tags_dict
def get_tags(self, arn): response = self.client.describe_tags(ResourceName=arn) tags_list = list(i['Tag'] for i in response['TaggedResources']) tags_dict = tags_to_dict(tags_list) return tags_dict
def get_tags(self, arn): response = self.client.list_tags_for_resource(ResourceName=arn) tags_dict = tags_to_dict(response['TagList']) return tags_dict
def get_tags(self, arn): response = self.client.describe_tags( ResourceArns=[arn], ) tags_dict = tags_to_dict(response['TagDescriptions'][0]['Tags']) return tags_dict
def get_tags(self, arn): loadbalancer_name = arn.split(':')[-1].split('/')[-1] response = self.client.describe_tags( LoadBalancerNames=[loadbalancer_name]) tags_dict = tags_to_dict(response['TagDescriptions'][0]['Tags']) return tags_dict
def get_tags(self, arn): response = self.client.list_tags_for_certificate(CertificateArn=arn) tags_dict = tags_to_dict(response['Tags']) return tags_dict
def get_tags(self, arn): response = self.client.list_tags(ARN=arn) tags_dict = tags_to_dict(response['TagList']) return tags_dict
def _parse_tags(self, elem, data): tags_list = data.get('tags', []) return tags_to_dict(tags_list)
def get_tags(self, arn): stack_name = arn.split(':')[5].split('/')[1] response = self.client.describe_stacks(StackName=stack_name) tags_dict = tags_to_dict(response['Stacks'][0]['Tags']) return tags_dict