Closed rahulnandan closed 3 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @amberbhargava, @shilpigautam, @ramaganesan-rg, @anand-rengasamy.
Thanks for reporting the issue. Involve Billing service team to look into it.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ms-premp.
I have the same issue on my tenant, My tenant is created under the Microsoft Online Services Program.
The error message above states that the subscription is not associated with an Enterprise Agreement offering.
Body:
{
"error": {
"code": "400",
"message": "Subscription da3ee1f7-9a76-4e64-8f36-b815da57a35f is not associated with EA offer type (Request ID: 7bd02b44-0734-4b68-9a67-c731279ed42c)"
}
}
So it seems only EA offerings are allowed to create consumption budgets programmatically. I would be nice if that was stated explicitly in the documentation: https://docs.microsoft.com/en-us/powershell/module/az.billing/new-azconsumptionbudget?view=azps-4.2.0
Alternative: I have succeeded in creating budgets using ARM templates on MSOP offer: https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/quick-create-budget-template?tabs=CLI
Reference for types of billing accounts: https://docs.microsoft.com/en-us/azure/cost-management-billing/cost-management-billing-overview
This version of SDK uses an older version of API. This will be addressed by end of this year.
Closing as per Prem's comments
@ms-premp when can we expect this bug to be resolved? What is alternative way, you suggest, to create consumption budget for large group of resource groups.
Any news about any workaround or new psmodule vertion fix?
Reopen this issue.
@ramaganesan-rg, the issue only can be closed when it is fixed and it won't be fixed with reasonable justification.
@mgdarg I have created a workaround to set sonsumtpion budget thru restapi. Might be of ur help. https://gist.github.com/rupeshtech/2b7c4c4a8ab4103605409426547ac797
This version of SDK uses an older version of API. This will be addressed by end of this year.
@ms-premp has this been fixed yet?
I too am having this issue. any update on maybe a possible fix date?
The current version of SDK support creating budgets only under the Enterprise Agreement offer type. Can you please try creating budgets using the REST API : https://docs.microsoft.com/en-us/rest/api/consumption/budgets/createorupdate
or through ARM template : https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/quick-create-budget-template?tabs=CLI
So in other words you removed perfectly good powershell functionality.
why?
The same issue for Python SDK as well.
Traceback (most recent call last):
File "C:\Temp\zwqa4l2q.g2h\145d6e3a-123f-40b2-933f-54380c1fdcb8", line 138, in
File "C:\Temp\zwqa4l2q.g2h\145d6e3a-123f-40b2-933f-54380c1fdcb8", line 109, in main
consumption = consumption_client.budgets.create_or_update(
File "C:\WPy64-3800\python-3.8.0.amd64\lib\site-packages\azure\mgmt\consumption\operations\budgets_operations.py", line 278, in create_or_update
raise models.ErrorResponseException(self._deserialize, response)azure.mgmt.consumption.models.error_response.ErrorResponseException:
(400) Cost Management supports only Enterprise Agreement, Web direct and Microsoft Customer Agreement offer types.
Subscription aaaaaaaa is not associated with a valid offer type.
(Request ID: 226328e6-2cfc-45ef-8a9c-3a1b70bc2e1d)
Thanks for the feedback! We are aware of this limitation and its in our backlog to update the SDK. Unfortunately, we don't have a timeline yet. As soon as we can prioritize SDK update, we will update this thread. In the meantime, can you try creating budgets using the REST API - https://docs.microsoft.com/en-us/rest/api/consumption/budgets/createorupdate ?
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ccmaxpcrew.
Author: | rahulNandan |
---|---|
Assignees: | - |
Labels: | `Consumption`, `Consumption-Budget`, `Service Attention`, `bug`, `customer-reported` |
Milestone: | - |
We are tracking update of SDK in our backlog and we will update once we have made progress in this direction. In the meantime, users can leverage Rest APIs to create Budget - https://docs.microsoft.com/en-us/rest/api/consumption/budgets/createorupdate . Closing this item.
Has this been fixed up yet? I'm trying to programmatically create a budget and getting an error still:
Body: { "error": { "code": "400", "message": "Cost Management supports only Enterprise Agreement, Web direct and Microsoft Customer Agreement offer types. Subscription nnnn-nnnnn-nnn-nnnnnn is not associated with a valid offer type" } }
Description
I am getting BadRequest error while creating Budget from Azure powershell
Steps to reproduce
Execute below command, after Login into Azure account and select your desired subscription context.
Environment data
Module versions
Debug output
Error output