func GetIotThing()

in aws/iot.go [76:92]


func GetIotThing(client IotClient, iotThingName *string) *iot.DescribeThingOutput {
	ret, err := client.DescribeThing(context.TODO(), &iot.DescribeThingInput{
		ThingName: iotThingName,
	})

	if err != nil {
		var rne *types.ResourceNotFoundException

		if errors.As(err, &rne) {
			log.Println("Thing doesn't exist")
			return nil
		}
		log.Fatalf("Failed to describe thing %s. Encountered error %s\n", *iotThingName, err)
	}

	return ret
}