Listing Route Tables in Azure with Python SDK
Hi,
I am trying to get a basic understanding of how to interact with Azure using the Python SDK. I am very new to this, although I understand how to interact with Azure using Powershell.
The syntax for the Python SDK is unfamiliar at this point. I managed to use the online documentation to figure out how to login to Azure.
I would like to pull out all the route table names in a subscription and print them out with Python
I have the following section of code:
network_client = NetworkManagementClient(credentials, subscription_id, base_url=AZURE_US_GOV_CLOUD.endpoints.resource_manager) route_table_list = network_client.route_tables.list_all(custom_headers=None, raw=False)
Can someone provide a snippet of Python code that will iterate over the RouteTablePaged class and print out the route table names?
Thanks.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @karenhammons
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @karenhammons
Thank you for the question. Looking into it and will respond soon.
@lusbyr, thanks for your patience. @jispar, can you help with this?
Hi,@lusbyr. you can print table name like this:
for route_table in route_table_list:
print(route_table.name)
The reoute_table_list you got is an iterator.