def usage()

in clone_mediaconvert_resources/clone_mediaconvert_resources.py [0:0]


def usage(app_name):
    """Function that prints out a detailed help page for the script"""
    global version
    print('\npython {0} -r REGION -a OPTION -c REGION\n'.format(app_name))
    print('Version:', version)
    print("")
    print("Parameters")
    print("-i, --initialize:   Run to create region endpoint configuration file.")
    print("                    Run this option with no other parameters")
    print("-r, --region:       Region you would like to clone from.")
    print("-a, --action:       Individual actions allowed to clone between regions.")
    print("                    Valid options are:")
    print("                    PRESETS - Will clone all non-system job presets")
    print("                    QUEUES - Will clone all On-Demand Queues")
    print("                    TEMPLATES - Will clone all non-system job templates")
    print("                    ALL - Will clone all presets, templates, and on-demand queues")
    print("-c, --clone:        Region you would like to clone to")
    print("-f, --file:         Saves preset, templates, and queue parameters to individual files. ")
    print("                    This will not clone to another region. ")
    print("-h, --help:         Print this help and exit.")
    print("")
    print('Important Notes:')
    print("")
    print("You must run -i option first in order to create your endpoint configuration file")
    print("You can run -i again to add more regions as needed")
    print("")
    print("If you are using the individual options to clone resources (ie: not the ALL option), the order ")
    print("of operations should be Presets, Queues and then Templates. This will insure that all dependencies are ")
    print("in place before cloning job templates. ")
    print("")
    print('Examples:')
    print("")
    print("Creates MediaConvert endpoints configuration file")
    print("python {0} -i".format(app_name))
    print("")
    print("Using a clone from region of us-east-1, action of All, and clone to region of us-west-2")
    print("python {0} -r us-east-1 -a ALL -c us-west-2".format(app_name))
    print("")
    print("Using a clone from region of us-east-1, action of Presets, and saving to file as eu-west-1 resources")
    print("python {0} -r us-east-1 -c eu-west-1 -a PRESET -f".format(app_name))