Closed xqi-aviatrix closed 1 year ago
Thank you for your feedback. This has been routed to the support team for assistance.
@xqi-aviatrix Apologies for the late reply. Thanks for reaching out to us and reporting this issue. Most ARM APIs deal with Creating/Updating/Getting/Deleting an azure resource, so a get response is usually in the form of a “value” array of objects that represent the resource(s) information. Example:
In the Cost Management query case, we do not do the above operations on a resource, we simply fetch the aggregated cost of a resource based o what the customer specifies (and I am sure, as customers of the API, you already know that).
Hence, our response in unconventional:
So due to the above we cannot add the x-ms-pageable field in the REST API specs swagger. And since this is not available in the swagger, the SDK cannot provide this functionality.
So in short, the ONLY workaround here is to invoke the Cost management query API, Get the NextLink marker and enumerate through it until the provided nextLink is null. Samples are here and here. Hope this helps.
Hi @xqi-aviatrix. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
@xqi-aviatrix I wanted to do quick follow-up to check if you had a chance to look at my above comment. Please let us know if you had any updates on this. Awaiting your reply.
@xqi-aviatrix I hope you had a chance to look at my above comment. We will now proceed with closure of this GitHub issue. If you need any further assistance on this issue in future, please feel free to reopen this thread. We would be happy to help.
https://github.com/Azure/azure-sdk-for-go/blob/f252cd9f178d89af5a3b0f595e72c8b1479904c7/sdk/resourcemanager/costmanagement/armcostmanagement/query_client.go#L60
In case, I query the vms' costs within a subscription with the following query and there were thousands of vms in the subscription, without pagination will there be potential problem?