def startJob(bucketName, objectName, itemId, snsTopic, snsRole, apiName):
    print('Starting job with itemId: {}, bucketName: {}, objectName: {}'.format(itemId, bucketName, objectName))
    response = None
    client = AwsHelper().getClient('rekognition')
    if (apiName == 'labels'):
        response = client.start_label_detection(Video={'S3Object': {'Bucket': bucketName, 'Name': objectName}}, ClientRequestToken=itemId, NotificationChannel={'SNSTopicArn': snsTopic, 'RoleArn': snsRole}, JobTag=itemId)
    elif (apiName == 'text'):
        response = client.start_text_detection(Video={'S3Object': {'Bucket': bucketName, 'Name': objectName}}, ClientRequestToken=itemId, NotificationChannel={'SNSTopicArn': snsTopic, 'RoleArn': snsRole}, JobTag=itemId)
    elif (apiName == 'faces'):
        response = client.start_face_detection(Video={'S3Object': {'Bucket': bucketName, 'Name': objectName}}, ClientRequestToken=itemId, NotificationChannel={'SNSTopicArn': snsTopic, 'RoleArn': snsRole}, JobTag=itemId)
    elif (apiName == 'moderation'):
        response = client.start_content_moderation(Video={'S3Object': {'Bucket': bucketName, 'Name': objectName}}, ClientRequestToken=itemId, NotificationChannel={'SNSTopicArn': snsTopic, 'RoleArn': snsRole}, JobTag=itemId)
    elif (apiName == 'celebrities'):
        response = client.start_celebrity_recognition(Video={'S3Object': {'Bucket': bucketName, 'Name': objectName}}, ClientRequestToken=itemId, NotificationChannel={'SNSTopicArn': snsTopic, 'RoleArn': snsRole}, JobTag=itemId)
    else:
        response = client.start_label_detection(Video={'S3Object': {'Bucket': bucketName, 'Name': objectName}}, ClientRequestToken=itemId, NotificationChannel={'SNSTopicArn': snsTopic, 'RoleArn': snsRole}, JobTag=itemId)
    return response['JobId']
def startJob(bucketName, objectName, itemId, snsTopic, snsRole, apiName):
    print('Starting job with itemId: {}, bucketName: {}, objectName: {}'.format(itemId, bucketName, objectName))
    response = None
    client = AwsHelper().getClient('rekognition')
    if (apiName == 'labels'):
        response = client.start_label_detection(Video={'S3Object': {'Bucket': bucketName, 'Name': objectName}}, ClientRequestToken=itemId, NotificationChannel={'SNSTopicArn': snsTopic, 'RoleArn': snsRole}, JobTag=itemId)
    elif (apiName == 'text'):
        response = client.start_text_detection(Video={'S3Object': {'Bucket': bucketName, 'Name': objectName}}, ClientRequestToken=itemId, NotificationChannel={'SNSTopicArn': snsTopic, 'RoleArn': snsRole}, JobTag=itemId)
    elif (apiName == 'faces'):
        response = client.start_face_detection(Video={'S3Object': {'Bucket': bucketName, 'Name': objectName}}, ClientRequestToken=itemId, NotificationChannel={'SNSTopicArn': snsTopic, 'RoleArn': snsRole}, JobTag=itemId)
    elif (apiName == 'moderation'):
        response = client.start_content_moderation(Video={'S3Object': {'Bucket': bucketName, 'Name': objectName}}, ClientRequestToken=itemId, NotificationChannel={'SNSTopicArn': snsTopic, 'RoleArn': snsRole}, JobTag=itemId)
    elif (apiName == 'celebrities'):
        response = client.start_celebrity_recognition(Video={'S3Object': {'Bucket': bucketName, 'Name': objectName}}, ClientRequestToken=itemId, NotificationChannel={'SNSTopicArn': snsTopic, 'RoleArn': snsRole}, JobTag=itemId)
    else:
        response = client.start_label_detection(Video={'S3Object': {'Bucket': bucketName, 'Name': objectName}}, ClientRequestToken=itemId, NotificationChannel={'SNSTopicArn': snsTopic, 'RoleArn': snsRole}, JobTag=itemId)
    return response['JobId']