Backup Usage Summaries of VaultRecoveryServicesBackup gives End of Paging error
See original GitHub issue- Package Name: azure-mgmt-recoveryservicesbackup:
- Package Version: 0.8.0:
- Operating System: windows10:
- Python Version: 3.8:
Describe the bug
I have created a RecoveryServicesBackupClient. I am then using iterator_object = backup_usage_summaries.list(resource_group_name, vault_name) method to create an iterator object. On Using next(iterator_object) to iterate through it, it gives me an End of Paging error.
I also tried iterating using a for loop and tried printing the items. The execution stops after execution of for loop without any error.
Any azure developer can help resolve this bug? To Reproduce Steps to reproduce the behavior:
credentials = ServicePrincipalCredentials(tenant, client_id, client_secret)
subscription_client = SubscriptionClient(credentials=credentials)
subscriptions_list = subscription_client.subscriptions.list()
iterable = next(subscriptions_list)
subscription_id = iterable.subscription_id
recovery_backup_client = RecoveryServicesBackupClient(credentials=credentials, subscription_id=subscription_id)
iteraton_1 = recovery_backup_client.backup_usage_summaries.list(resource_group_name, vault_name)
next(iteration_1)
End of Paging
Expected behavior next(iteration_1) should give an iterable and can be printed
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Paging file and disk errors on Windows 10 Enterprise for ...
I have 2 different Azure WVD servers. Currently, every time a user logs in, they receive a warning "Windows created a temporary paging...
Read more >Managing Usage Processing Errors - Salesforce Help
If Salesforce Billing encounters an error when trying to associate usage with a usage summary, it sets the usage's status to Error or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hey @shreyasmoolya09! The backup_usage_summaries API requires a filter string to be passed for it to return the correct output. If the filter string is not provided it returns an empty list. In your case, it is returning an empty list, therefore on doing next(iteration_1) it gives StopIteration: End of paging error which means that it has already reached the end of the iterator object as the list was empty.
To solve this issue please try passing the appropriate filter string also. For example -
Use recovery_backup_client.backup_usage_summaries.list(resource_group_name, vault_name, “type eq ‘BackupProtectedItemCountSummary’”) to get Protected Item Count Summary for that vault.
Use recovery_backup_client.backup_usage_summaries.list(resource_group_name, vault_name, “type eq ‘BackupProtectionContainerCountSummary’”) to get Protection Container Count Summary for that vault.
Thanks.
@pratimaupadhyay02: Can you please take a look?