def main():
<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>subscription_id = config_data['<STR_LIT>']<EOL>access_token = azurerm.get_access_token(tenant_id, app_id, app_secret)<EOL>auto_settings = azurerm.list_autoscale_settings(access_token, subscription_id)<EOL>print(auto_settings)<EOL>for auto_setting in auto_settings['<STR_LIT:value>']:<EOL><INDENT>print(auto_setting['<STR_LIT:name>'] + '<STR_LIT:U+002CU+0020>' + auto_setting['<STR_LIT:location>'])<EOL>print(auto_setting['<STR_LIT>']['<STR_LIT>'])<EOL><DEDENT>resource_groups = azurerm.list_resource_groups(access_token, subscription_id)<EOL>for rgs in resource_groups["<STR_LIT:value>"]:<EOL><INDENT>rgname = rgs["<STR_LIT:name>"]<EOL>insights_comp = azurerm.list_insights_components(access_token, subscription_id, rgname)<EOL>if len(insights_comp) > <NUM_LIT:0>:<EOL><INDENT>print(insights_comp)<EOL><DEDENT><DEDENT>
Main routine.