def main():
<EOL>if len(sys.argv) < <NUM_LIT:3>:<EOL><INDENT>usage()<EOL><DEDENT>rgname = sys.argv[<NUM_LIT:1>]<EOL>vmss = sys.argv[<NUM_LIT:2>]<EOL>try:<EOL><INDENT>with open('<STR_LIT>') as config_file:<EOL><INDENT>config_data = json.load(config_file)<EOL><DEDENT><DEDENT>except FileNotFoundError:<EOL><INDENT>sys.exit("<STR_LIT>")<EOL><DEDENT>tenant_id = config_data['<STR_LIT>']<EOL>app_id = config_data['<STR_LIT>']<EOL>app_secret = config_data['<STR_LIT>']<EOL>sub_id = config_data['<STR_LIT>']<EOL>access_token = azurerm.get_access_token(tenant_id, app_id, app_secret)<EOL>provider = '<STR_LIT>'<EOL>resource_type = '<STR_LIT>'<EOL>metric_definitions = azurerm.list_metric_defs_for_resource(access_token, sub_id, rgname,<EOL>provider, resource_type, vmss)<EOL>print(json.dumps(metric_definitions, sort_keys=False, indent=<NUM_LIT:2>, separators=('<STR_LIT:U+002C>', '<STR_LIT>')))<EOL>metrics = azurerm.get_metrics_for_resource(access_token, sub_id, rgname,<EOL>provider, resource_type, vmss)<EOL>print(json.dumps(metrics, sort_keys=False, indent=<NUM_LIT:2>, separators=('<STR_LIT:U+002C>', '<STR_LIT>')))<EOL>
Main routine.