Open kajetanm-dnv opened 2 months ago
We also need access to the API.
I asked this as well to MSFT Support, here's the response we got:
I understand that you are encountering an error when attempting to query the Azure AKS Cost API, specifically the following message:
{'error':{'code':'401','message':'Request blocked. Your request to this resource has been denied. Please access this resource from the Cost Analysis blade on the Azure Portal.'}}
This issue arises because direct API access to cost data for AKS is currently restricted, and Azure recommends viewing cost data via the Cost Analysis blade in the Azure Portal. Unfortunately, querying cost data at the namespace level via API is not natively supported at this time, which I understand is important for your tracking and reporting needs.
As per if there's an ETA for release:
At this time, there is no confirmed ETA from Microsoft regarding when native support for querying AKS costs at the namespace level via API will be available. However, the Azure Product Group is actively working on improving cost management capabilities for AKS, including more granular reporting.
Today it is possible to obtain data from the AKS Cost Analysis add-on only through the Azure Portal or downloaded CSV files.
Using az CLI credentials to create an API call throws an error: {"error":{"code":"401","message":"Request blocked. Your request to this resource has been denied. Please access this resource from the Cost Analysis blade on the Azure Portal."}}
To automate add-on usage and obtain data from tables, it should be possible to provide users with access to use API.