Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supported Azure APIs #331

Open
ksysiekj opened this issue Mar 11, 2024 · 0 comments
Open

Supported Azure APIs #331

ksysiekj opened this issue Mar 11, 2024 · 0 comments

Comments

@ksysiekj
Copy link

hello,
What MS Azure APIs are supported by the converter? In the project currently I'm working on we use the managment.azure.com Api (https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?view=rest-cost-management-2023-11-01&tabs=HTTP) to generate usage details for both EA and CSP (cannot use azure.portal > Cost Management > Usage + Charges > Download option) however when I try to convert the generated usage report I'm facing issues.

  1. EA

a) EA
request to generate an usage report:

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingScope}/providers/Microsoft.CostManagement/generateCostDetailsReport?api-version=2023-08-01
{
    BillingPeriod=billingPeriod  // eg 202403 for march 2024
}

for this report converter works as expected

b) MCA
request to generate an usage report:

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{bllingScope}/providers/Microsoft.CostManagement/generateCostDetailsReport?api-version=2023-08-01
{
    TimePeriod={
        Start=startDate,
        End=endDate
    }
}

report generated using this API throws an error when using the converter:
ValueError: Column(s) 'AvailabilityZone, BillingAccountId, BillingAccountName, BillingCurrencyCode, BillingPeriodEndDate, BillingPeriodStartDate, ChargeType, ConsumedService, CostInBillingCurrency, Date,
Frequency, PricingModel, PublisherName, Quantity, ResourceLocation, ResourceName, SubscriptionName' not found in data

c) PayG
request to generate an usage report:
GET https://management.azure.com/subscriptions/{billingScope}/providers/Microsoft.Consumption/usageDetails/download?api-version=2019-10-01&$filter=properties/usageStart ge '{startDate}' AND properties/usageEnd le '{endDate}'

report generated using this API throws an error when using the converter:
ValueError: Column(s) 'BillingCurrencyCode, CostInBillingCurrency, PricingModel, ProductName, benefitId, benefitName' not found in data

  1. CSP
    request to generate an usage report:
POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerId}/providers/Microsoft.CostManagement/generateCostDetailsReport?api-version=2023-11-01
{
    TimePeriod={
        Start=startDate,
        End=endDate
    }
}

report generated using this API throws an error when using the converter:
ValueError: Column(s) 'AvailabilityZone, BillingAccountId, BillingAccountName, BillingCurrencyCode, BillingPeriodEndDate, BillingPeriodStartDate, ChargeType, ConsumedService, CostInBillingCurrency, Date,
Frequency, PricingModel, PublisherName, Quantity, ResourceLocation, ResourceName, SubscriptionName' not found in data

Can you please specify what azure APIs are supported by the converter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant