Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed ResourceUrl for token retrieval in `Connect-FabricAccount`.
- Fixed bugs in `New-FabricEventhouse` and improved ShouldProcess logic.
- Fixed parameter naming and example formatting in several functions.
- Fixed issue with call to `Invoke-FabricAPIRequest` from `Remove-FabricWarehouse`.

### Deprecated

Expand Down Expand Up @@ -59,4 +60,3 @@ For a full list of changes and details, please see the commit history.
### Security

- In case of vulnerabilities.

14 changes: 6 additions & 8 deletions source/Public/Warehouse/Remove-FabricWarehouse.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,20 @@ function Remove-FabricWarehouse
Write-Message -Message "Token validation completed." -Level Debug

# Step 2: Construct the API URL
$apiEndpointURI = "{0}/workspaces/{1}/warehouses/{2}" -f $FabricConfig.BaseUrl, $WorkspaceId, $WarehouseId
$apiEndpointURI = "workspaces/{0}/warehouses/{1}" -f $WorkspaceId, $WarehouseId
Write-Message -Message "API Endpoint: $apiEndpointURI" -Level Debug

if ($PSCmdlet.ShouldProcess($apiEndpointURI, "Delete Warehouse"))
{
# Step 3: Make the API request
$response = Invoke-FabricAPIRequest `
-Headers $FabricConfig.FabricHeaders `
-BaseURI $apiEndpointURI `
-method Delete `

$apiParams = @{
Uri = $apiEndpointURI
Method = 'Delete'
}
$null = Invoke-FabricAPIRequest @apiParams
}

Write-Message -Message "Warehouse '$WarehouseId' deleted successfully from workspace '$WorkspaceId'." -Level Info
return $response

}
catch
{
Expand Down
Loading