Skip to content

Commit 67c3f44

Browse files
committed
Release 0.10.0
1 parent 9730762 commit 67c3f44

File tree

4 files changed

+62
-10
lines changed

4 files changed

+62
-10
lines changed

FabricTools/FabricTools.psd1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'FabricTools.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.9.0'
15+
ModuleVersion = '0.10.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -136,7 +136,8 @@
136136
'Get-FabricSQLDatabase',
137137
'Remove-FabricSQLDatabase',
138138
'Get-FabricCapacitySkus',
139-
'Confirm-FabricAuthToken'
139+
'Confirm-FabricAuthToken',
140+
'Get-FabricConnection'
140141
)
141142

142143
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<#
2+
.SYNOPSIS
3+
Retrieves Fabric connections.
4+
5+
.DESCRIPTION
6+
The Get-FabricConnection function retrieves Fabric connections. It can retrieve all connections or the specified one only.
7+
8+
.PARAMETER connectionId
9+
The ID of the connection to retrieve.
10+
11+
.EXAMPLE
12+
Get-FabricConnection
13+
14+
This example retrieves all connections from Fabric
15+
16+
.EXAMPLE
17+
Get-FabricConnection -connectionId "12345"
18+
19+
This example retrieves specific connection from Fabric with ID "12345".
20+
21+
.NOTES
22+
https://learn.microsoft.com/en-us/rest/api/fabric/core/connections/get-connection?tabs=HTTP
23+
https://learn.microsoft.com/en-us/rest/api/fabric/core/connections/list-connections?tabs=HTTP
24+
#>
25+
26+
27+
Function Get-FabricConnection {
28+
[CmdletBinding()]
29+
param
30+
(
31+
[Parameter(Mandatory = $false)]
32+
[string]$connectionId
33+
)
34+
35+
begin {
36+
Confirm-FabricAuthToken | Out-Null
37+
}
38+
39+
process {
40+
if ($connectionId) {
41+
$result = Invoke-FabricAPIRequest -Uri "/connections/$($connectionId)" -Method GET
42+
}
43+
else {
44+
$result = Invoke-FabricAPIRequest -Uri "/connections" -Method GET
45+
}
46+
47+
return $result.value
48+
}
49+
}

FabricTools/public/New-FabricLakehouse.ps1

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,17 @@ function New-FabricLakehouse {
5555
[string]$LakehouseName,
5656

5757
[Parameter(Mandatory=$true)]
58-
[Alias("Schema", "SchemaEnabled")]
59-
[bool]$LakehouseSchemaEnabled,
58+
[Alias("LakehouseSchemaEnabled")]
59+
[bool]$SchemaEnabled,
6060

6161
[ValidateLength(0, 256)]
6262
[Alias("Description")]
6363
[string]$LakehouseDescription
6464
)
6565

6666
begin {
67-
Write-Verbose "Checking if session is established. If not throw error"
68-
if ($null -eq $FabricSession.headerParams) {
69-
throw "No session established to Fabric. Please run Connect-FabricAccount"
70-
}
71-
67+
Confirm-FabricAuthToken | Out-Null
68+
7269
#create payload
7370
$body = [ordered]@{
7471
'displayName' = $LakehouseName
@@ -87,7 +84,7 @@ begin {
8784

8885
# Create Eventhouse API URL
8986
$lakehouseApiUrl = "$($FabricSession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/lakehouses"
90-
}
87+
}
9188

9289
process {
9390

ReleaseNotes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Release Notes
22

3+
## Version 0.10.0:
4+
* Added new functions:
5+
- `New-FabricLakehouse`
6+
- `Get-FabricConnection`
7+
38
## Version 0.9.0:
49
* Added few new functions:
510
- 'Get-FabricSQLDatabase',

0 commit comments

Comments
 (0)