Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

postman - Azure Resources "Usage Detail" callout Error: The resource you're looking for has been removed

I am using Postman to make a callout to the Azure Usage Details endpoint (API docs). This will return billing data for each Resource we are using in Azure for the last week. A GET request to the below endpoint(which includes query params) works successfully:

https://management.azure.com/subscriptions/{{subscriptionId}}/providers/Microsoft.Consumption/usageDetails?api-version=2019-10-01&$filter=properties/usageStart eq '2021-01-20' and properties/usageEnd eq '2021-01-28' and properties/instanceName eq 'ResourceName_disk1_3f70c7f96ed347dbb760091f89asdf' or properties/instanceName eq 'ResourceName_disk2_398bad3c76fd439cb5354dc118basdf' or properties/instanceName eq 'ResourceName-test-VM-01_disk1_875e188ee0c346e689004ebdasdfff'

But when I make a request to a larger number of resources, I get the error "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.".

One important note: The endpoint of my request (which includes MANY query params) is about 6800 characters long, is that a possible issue?

Most likely, one of the resources I'm including in one of the properties/instanceName eq '...' params been deleted/renamed, but that shouldn't break the entire callout. The strange thing is when I changed the instanceName value for one of the parameters in the above GET request, it did not error out and returned the response successfully. So that makes me think even if the callout includes an invalid instanceName, it should still successfully return the rest of the callout.

Does anyone know what the issue might be? I know Azure performed a bug fix on their end around end of November, 2020 so that could have to do with it too.

question from:https://stackoverflow.com/questions/65929531/azure-resources-usage-detail-callout-error-the-resource-youre-looking-for-ha

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...