Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.21k stars 3.81k forks source link

PS cmdlet Remove-AzConsumptionBudget under the Az.Billing module don’t support MCA billing scopes due to the API version used. #25609

Open rigofundora opened 1 month ago

rigofundora commented 1 month ago

Description

PS cmdlet Remove-AzConsumptionBudget under the Az.Billing module don’t work for MCA billing scopes. This is due to the cmdlet using an older version of Microsoft Consumption budgets API which don’t support MCA offers. MCA offers are supported on api version 2018-12-01-preview or later. The cmdlet is using api-version=2018-01-31.

Command:

Remove-AzConsumptionBudget -Name "testMCAbudget" -ResourceGroupName "rigo-test-rg" -debug

https://learn.microsoft.com/en-us/powershell/module/az.billing/remove-azconsumptionbudget?view=azps-12.0.0

Issue script & Debug output

PS C:\Users\rigobertof> Remove-AzConsumptionBudget -Name "testMCAbudget"  -ResourceGroupName "rigo-test-rg" -debug
DEBUG: 6:20:22 PM - RemoveAzureRmConsumptionBudget begin processing with ParameterSet 'Subscription'.
DEBUG: 6:20:22 PM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].

Confirm
Are you sure you want to perform this action?
Performing the operation "Remove Consumption Budget" on target "testMCAbudget".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y
DEBUG: [Common.Authentication]: Authenticating using Account:, environment: 'AzureCloud', tenant:
DEBUG: 6:20:25 PM - [ConfigManager] Got nothing from [EnableLoginByWam], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 6:20:25 PM - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync -  Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/',
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - b01f3202-f570-4860-b340-f8bf57ed6457] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - b01f3202-f570-4860-b340-f8bf57ed6457] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - b01f3202-f570-4860-b340-f8bf57ed6457] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - b01f3202-f570-4860-b340-f8bf57ed6457] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - b01f3202-f570-4860-b340-f8bf57ed6457] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - b01f3202-f570-4860-b340-f8bf57ed6457] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z] Found 2 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z] Returning 2 accounts
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - f7747a65-877e-469c-b245-2fefd37c69ee] MSAL MSAL.CoreCLR with assembly version '4.56.0.0'. CorrelationId(f7747a65-877e-469c-b245-2fefd37c69ee)
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - f7747a65-877e-469c-b245-2fefd37c69ee] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - f7747a65-877e-469c-b245-2fefd37c69ee] LoginHint provided: False
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - f7747a65-877e-469c-b245-2fefd37c69ee] Account provided: True
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - f7747a65-877e-469c-b245-2fefd37c69ee] ForceRefresh: False
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - f7747a65-877e-469c-b245-2fefd37c69ee]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - f7747a65-877e-469c-b245-2fefd37c69ee
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:

DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - f7747a65-877e-469c-b245-2fefd37c69ee] === Token Acquisition (SilentRequest) started:
         Scopes: https://management.core.windows.net//.default
        Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - f7747a65-877e-469c-b245-2fefd37c69ee] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - f7747a65-877e-469c-b245-2fefd37c69ee] Access token is not expired. Returning the found cache entry. [Current time (07/23/2024 00:20:25) - Expiration Time (07/23/2024 01:15:07 +00:00) - Extended Expiration Time (07/23/2024 01:15:07 +00:00)]
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - f7747a65-877e-469c-b245-2fefd37c69ee] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - f7747a65-877e-469c-b245-2fefd37c69ee] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - f7747a65-877e-469c-b245-2fefd37c69ee]
        === Token Acquisition finished successfully:
DEBUG: False MSAL 4.56.0.0 MSAL.CoreCLR .NET 8.0.4 Microsoft Windows 10.0.22631 [2024-07-23 00:20:25Z - f7747a65-877e-469c-b245-2fefd37c69ee]  AT expiration time: 7/23/2024 1:15:07 AM +00:00, scopes: https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default. source: Cache
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:  ExpiresOn: 2024-07-23T01:15:07.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: , UserId: 
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
DELETE

