2

I have created the below code but when I execute it it gives me an error as Iterator object. If I apply for loop for data it doesn't give me any output.Any advice as how to pull data out of that object, I also explored the azure provided virtual network peering class but no luck.

from azure.identity import AzureCliCredential
from azure.mgmt.subscription import SubscriptionClient
from azure.mgmt.network import NetworkManagementClient

credential = AzureCliCredential()
subscription_client = SubscriptionClient(credential)

subs_id = 'xxxxxxxx'

network_client = NetworkManagementClient(credential, subs_id)
data = network_client.virtual_network_peerings.list('resourcegroup','virtualnetwork')
print(data)

Output: <iterator object azure.core.paging.ItemPaged at 0x210a5fe1570>

Ghost rider
  • 43
  • 1
  • 9
  • 1
    Does this answer your question? [How to iterate over azure.core.paging.ItemPaged?](https://stackoverflow.com/questions/66766541/how-to-iterate-over-azure-core-paging-itempaged) – Ecstasy Aug 05 '22 at 09:20
  • 1
    [How should Azure ItemPaged iterator work?](https://stackoverflow.com/questions/65938321/how-should-azure-itempaged-iterator-work) – Ecstasy Aug 05 '22 at 09:22

0 Answers0