Exemple #1
0
func getTags(svc ec2.EC2, resourceIds []*string) ec2.DescribeTagsOutput {
	resp, err := svc.DescribeTags(&ec2.DescribeTagsInput{
		Filters: []*ec2.Filter{
			{ // Required
				Name:   aws.String("resource-id"),
				Values: resourceIds,
			},
		},
	})

	kingpin.FatalIfError(err, "Could not retrieve tags for EC2 resources %s", resourceIds)

	return *resp
}