Absolute Uri:
https://management.azure.com/subscriptions/{sub_ID}/resourceGroups/rigo-test-rg/providers/Microsoft.Consumption/budgets/testMCAbudget?api-version=2018-01-31

Headers:
Accept-Language               : en-US
x-ms-client-request-id        : 1971b517-8231-4365-96b2-57839422f487

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
UnprocessableEntity

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
session-id                    : eeeadc0b-b296-433f-9464-4c80940c9f40
x-ms-request-id               : 88aae6ab-3a14-4033-891c-d53b83c9f333
x-ms-correlation-request-id   : 12fcd818-1ca7-49ea-b4d8-35e1611bd89d
x-ms-client-request-id        : 1971b517-8231-4365-96b2-57839422f487
X-Powered-By                  : ASP.NET
x-ms-ratelimit-remaining-subscription-deletes: 199
x-ms-ratelimit-remaining-subscription-global-deletes: 2999
x-ms-routing-request-id       : EASTUS2:20240723T002028Z:12fcd818-1ca7-49ea-b4d8-35e1611bd89d
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
X-Cache                       : CONFIG_NOCACHE
X-MSEdge-Ref                  : Ref A: 3C5C1A76F47047D98BCDA11CB79F587B Ref B: BN1AA2051014029 Ref C: 2024-07-23T00:20:27Z
Date                          : Tue, 23 Jul 2024 00:20:27 GMT

Body:
{
  "error": {
    "code": "422",
    "message": "This operation is not supported in the version specified in the request. Please use version 2018-12-01-preview or later. (Request ID: 88aae6ab-3a14-4033-891c-d53b83c9f333)"
  }
}

DEBUG: 6:20:27 PM - [ConfigManager] Got nothing from [DisableErrorRecordsPersistence], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 6:20:27 PM - [ConfigManager] Got nothing from [EnableDataCollection], Module = [], Cmdlet = []. Returning default value [True].
Remove-AzConsumptionBudget: Operation returned an invalid status code 'UnprocessableEntity'
DEBUG: 6:20:27 PM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 6:20:27 PM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 6:20:27 PM - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: AzureQoSEvent:  Module: Az.Billing:2.0.3; CommandName: Remove-AzConsumptionBudget; PSVersion: 7.4.2; IsSuccess: False; Duration: 00:00:04.2999590; Exception: Operation returned an invalid status code 'UnprocessableEntity';
DEBUG: 6:20:27 PM - RemoveAzureRmConsumptionBudget end processing.

Environment data

PS C:\Users\rigof> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.2
PSEdition                      Core
GitCommitId                    7.4.2
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

PS C:\Users\rigof> Get-Module Az*

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     2.15.1                Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script     2.0.3                 Az.Billing                          {Get-AzBillingAccount, Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzBillingProfile…}

Error output

HistoryId: 1

