Skip to content

Commit db49f29

Browse files
helderpintoHélder Pinto
andauthored
Upgraded SQL Server name availability check API version (#1642)
Co-authored-by: Hélder Pinto <[email protected]>
1 parent e9e0813 commit db49f29

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs-mslearn/toolkit/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ _Released June 2, 2025_
6666
- Telemetry is not personally identifiable and only used to improve the template.
6767
- Disable telemetry by setting the **enableDefaultTelemetry** parameter to **false**.
6868

69+
### [Optimization engine](optimization-engine/overview.md) v0.11
70+
71+
- **Changed**
72+
- Upgraded Azure Resource Manager SQL Server name availability API version, used by the engine deployment script, due to upcoming deprecation of 2014-04-01 version.
73+
6974
### [Open data](open-data.md) v0.11
7075

7176
**[Pricing units](open-data.md#pricing-units)**

src/optimization-engine/Deploy-AzureOptimizationEngine.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ $sql = Get-AzSqlServer -ResourceGroupName $resourceGroupName -Name $sqlServerNam
562562
if ($null -eq $sql -and -not($sqlServerName -like "*.database.*") -and -not($IgnoreNamingAvailabilityErrors))
563563
{
564564

565-
$SqlServerNameAvailabilityUriPath = "/subscriptions/$subscriptionId/providers/Microsoft.Sql/checkNameAvailability?api-version=2014-04-01"
565+
$SqlServerNameAvailabilityUriPath = "/subscriptions/$subscriptionId/providers/Microsoft.Sql/checkNameAvailability?api-version=2021-11-01"
566566
$body = "{`"name`": `"$sqlServerName`", `"type`": `"Microsoft.Sql/servers`"}"
567567
# TODO: Switch to custom Invoke-Rest command to leverage telemetry tracking
568568
$sqlNameResult = (Invoke-AzRestMethod -Path $SqlServerNameAvailabilityUriPath -Method POST -Payload $body).Content | ConvertFrom-Json

0 commit comments

Comments
 (0)