def get_thing_type()

in lambda-bulk-importer/main.py [0:0]


def get_thing_type(typeName):
    try:
        response = iot_client.describeThingType(thingTypeName=thingTypeName)
        return response.get('thingTypeArn')
    except botocore.exceptions.ClientError as error:
        if error.response['Error']['Code'] == 'ResourceNotFoundException':
            print("ERROR: You need to configure the Thing Type [" + thingTypeName + "] in your target region first.")
        if error.response['Error']['Code'] == 'UnauthorizedException':
            print("ERROR: There is a deployment problem with the attached Role. Unable to reach IoT Core object.")
        return None
    except:
        print("ERROR: Unexpected fault")
        return None