optscale
optscale copied to clipboard
Azure Enterprise Agreement
Optscale can't read data billing from subscription Azure Enterprise Agreement. I'm suspicious that the Azure Enterprise Agreement subscription api is another API.
Hi! Azure EA subscriptions don't provide expenses data in usual way, so you need to connect such accounts with import_scheme: "raw_usage" parameter.
You can refer to https://github.com/hystax/optscale/blob/be70d943019d88a5c4ae778765a74ef66e6dca7d/diworker/diworker/importers/azure.py#LL139C2-L139C2 for the details.
But how do I load this information since the console does not appear to change the schema option. It would be through https://github.com/hystax/optscale/blob/integration/optscale-deploy/overlay/user_template.yml
It should be set when calling cloud account creation or patch API. Further version which we plan to publish includes autodetection of necessary import scheme, but for now it is a manual change.
by the opensource version it is not possible to make this schema configuration. Do you have any documentation of doing this creation via API?
Any documentation about how use the API?
You can update your existing cloud account configuration with the correct import scheme by calling
PATCH <optscale_ip>/restapi/v2/cloud_accounts/<cloud_account_id>
with body:
{
"config":{
"client_id":"<client (app) id>",
"tenant":"<tenant>",
"subscription_id":"<subscription_id>",
"secret":"<secret>",
"expense_import_scheme":"raw_usage"
}
}
or disconnect the old cloud account and create the new one:
POST <optscale_ip>/restapi/v2/organizations/<organization_id>/cloud_accounts
{
"name": "<your cloud name>",
"type": "azure_cnr",
"config": {
"client_id":"<client (app) id>",
"tenant":"<tenant>",
"subscription_id":"<subscription_id>",
"secret":"<secret>",
"expense_import_scheme":"raw_usage"
}
}