Message        : Operation returned an invalid status code 'UnprocessableEntity'
StackTrace     :    at Microsoft.Azure.Management.Consumption.BudgetsOperations.DeleteByResourceGroupNameWithHttpMessagesAsync(String resourceGroupName, String budgetName, Dictionary`2 customHeaders, CancellationToken 
                 cancellationToken)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.DeleteByResourceGroupNameAsync(IBudgetsOperations operations, String resourceGroupName, String budgetName, CancellationToken 
                 cancellationToken)
                    at Microsoft.Azure.Management.Consumption.BudgetsOperationsExtensions.DeleteByResourceGroupName(IBudgetsOperations operations, String resourceGroupName, String budgetName)
                    at Microsoft.Azure.Commands.Consumption.Cmdlets.Budget.RemoveAzureRmConsumptionBudget.ExecuteCmdlet()
Exception      : Microsoft.Azure.Management.Consumption.Models.ErrorResponseException
InvocationInfo : {Remove-AzConsumptionBudget}
Line           : Remove-AzConsumptionBudget -Name "testMCAbudget"  -ResourceGroupName "rigo-test-rg"
Position       : At line:1 char:1
                 + Remove-AzConsumptionBudget -Name "testMCAbudget"  -ResourceGroupName  …
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 1
rigofundora commented 1 month ago

Workaround:

As a workaround, I ran the following PS script to call the API directly using the latest API version and it worked.

$sub = "{yourSubscriptionID}" $rg= "{resourceGroupName}" $budgetName = "{budgetName}" $auth=Get-AzAccessToken
$authHeader= $auth.token $output= Invoke-RestMethod -Uri "https://management.azure.com/subscriptions/$sub/resourceGroups/$rg/providers/Microsoft.Consumption/budgets/$budgetName`?api-version=2023-05-01" -Method DELETE -Headers @{"Authorization"="Bearer $authHeader"}

Alternatively, we can also use Azure CLI command az consumption budget | Microsoft Learn which uses API version 2023-05-01 that supports MCA offers

dmaloney02 commented 2 weeks ago

This is also true for the sister commands.

Get-AzConsumptionBudget Get-AzConsumptionBudget: Operation returned an invalid status code 'UnprocessableEntity'

Get-AzConsumptionBudget -debug DEBUG: 10:22:26 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True]. DEBUG: 10:22:26 AM - GetAzureRmConsumptionBudget begin processing with ParameterSet '__AllParameterSets'. DEBUG: 10:22:26 AM - using account id 'aadwimal01@roberthalf.com'... DEBUG: 10:22:26 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True]. DEBUG: [Common.Authentication]: Authenticating using Account: '', environment: 'AzureCloud', tenant: '' DEBUG: 10:22:26 AM - [ConfigManager] Got nothing from [DisableInstanceDiscovery], Module = [], Cmdlet = []. Returning default value [False]. DEBUG: 10:22:26 AM - [ConfigManager] Got [False] from [EnableLoginByWam], Module = [], Cmdlet = []. DEBUG: 10:22:26 AM - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'' DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - 55a21fbc-8bfa-4298-b756-57c99acd6b99] IsLegacyAdalCacheEnabled: yes DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - 55a21fbc-8bfa-4298-b756-57c99acd6b99] [Region discovery] Not using a regional authority. DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - 55a21fbc-8bfa-4298-b756-57c99acd6b99] [Region discovery] Not using a regional authority. DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - 55a21fbc-8bfa-4298-b756-57c99acd6b99] [Region discovery] Not using a regional authority. DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - 55a21fbc-8bfa-4298-b756-57c99acd6b99] IsLegacyAdalCacheEnabled: yes DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - 55a21fbc-8bfa-4298-b756-57c99acd6b99] IsLegacyAdalCacheEnabled: yes DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z] Found 2 cache accounts and 0 broker accounts DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z] Returning 2 accounts DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - b134e100-5296-45e7-950c-f26eac9c3dc1] MSAL MSAL.CoreCLR with assembly version '4.61.3.0'. CorrelationId(b134e100-5296-45e7-950c-f26eac9c3dc1) DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - b134e100-5296-45e7-950c-f26eac9c3dc1] === AcquireTokenSilent Parameters === DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - b134e100-5296-45e7-950c-f26eac9c3dc1] LoginHint provided: False DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - b134e100-5296-45e7-950c-f26eac9c3dc1] Account provided: True DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - b134e100-5296-45e7-950c-f26eac9c3dc1] ForceRefresh: False DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - b134e100-5296-45e7-950c-f26eac9c3dc1] === Request Data === Authority Provided? - True Scopes - https://management.core.windows.net//.default Extra Query Params Keys (space separated) - ApiId - AcquireTokenSilent IsConfidentialClient - False SendX5C - False LoginHint ? False IsBrokerConfigured - False HomeAccountId - False CorrelationId - b134e100-5296-45e7-950c-f26eac9c3dc1 UserAssertion set: False LongRunningOboCacheKey set: False Region configured:

DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - b134e100-5296-45e7-950c-f26eac9c3dc1] === Token Acquisition (SilentRequest) started: Scopes: https://management.core.windows.net//.default Authority Host: login.microsoftonline.com DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - b134e100-5296-45e7-950c-f26eac9c3dc1] [Region discovery] Not using a regional authority. DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - b134e100-5296-45e7-950c-f26eac9c3dc1] Access token is not expired. Returning the found cache entry. [Current time (08/29/2024 17:22:26) - Expiration Time (08/29/2024 18:14:02 +00:00) - Extended Expiration Time (08/29/2024 18:14:02 +00:00)] DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - b134e100-5296-45e7-950c-f26eac9c3dc1] Returning access token found in cache. RefreshOn exists ? False DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - b134e100-5296-45e7-950c-f26eac9c3dc1] [Region discovery] Not using a regional authority. DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - b134e100-5296-45e7-950c-f26eac9c3dc1] === Token Acquisition finished successfully: DEBUG: False MSAL 4.61.3.0 MSAL.CoreCLR .NET 8.0.1 Microsoft Windows 10.0.22631 [2024-08-29 17:22:26Z - b134e100-5296-45e7-950c-f26eac9c3dc1] AT expiration time: 8/29/2024 6:14:02 PM +00:00, scopes: https://management.core.windows.net//.default https://management.core.windows.net//user_impersonation. source: Cache DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: ExpiresOn: 2024-08-29T18:14:02.0000000+00:00 DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '', UserId: '' DEBUG: ============================ HTTP REQUEST ============================

HTTP Method: GET

Absolute Uri: https://management.azure.com/subscriptions//providers/Microsoft.Consumption/budgets?api-version=2018-01-31

Headers: Accept-Language : en-US x-ms-client-request-id : 7fe7e715-a2ee-44d1-9960-5534697f653a

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code: UnprocessableEntity

Headers: Cache-Control : no-cache Pragma : no-cache session-id : 60c54354-fe2f-40d8-a586-6a9aaf2364d7 x-ms-request-id : 62821d0e-c0d9-4e23-8ea9-7af0b2400e0c x-ms-correlation-request-id : 851d7e24-6745-4e9f-9c99-6b4e0712c5ed x-ms-client-request-id : 7fe7e715-a2ee-44d1-9960-5534697f653a X-Powered-By : ASP.NET x-ms-ratelimit-remaining-subscription-reads: 499 x-ms-ratelimit-remaining-subscription-global-reads: 7499 x-ms-routing-request-id : WESTUS:20240829T172227Z:851d7e24-6745-4e9f-9c99-6b4e0712c5ed Strict-Transport-Security : max-age=31536000; includeSubDomains X-Content-Type-Options : nosniff X-Cache : CONFIG_NOCACHE X-MSEdge-Ref : Ref A: F4BDD7E5A3514BE096EDD6363E4E563C Ref B: SJC211051203035 Ref C: 2024-08-29T17:22:26Z Date : Thu, 29 Aug 2024 17:22:27 GMT

Body: { "error": { "code": "422", "message": "This operation is not supported in the version specified in the request. Please use version 2018-12-01-preview or later. (Request ID: 62821d0e-c0d9-4e23-8ea9-7af0b2400e0c)" } }

DEBUG: 10:22:27 AM - [ConfigManager] Got nothing from [EnableErrorRecordsPersistence], Module = [], Cmdlet = []. Returning default value [False]. Get-AzConsumptionBudget: Operation returned an invalid status code 'UnprocessableEntity' DEBUG: 10:22:27 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True]. DEBUG: 10:22:27 AM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True]. DEBUG: 10:22:27 AM - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [True]. DEBUG: AzureQoSEvent: Module: Az.Billing:2.0.4; CommandName: Get-AzConsumptionBudget; PSVersion: 7.4.1; IsSuccess: False; Duration: 00:00:00.8957602; SanitizeDuration: 00:00:00; Exception: Operation returned an invalid status code 'UnprocessableEntity'; DEBUG: 10:22:27 AM - [ConfigManager] Got nothing from [EnableDataCollection], Module = [], Cmdlet = []. Returning default value [True]. DEBUG: 10:22:27 AM - GetAzureRmConsumptionBudget end processing.