Getting Cost Management related information from Azure and send it via e-mail.
Find my detailed description on coding.blog -> https://lennart.coding.blog/AzureCostManagementFunction :)
It might be the case that you get an error like: Invoke-WebRequest : {"error":{"code":"400","message":"The remote server returned an error: (400) Bad Request."}
when you are calling "$response = Invoke-WebRequest -Uri $uriCostManagement -Method Post -H ...
This usuablly happens if the body is malformated or if the parameters used in the body are not correct.
Try changing the parameters (e.g EUR to USD or the other way around) and have a look at the prerequisites:
#Name of the budget that exists on the subscription (Must exist)
$budgetname = "testbudget"
#Name of the Resource Tag that can be used to group costs (CostCenter Tag would be ideal; Tag must exist)
$costCenterTag = "costcenter"
#Abbreviation of the currency the Enterprise Agreement has been created under (for most German Customers it will be "EUR" instead of "USD")
$currency = "USD"