diff --git a/README.md b/README.md index 2b96a66..8732861 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,5 @@ During the development of the module and the research I do I might pass some int - [about_Comment_Based_Help](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help?view=powershell-5.1) - [Examples of Comment-based Help](https://learn.microsoft.com/en-us/powershell/scripting/developer/help/examples-of-comment-based-help?view=powershell-7.4) - [Using PSScriptAnalyzer](https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer?view=ps-modules) +- [Querying Fabric KQL Database Using REST API](https://fabric.guru/querying-fabric-kql-database-using-rest-api) +- [How to Use GitHub Action for GitHub Push in Your Workflows](https://cicube.io/workflow-hub/ad-m-github-push-action/#how-to-use-a-github-app-token-for-pushing-changes) diff --git a/documentation/powerrti.md b/documentation/powerrti.md index 344b87d..43b14e2 100644 --- a/documentation/powerrti.md +++ b/documentation/powerrti.md @@ -11,9 +11,15 @@ Locale: en-US {{ Fill in the Description }} ## powerrti Cmdlets +### [Add-RtiWorkspaceRoleAssignment](Add-RtiWorkspaceRoleAssignment.md) +{{ Fill in the Description }} + ### [Connect-RtiAccount](Connect-RtiAccount.md) {{ Fill in the Description }} +### [Get-RtiDebugInfo](Get-RtiDebugInfo.md) +{{ Fill in the Description }} + ### [Get-RtiEventhouse](Get-RtiEventhouse.md) {{ Fill in the Description }} @@ -23,6 +29,9 @@ Locale: en-US ### [Get-RtiKQLDashboard](Get-RtiKQLDashboard.md) {{ Fill in the Description }} +### [Get-RtiKQLDashboardDefinition](Get-RtiKQLDashboardDefinition.md) +{{ Fill in the Description }} + ### [Get-RtiKQLDatabase](Get-RtiKQLDatabase.md) {{ Fill in the Description }} @@ -32,6 +41,9 @@ Locale: en-US ### [Get-RtiWorkspace](Get-RtiWorkspace.md) {{ Fill in the Description }} +### [Get-RtiWorkspaceRoleAssignment](Get-RtiWorkspaceRoleAssignment.md) +{{ Fill in the Description }} + ### [Invoke-RtiKQLCommand](Invoke-RtiKQLCommand.md) {{ Fill in the Description }} diff --git a/powerrti/Public/Eventhouse/New-RTIEventhouse.ps1 b/powerrti/Public/Eventhouse/New-RTIEventhouse.ps1 index c5c367b..d73ef1d 100644 --- a/powerrti/Public/Eventhouse/New-RTIEventhouse.ps1 +++ b/powerrti/Public/Eventhouse/New-RTIEventhouse.ps1 @@ -9,7 +9,7 @@ function New-RtiEventhouse { Creates a new Fabric Eventhouse .PARAMETER WorkspaceID - Id of the Fabric Workspace for which the Eventhouse should be created. The value for WorkspaceID is a GUID. + Id of the Fabric Workspace for which the Eventhouse should be created. The value for WorkspaceID is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER EventhouseName diff --git a/powerrti/Public/Eventhouse/Set-RtiEventhouse.ps1 b/powerrti/Public/Eventhouse/Set-RtiEventhouse.ps1 index 6909c92..0be491b 100644 --- a/powerrti/Public/Eventhouse/Set-RtiEventhouse.ps1 +++ b/powerrti/Public/Eventhouse/Set-RtiEventhouse.ps1 @@ -30,7 +30,7 @@ function Set-RtiEventhouse { -EventhouseDescription 'This is my new Eventhouse' This example will update the Eventhouse with the Id '12345678-1234-1234-1234-123456789012' - in the Workspace with the Id '12345678-1234-1234-1234-123456789012' to + in the Workspace with the Id '12345678-1234-1234-1234-123456789012' to have the name 'MyNewEventhouse' and the description 'This is my new Eventhouse'. diff --git a/powerrti/Public/Eventstream/Get-RtiEventstream.ps1 b/powerrti/Public/Eventstream/Get-RtiEventstream.ps1 index 814094c..06ee166 100644 --- a/powerrti/Public/Eventstream/Get-RtiEventstream.ps1 +++ b/powerrti/Public/Eventstream/Get-RtiEventstream.ps1 @@ -11,14 +11,14 @@ function Get-RtiEventstream { parameters cannot be used together. .PARAMETER WorkspaceId - Id of the Fabric Workspace for which the Eventstreams should be retrieved. The value for WorkspaceId is a GUID. + Id of the Fabric Workspace for which the Eventstreams should be retrieved. The value for WorkspaceId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER EventstreamName The name of the Eventstream to retrieve. This parameter cannot be used together with EventstreamID. .PARAMETER EventstreamId - The Id of the Eventstream to retrieve. This parameter cannot be used together with EventstreamName. The value for EventstreamId is a GUID. + The Id of the Eventstream to retrieve. This parameter cannot be used together with EventstreamName. The value for EventstreamId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .EXAMPLE @@ -45,7 +45,7 @@ function Get-RtiEventstream { https://learn.microsoft.com/en-us/rest/api/fabric/eventstream/items/get-eventstream?tabs=HTTP .NOTES - TODO: Add functionality to list all Eventhouses. To do so fetch all workspaces and + TODO: Add functionality to list all Eventhouses. To do so fetch all workspaces and then all eventhouses in each workspace. Revision History: @@ -73,13 +73,13 @@ begin { # You can either use Name or WorkspaceID if ($PSBoundParameters.ContainsKey("EventstreamName") -and $PSBoundParameters.ContainsKey("EventstreamID")) { - throw "Parameters EventstreamName and EventstreamID cannot be used together" + throw "Parameters EventstreamName and EventstreamID cannot be used together" } # Create Eventhouse API - $eventstreamApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/eventstreams" + $eventstreamApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/eventstreams" - $eventstreamAPIEventstreamIdUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/eventstreams/$EventstreamId" + $eventstreamAPIEventstreamIdUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/eventstreams/$EventstreamId" } @@ -92,7 +92,7 @@ process { -Method GET ` -Uri $eventstreamAPIEventstreamIdUrl ` -ContentType "application/json" - + $response } else { diff --git a/powerrti/Public/Eventstream/New-RtiEventstream.ps1 b/powerrti/Public/Eventstream/New-RtiEventstream.ps1 index ee15ea6..1aac74f 100644 --- a/powerrti/Public/Eventstream/New-RtiEventstream.ps1 +++ b/powerrti/Public/Eventstream/New-RtiEventstream.ps1 @@ -8,8 +8,8 @@ function New-RtiEventstream { .DESCRIPTION Creates a new Fabric Eventstream -.PARAMETER WorkspaceID - Id of the Fabric Workspace for which the Eventstream should be created. The value for WorkspaceID is a GUID. +.PARAMETER WorkspaceID + Id of the Fabric Workspace for which the Eventstream should be created. The value for WorkspaceID is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER EventstreamName @@ -28,7 +28,7 @@ function New-RtiEventstream { .NOTES Revsion History: - + - 2024-11-07 - FGE: Implemented SupportShouldProcess - 2024-11-09 - FGE: Added DisplaName as Alias for EventStreamName @@ -40,8 +40,8 @@ function New-RtiEventstream { param ( [Parameter(Mandatory=$true)] - [string]$WorkspaceID, - + [string]$WorkspaceID, + [Parameter(Mandatory=$true)] [Alias("Name","DisplayName")] [string]$EventstreamName, @@ -66,7 +66,7 @@ begin { -Depth 1 # Create Eventhouse API URL - $eventstreamApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/eventstreams" + $eventstreamApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/eventstreams" } process { diff --git a/powerrti/Public/Eventstream/Remove-RtiEventstream.ps1 b/powerrti/Public/Eventstream/Remove-RtiEventstream.ps1 index 06d0e67..70e86a7 100644 --- a/powerrti/Public/Eventstream/Remove-RtiEventstream.ps1 +++ b/powerrti/Public/Eventstream/Remove-RtiEventstream.ps1 @@ -9,11 +9,11 @@ function Remove-RtiEventstream { Removes an existing Fabric Eventstream .PARAMETER WorkspaceId - Id of the Fabric Workspace for which the Eventstream should be deleted. The value for WorkspaceId is a GUID. + Id of the Fabric Workspace for which the Eventstream should be deleted. The value for WorkspaceId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER EventstreamId - The Id of the Eventstream to delete. The value for Eventstream is a GUID. + The Id of the Eventstream to delete. The value for Eventstream is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .EXAMPLE @@ -34,7 +34,7 @@ function Remove-RtiEventstream { .NOTES Revsion History: - + - 2024-11-07 - FGE: Implemented SupportShouldProcess - 2024-11-09 - FGE: Added DisplaName as Alias for EventStreamName #> @@ -45,8 +45,8 @@ function Remove-RtiEventstream { param ( [Parameter(Mandatory=$true)] - [string]$WorkspaceId, - + [string]$WorkspaceId, + [Alias("Id")] [string]$EventstreamId, @@ -63,7 +63,7 @@ begin { # You can either use EventstreamName or EventstreamID if ($PSBoundParameters.ContainsKey("EventstreamId") -and $PSBoundParameters.ContainsKey("EventstreamName")) { - throw "Parameters EventstreamId and EventstreamName cannot be used together" + throw "Parameters EventstreamId and EventstreamName cannot be used together" } if ($PSBoundParameters.ContainsKey("EventstreamName")) { @@ -75,7 +75,7 @@ begin { } # Create Eventhouse API URL - $eventstreamApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/eventstreams/$EventstreamId" + $eventstreamApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/eventstreams/$EventstreamId" } diff --git a/powerrti/Public/Eventstream/Set-RtiEventstream.ps1 b/powerrti/Public/Eventstream/Set-RtiEventstream.ps1 index 9c91f54..19e0a81 100644 --- a/powerrti/Public/Eventstream/Set-RtiEventstream.ps1 +++ b/powerrti/Public/Eventstream/Set-RtiEventstream.ps1 @@ -9,11 +9,11 @@ function Set-RtiEventstream { Updates Properties of an existing Fabric Eventstream .PARAMETER WorkspaceId - Id of the Fabric Workspace for which the Eventstream should be updated. The value for WorkspaceId is a GUID. + Id of the Fabric Workspace for which the Eventstream should be updated. The value for WorkspaceId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER EventstreamId - The Id of the Eventstream to update. The value for EventstreamId is a GUID. + The Id of the Eventstream to update. The value for EventstreamId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER EventstreamNewName @@ -29,8 +29,8 @@ function Set-RtiEventstream { -EventstreamNewName 'MyNewEventstream' ` -EventstreamDescription 'This is my new Eventstream' - This example will update the Eventstream with the Id '12345678-1234-1234-1234-123456789012'. - + This example will update the Eventstream with the Id '12345678-1234-1234-1234-123456789012'. + .NOTES TODO: Add functionality to update Eventstream properties using EventstreamName instead of EventstreamId @@ -44,12 +44,12 @@ function Set-RtiEventstream { param ( [Parameter(Mandatory=$true)] - [string]$WorkspaceId, + [string]$WorkspaceId, [Parameter(Mandatory=$true)] [Alias("Id")] - [string]$EventstreamId, - + [string]$EventstreamId, + [Alias("NewName","NewDisplayName")] [string]$EventstreamNewName, @@ -81,7 +81,7 @@ begin { -Depth 1 # Create Eventstream API URL - $EventstreamApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/Eventstreams/$EventstreamId" + $EventstreamApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/Eventstreams/$EventstreamId" } process { diff --git a/powerrti/Public/Get-RtiDebugInfo.ps1 b/powerrti/Public/Get-RtiDebugInfo.ps1 index d446914..f3be62a 100644 --- a/powerrti/Public/Get-RtiDebugInfo.ps1 +++ b/powerrti/Public/Get-RtiDebugInfo.ps1 @@ -14,7 +14,7 @@ function Get-RtiDebugInfo { Get-RtiDebugInfo This example shows the current session object. - + #> [CmdletBinding()] diff --git a/powerrti/Public/Invoke-RtiKQLCommand.ps1 b/powerrti/Public/Invoke-RtiKQLCommand.ps1 index 475ec91..4c6c631 100644 --- a/powerrti/Public/Invoke-RtiKQLCommand.ps1 +++ b/powerrti/Public/Invoke-RtiKQLCommand.ps1 @@ -6,7 +6,7 @@ function Invoke-RtiKQLCommand { Executes a KQL command in a Kusto Database. .DESCRIPTION - Executes a KQL command in a Kusto Database. The KQL command is executed in the Kusto Database + Executes a KQL command in a Kusto Database. The KQL command is executed in the Kusto Database that is specified by the KQLDatabaseName or KQLDatabaseId parameter. The KQL command is executed in the context of the Fabric Real-Time Intelligence session that is established by the Connect-RTISession cmdlet. diff --git a/powerrti/Public/KQLDashboard/Get-RtiKQLDashboard.ps1 b/powerrti/Public/KQLDashboard/Get-RtiKQLDashboard.ps1 index eea8143..5a12d52 100644 --- a/powerrti/Public/KQLDashboard/Get-RtiKQLDashboard.ps1 +++ b/powerrti/Public/KQLDashboard/Get-RtiKQLDashboard.ps1 @@ -11,21 +11,21 @@ function Get-RtiKQLDashboard { parameters cannot be used together. .PARAMETER WorkspaceId - Id of the Fabric Workspace for which the KQLDashboards should be retrieved. The value for WorkspaceId is a GUID. + Id of the Fabric Workspace for which the KQLDashboards should be retrieved. The value for WorkspaceId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER KQLDashboardName The name of the KQLDashboard to retrieve. This parameter cannot be used together with KQLDashboardID. .PARAMETER KQLDashboardID - The Id of the KQLDashboard to retrieve. This parameter cannot be used together with KQLDashboardName. The value for KQLDashboardID is a GUID. + The Id of the KQLDashboard to retrieve. This parameter cannot be used together with KQLDashboardName. The value for KQLDashboardID is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .EXAMPLE Get-RTIKQLDashboard .NOTES - TODO: Add functionality to list all KQLDashboards. To do so fetch all workspaces and + TODO: Add functionality to list all KQLDashboards. To do so fetch all workspaces and then all KQLDashboards in each workspace. Revision History: @@ -54,13 +54,13 @@ begin { # You can either use Name or WorkspaceID if ($PSBoundParameters.ContainsKey("KQLDashboardName") -and $PSBoundParameters.ContainsKey("KQLDashboardId")) { - throw "Parameters KQLDashboardName and KQLDashboardId cannot be used together" + throw "Parameters KQLDashboardName and KQLDashboardId cannot be used together" } # Create KQLDashboard API - $KQLDashboardAPI = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDashboards" + $KQLDashboardAPI = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDashboards" - $KQLDashboardAPIKQLDashboardId = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDashboards/$KQLDashboardId" + $KQLDashboardAPIKQLDashboardId = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDashboards/$KQLDashboardId" } @@ -73,7 +73,7 @@ process { -Method GET ` -Uri $KQLDashboardAPIKQLDashboardId ` -ContentType "application/json" - + $response } else { diff --git a/powerrti/Public/KQLDashboard/Get-RtiKQLDashboardDefinition.ps1 b/powerrti/Public/KQLDashboard/Get-RtiKQLDashboardDefinition.ps1 index e47e1ea..09f2064 100644 --- a/powerrti/Public/KQLDashboard/Get-RtiKQLDashboardDefinition.ps1 +++ b/powerrti/Public/KQLDashboard/Get-RtiKQLDashboardDefinition.ps1 @@ -11,14 +11,14 @@ function Get-RtiKQLDashboardDefinition { This is provided as a JSON object. .PARAMETER WorkspaceId - Id of the Fabric Workspace in which the KQLDashboard exists. The value for WorkspaceId is a GUID. + Id of the Fabric Workspace in which the KQLDashboard exists. The value for WorkspaceId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER KQLDashboardName The name of the KQLDashboard to retrieve. This parameter cannot be used together with KQLDashboardID. .PARAMETER KQLDashboardID - The Id of the KQLDashboard to retrieve. This parameter cannot be used together with KQLDashboardName. The value for KQLDashboardID is a GUID. + The Id of the KQLDashboard to retrieve. This parameter cannot be used together with KQLDashboardName. The value for KQLDashboardID is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .EXAMPLE @@ -26,7 +26,7 @@ function Get-RtiKQLDashboardDefinition { -WorkspaceId "12345678-1234-1234-1234-123456789012" ` -KQLDashboardName "MyKQLDashboard" - This example retrieves the KQLDashboard Definition for the KQLDashboard named "MyKQLDashboard" in the + This example retrieves the KQLDashboard Definition for the KQLDashboard named "MyKQLDashboard" in the Workspace with the ID "12345678-1234-1234-1234-123456789012". .EXAMPLE @@ -36,10 +36,10 @@ function Get-RtiKQLDashboardDefinition { $db[0].payload | ` Set-Content ` - -Path "C:\temp\mydashboard.json" + -Path "C:\temp\mydashboard.json" This example retrieves the KQLDashboard Definition for the KQLDashboard named "MyKQLDashboard" in the - Workspace with the ID "12345678-1234-1234-1234-123456789012". + Workspace with the ID "12345678-1234-1234-1234-123456789012". The definition is saved to a file named "mydashboard.json". @@ -73,13 +73,13 @@ begin { # You can either use Name or WorkspaceID if ($PSBoundParameters.ContainsKey("KQLDashboardName") -and $PSBoundParameters.ContainsKey("KQLDashboardId")) { - throw "Parameters KQLDashboardName and KQLDashboardId cannot be used together" + throw "Parameters KQLDashboardName and KQLDashboardId cannot be used together" } # Create KQLDashboard API - $KQLDashboardAPI = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDashboards" + $KQLDashboardAPI = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDashboards" - $KQLDashboardAPIKQLDashboardId = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDashboards/$KQLDashboardId/getDefinition" + $KQLDashboardAPIKQLDashboardId = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDashboards/$KQLDashboardId/getDefinition" $body = @{ } | ConvertTo-Json ` @@ -97,7 +97,7 @@ process { -Uri $KQLDashboardAPIKQLDashboardId ` -Body $null ` -ContentType "application/json" - + $parts = $response.definition.parts foreach ($part in $parts) { diff --git a/powerrti/Public/KQLDashboard/New-RtiKQLDashboard.ps1 b/powerrti/Public/KQLDashboard/New-RtiKQLDashboard.ps1 index 74ae453..d5a3c8a 100644 --- a/powerrti/Public/KQLDashboard/New-RtiKQLDashboard.ps1 +++ b/powerrti/Public/KQLDashboard/New-RtiKQLDashboard.ps1 @@ -9,7 +9,7 @@ function New-RtiKQLDashboard { Creates a new Fabric KQLDashboard .PARAMETER WorkspaceID - Id of the Fabric Workspace for which the KQLDashboard should be created. The value for WorkspaceID is a GUID. + Id of the Fabric Workspace for which the KQLDashboard should be created. The value for WorkspaceID is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER KQLDashboardName @@ -24,12 +24,12 @@ function New-RtiKQLDashboard { -KQLDashboardName 'MyKQLDashboard' ` -KQLDashboardDescription 'This is my KQLDashboard' - This example will create a new KQLDashboard with the name 'MyKQLDashboard' and the description 'This is my KQLDashboard'. + This example will create a new KQLDashboard with the name 'MyKQLDashboard' and the description 'This is my KQLDashboard'. .NOTES Revsion History: - + - 2024-11-07 - FGE: Implemented SupportShouldProcess - 2024-11-09 - FGE: Added DisplaName as Alias for KQLDashboardName #> @@ -38,8 +38,8 @@ function New-RtiKQLDashboard { param ( [Parameter(Mandatory=$true)] - [string]$WorkspaceID, - + [string]$WorkspaceID, + [Parameter(Mandatory=$true)] [Alias("Name", "DisplayName")] [string]$KQLDashboardName, @@ -64,7 +64,7 @@ begin { -Depth 1 # Create KQLDashboard API URL - $KQLDashboardApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDashboards" + $KQLDashboardApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDashboards" } process { diff --git a/powerrti/Public/KQLDatabase/Get-RtiKQLDatabase.ps1 b/powerrti/Public/KQLDatabase/Get-RtiKQLDatabase.ps1 index 15b0405..7f83daf 100644 --- a/powerrti/Public/KQLDatabase/Get-RtiKQLDatabase.ps1 +++ b/powerrti/Public/KQLDatabase/Get-RtiKQLDatabase.ps1 @@ -6,20 +6,20 @@ function Get-RtiKQLDatabase { Retrieves Fabric KQLDatabases .DESCRIPTION - Retrieves Fabric KQLDatabases. Without the KQLDatabaseName or KQLDatabaseID parameter, + Retrieves Fabric KQLDatabases. Without the KQLDatabaseName or KQLDatabaseID parameter, all KQLDatabases are returned. If you want to retrieve a specific KQLDatabase, you can use the KQLDatabaseName or KQLDatabaseID parameter. These parameters cannot be used together. .PARAMETER WorkspaceId - Id of the Fabric Workspace for which the KQLDatabases should be retrieved. The value for WorkspaceId is a GUID. + Id of the Fabric Workspace for which the KQLDatabases should be retrieved. The value for WorkspaceId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER KQLDatabaseName The name of the KQLDatabase to retrieve. This parameter cannot be used together with KQLDatabaseID. .PARAMETER KQLDatabaseID - The Id of the KQLDatabase to retrieve. This parameter cannot be used together with KQLDatabaseName. - The value for KQLDatabaseID is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. + The Id of the KQLDatabase to retrieve. This parameter cannot be used together with KQLDatabaseName. + The value for KQLDatabaseID is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .EXAMPLE Get-RTIKQLDatabase ` @@ -31,7 +31,7 @@ function Get-RtiKQLDatabase { .EXAMPLE Get-RTIKQLDatabase - This example will retrieve all KQLDatabases in the workspace that is specified + This example will retrieve all KQLDatabases in the workspace that is specified by the WorkspaceId. .EXAMPLE @@ -42,7 +42,7 @@ function Get-RtiKQLDatabase { This example will retrieve the KQLDatabase with the ID '12345678-1234-1234-1234-123456789012'. .NOTES - TODO: Add functionality to list all KQLDatabases. To do so fetch all workspaces and + TODO: Add functionality to list all KQLDatabases. To do so fetch all workspaces and then all KQLDatabases in each workspace. Revision History: @@ -72,13 +72,13 @@ begin { # You can either use Name or WorkspaceID if ($PSBoundParameters.ContainsKey("KQLDatabaseName") -and $PSBoundParameters.ContainsKey("KQLDatabaseId")) { - throw "Parameters KQLDatabaseName and KQLDatabaseId cannot be used together" + throw "Parameters KQLDatabaseName and KQLDatabaseId cannot be used together" } # Create KQLDatabase API - $KQLDatabaseAPI = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/kqldatabases" + $KQLDatabaseAPI = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/kqldatabases" - $KQLDatabaseAPIKQLDatabaseId = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/kqldatabases/$KQLDatabaseId" + $KQLDatabaseAPIKQLDatabaseId = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/kqldatabases/$KQLDatabaseId" } diff --git a/powerrti/Public/KQLDatabase/New-RtiKQLDatabase.ps1 b/powerrti/Public/KQLDatabase/New-RtiKQLDatabase.ps1 index 2900244..36d9e89 100644 --- a/powerrti/Public/KQLDatabase/New-RtiKQLDatabase.ps1 +++ b/powerrti/Public/KQLDatabase/New-RtiKQLDatabase.ps1 @@ -10,11 +10,11 @@ function New-RtiKQLDatabase { It will be created with the specified name and description. .PARAMETER WorkspaceID - Id of the Fabric Workspace for which the KQLDatabase should be created. The value for WorkspaceID is a GUID. + Id of the Fabric Workspace for which the KQLDatabase should be created. The value for WorkspaceID is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER EventhouseID - Id of the Fabric Eventhouse for which the KQLDatabase should be created. The value for EventhouseID is a GUID. + Id of the Fabric Eventhouse for which the KQLDatabase should be created. The value for EventhouseID is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER KQLDatabaseName @@ -33,22 +33,22 @@ function New-RtiKQLDatabase { This example will create a new KQLDatabase with the name 'MyKQLDatabase' and the description 'This is my KQLDatabase'. -.NOTES - Revsion History: - - - 2024-11-07 - FGE: Implemented SupportShouldProcess - - 2024-11-09 - FGE: Added DisplaName as Alias for KQLDatabaseName +.NOTES + Revsion History: + + - 2024-11-07 - FGE: Implemented SupportShouldProcess + - 2024-11-09 - FGE: Added DisplaName as Alias for KQLDatabaseName #> [CmdletBinding(SupportsShouldProcess)] param ( [Parameter(Mandatory=$true)] - [string]$WorkspaceID, + [string]$WorkspaceID, [Parameter(Mandatory=$true)] - [string]$EventhouseID, - + [string]$EventhouseID, + [Parameter(Mandatory=$true)] [Alias("Name", "DisplayName")] [string]$KQLDatabaseName, @@ -71,12 +71,12 @@ begin { 'description' = $KQLDatabaseDescription 'creationPayload'= @{ 'databaseType' = "ReadWrite"; - 'parentEventhouseItemId' = $EventhouseId} + 'parentEventhouseItemId' = $EventhouseId} } | ConvertTo-Json ` -Depth 1 # Create KQLDatabase API URL - $KQLDatabaseApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDatabases" + $KQLDatabaseApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDatabases" } process { @@ -95,7 +95,7 @@ process { } end { - + } } \ No newline at end of file diff --git a/powerrti/Public/KQLDatabase/Remove-RtiKQLDatabase.ps1 b/powerrti/Public/KQLDatabase/Remove-RtiKQLDatabase.ps1 index 72bb0e0..442e4ef 100644 --- a/powerrti/Public/KQLDatabase/Remove-RtiKQLDatabase.ps1 +++ b/powerrti/Public/KQLDatabase/Remove-RtiKQLDatabase.ps1 @@ -9,18 +9,18 @@ function Remove-RtiKQLDatabase { Removes an existing Fabric Eventhouse. The Eventhouse is removed from the specified Workspace. .PARAMETER WorkspaceId - Id of the Fabric Workspace from which the Eventhouse should be removed. The value for WorkspaceId is a GUID. + Id of the Fabric Workspace from which the Eventhouse should be removed. The value for WorkspaceId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER EventhouseId - The Id of the Eventhouse to remove. The value for EventhouseId is a GUID. + The Id of the Eventhouse to remove. The value for EventhouseId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .EXAMPLE Remove-RtiEventhouse ` -WorkspaceId '12345678-1234-1234-1234-123456789012' ` -EventhouseId '12345678-1234-1234-1234-123456789012' - + This example will remove the Eventhouse with the Id '12345678-1234-1234-1234-123456789012'. .NOTES @@ -33,8 +33,8 @@ function Remove-RtiKQLDatabase { param ( [Parameter(Mandatory=$true)] - [string]$WorkspaceId, - + [string]$WorkspaceId, + [Parameter(Mandatory=$true)] [Alias("Id")] [string]$KQLDatabaseId @@ -48,7 +48,7 @@ begin { } # Create Eventhouse API URL - $eventhouseApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDatabases/$KQLDatabaseId" + $eventhouseApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDatabases/$KQLDatabaseId" } diff --git a/powerrti/Public/KQLDatabase/Set-RtiKQLDatabase.ps1 b/powerrti/Public/KQLDatabase/Set-RtiKQLDatabase.ps1 index 5afd973..6eaa46f 100644 --- a/powerrti/Public/KQLDatabase/Set-RtiKQLDatabase.ps1 +++ b/powerrti/Public/KQLDatabase/Set-RtiKQLDatabase.ps1 @@ -6,17 +6,17 @@ function Set-RtiKQLDatabase { Updates Properties of an existing Fabric KQLDatabase .DESCRIPTION - Updates Properties of an existing Fabric KQLDatabase. The KQLDatabase is updated + Updates Properties of an existing Fabric KQLDatabase. The KQLDatabase is updated in the specified Workspace. The KQLDatabaseId is used to identify the KQLDatabase - that should be updated. The KQLDatabaseNewName and KQLDatabaseDescription are the + that should be updated. The KQLDatabaseNewName and KQLDatabaseDescription are the properties that can be updated. .PARAMETER WorkspaceId - Id of the Fabric Workspace for which the KQLDatabase should be updated. The value for WorkspaceId is a GUID. + Id of the Fabric Workspace for which the KQLDatabase should be updated. The value for WorkspaceId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER KQLDatabaseId - The Id of the KQLDatabase to update. The value for KQLDatabaseId is a GUID. + The Id of the KQLDatabase to update. The value for KQLDatabaseId is a GUID. An example of a GUID is '12345678-1234-123-1234-123456789012'. .PARAMETER KQLDatabaseNewName @@ -38,31 +38,31 @@ function Set-RtiKQLDatabase { .NOTES Revsion History: - + - 2024-11-07 - FGE: Implemented SupportShouldProcess - 2024-11-09 - FGE: Added DisplaName as Alias for KQLDatabaseName .LINK - + #> [CmdletBinding(SupportsShouldProcess)] param ( [Parameter(Mandatory=$true)] - [string]$WorkspaceId, + [string]$WorkspaceId, [Parameter(Mandatory=$true)] [Alias("Id")] - [string]$KQLDatabaseId, - + [string]$KQLDatabaseId, + [Alias("Name", "DisplayName")] [string]$KQLDatabaseName, [Alias("Description")] [ValidateLength(0, 256)] [string]$KQLDatabaseDescription - + ) begin { @@ -87,7 +87,7 @@ begin { -Depth 1 # Create KQLDatabase API URL - $KQLDatabaseApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDatabases/$KQLDatabaseId" + $KQLDatabaseApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLDatabases/$KQLDatabaseId" } process { diff --git a/powerrti/Public/KQLQueryset/Get-RtiKQLQueryset.ps1 b/powerrti/Public/KQLQueryset/Get-RtiKQLQueryset.ps1 index 254f601..40d9dd3 100644 --- a/powerrti/Public/KQLQueryset/Get-RtiKQLQueryset.ps1 +++ b/powerrti/Public/KQLQueryset/Get-RtiKQLQueryset.ps1 @@ -7,19 +7,19 @@ function Get-RtiKQLQueryset { .DESCRIPTION Retrieves Fabric KQLQuerysets. Without the KQLQuerysetName or KQLQuerysetId parameter, - all KQLQuerysets are returned in the given Workspace. If you want to retrieve a specific + all KQLQuerysets are returned in the given Workspace. If you want to retrieve a specific KQLQueryset, you can use the KQLQuerysetName or KQLQuerysetId parameter. These parameters cannot be used together. .PARAMETER WorkspaceId - Id of the Fabric Workspace for which the KQLQuerysets should be retrieved. The value for WorkspaceId is a GUID. + Id of the Fabric Workspace for which the KQLQuerysets should be retrieved. The value for WorkspaceId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. This parameter is mandatory. .PARAMETER KQLQuerysetName The name of the KQLQueryset to retrieve. This parameter cannot be used together with KQLQuerysetId. .PARAMETER KQLQuerysetId - The Id of the KQLQueryset to retrieve. This parameter cannot be used together with KQLQuerysetName. + The Id of the KQLQueryset to retrieve. This parameter cannot be used together with KQLQuerysetName. The value for KQLQuerysetId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .EXAMPLE @@ -33,7 +33,7 @@ function Get-RtiKQLQueryset { Get-RtiKQLQueryset ` -WorkspaceId '12345678-1234-1234-1234-123456789012' - This example will retrieve all KQLQuerysets in the workspace that is specified + This example will retrieve all KQLQuerysets in the workspace that is specified by the WorkspaceId. .EXAMPLE @@ -44,7 +44,7 @@ function Get-RtiKQLQueryset { This example will retrieve the KQLQueryset with the ID '12345678-1234-1234-1234-123456789012'. .NOTES - TODO: Add functionality to list all KQLQuerysets. To do so fetch all workspaces and + TODO: Add functionality to list all KQLQuerysets. To do so fetch all workspaces and then all KQLQuerysets in each workspace. Revision History: @@ -74,13 +74,13 @@ begin { # You can either use Name or WorkspaceID if ($PSBoundParameters.ContainsKey("KQLQuerysetName") -and $PSBoundParameters.ContainsKey("KQLQuerysetId")) { - throw "Parameters KQLQuerysetName and KQLQuerysetId cannot be used together" + throw "Parameters KQLQuerysetName and KQLQuerysetId cannot be used together" } # Create KQLQueryset API - $KQLQuerysetAPI = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLQuerysets" + $KQLQuerysetAPI = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLQuerysets" - $KQLQuerysetAPIKQLQuerysetId = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLQuerysets/$KQLQuerysetId" + $KQLQuerysetAPIKQLQuerysetId = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLQuerysets/$KQLQuerysetId" } @@ -93,7 +93,7 @@ process { -Method GET ` -Uri $KQLQuerysetAPIKQLQuerysetId ` -ContentType "application/json" - + $response } else { diff --git a/powerrti/Public/KQLQueryset/Remove-RtiKQLQueryset.ps1 b/powerrti/Public/KQLQueryset/Remove-RtiKQLQueryset.ps1 index 481dbc0..3e76b60 100644 --- a/powerrti/Public/KQLQueryset/Remove-RtiKQLQueryset.ps1 +++ b/powerrti/Public/KQLQueryset/Remove-RtiKQLQueryset.ps1 @@ -9,13 +9,13 @@ function Remove-RtiKQLQueryset { Removes an existing Fabric KQLQueryset. The Eventhouse is identified by the WorkspaceId and KQLQuerysetId. .PARAMETER WorkspaceId - Id of the Fabric Workspace for which the KQLQueryset should be removed. The value for WorkspaceId is a GUID. + Id of the Fabric Workspace for which the KQLQueryset should be removed. The value for WorkspaceId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. This parameter is mandatory. .PARAMETER KQLQuerysetId The Id of the KQLQueryset to remove. The value for KQLQuerysetId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. This parameter is mandatory. - + .EXAMPLE Remove-RtiKQLQueryset ` -WorkspaceId '12345678-1234-1234-1234-123456789012' ` @@ -35,8 +35,8 @@ function Remove-RtiKQLQueryset { param ( [Parameter(Mandatory=$true)] - [string]$WorkspaceId, - + [string]$WorkspaceId, + [Parameter(Mandatory=$true)] [Alias("Id")] [string]$KQLQuerysetId @@ -50,7 +50,7 @@ begin { } # Create Eventhouse API URL - $eventhouseApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLQuerysets/$KQLQuerysetId" + $eventhouseApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLQuerysets/$KQLQuerysetId" } diff --git a/powerrti/Public/KQLQueryset/Set-RtiKQLQueryset.ps1 b/powerrti/Public/KQLQueryset/Set-RtiKQLQueryset.ps1 index a973d90..a5204a9 100644 --- a/powerrti/Public/KQLQueryset/Set-RtiKQLQueryset.ps1 +++ b/powerrti/Public/KQLQueryset/Set-RtiKQLQueryset.ps1 @@ -6,11 +6,11 @@ function Set-RtiKQLQueryset { Updates Properties of an existing Fabric KQLQueryset .DESCRIPTION - Updates Properties of an existing Fabric KQLQueryset. The KQLQueryset is identified by + Updates Properties of an existing Fabric KQLQueryset. The KQLQueryset is identified by the WorkspaceId and KQLQuerysetId. .PARAMETER WorkspaceId - Id of the Fabric Workspace for which the KQLQueryset should be updated. The value for WorkspaceId is a GUID. + Id of the Fabric Workspace for which the KQLQueryset should be updated. The value for WorkspaceId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. This parameter is mandatory. .PARAMETER KQLQuerysetId @@ -36,7 +36,7 @@ function Set-RtiKQLQueryset { .NOTES Revsion History: - + - 2024-11-07 - FGE: Implemented SupportShouldProcess - 2024-11-09 - FGE: Added NewDisplaName as Alias for KQLQuerysetNewName @@ -48,12 +48,12 @@ function Set-RtiKQLQueryset { param ( [Parameter(Mandatory=$true)] - [string]$WorkspaceId, + [string]$WorkspaceId, [Parameter(Mandatory=$true)] [Alias("Id")] - [string]$KQLQuerysetId, - + [string]$KQLQuerysetId, + [Alias("NewName", "NewDisplayName")] [string]$KQLQuerysetNewName, @@ -85,7 +85,7 @@ begin { -Depth 1 # Create KQLQueryset API URL - $KQLQuerysetApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLQuerysets/$KQLQuerysetId" + $KQLQuerysetApiUrl = "$($RTISession.BaseFabricUrl)/v1/workspaces/$WorkspaceId/KQLQuerysets/$KQLQuerysetId" } process { diff --git a/powerrti/Public/Workspace/Get-RTIWorkspace.ps1 b/powerrti/Public/Workspace/Get-RTIWorkspace.ps1 index da29550..b6bd9f9 100644 --- a/powerrti/Public/Workspace/Get-RTIWorkspace.ps1 +++ b/powerrti/Public/Workspace/Get-RTIWorkspace.ps1 @@ -8,28 +8,28 @@ function Get-RtiWorkspace { .DESCRIPTION Retrieves Fabric Workspaces. Without the WorkspaceName or WorkspaceID parameter, all Workspaces are returned. If you want to retrieve a specific Workspace, you can - use the WorkspaceName, an CapacityID, a WorkspaceType, a WorkspaceState or the WorkspaceID + use the WorkspaceName, an CapacityID, a WorkspaceType, a WorkspaceState or the WorkspaceID parameter. The WorkspaceId parameter has precedence over all other parameters because it is most specific. .PARAMETER WorkspaceId - Id of the Fabric Workspace to retrieve. The value for WorkspaceId is a GUID. + Id of the Fabric Workspace to retrieve. The value for WorkspaceId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER WorkspaceName - The name of the Workspace to retrieve. This parameter cannot be used together with WorkspaceID. + The name of the Workspace to retrieve. This parameter cannot be used together with WorkspaceID. .PARAMETER WorkspaceCapacityId - The Id of the Capacity to retrieve. This parameter cannot be used together with WorkspaceID. - The value for WorkspaceCapacityId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. + The Id of the Capacity to retrieve. This parameter cannot be used together with WorkspaceID. + The value for WorkspaceCapacityId is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER WorkspaceType - The type of the Workspace to retrieve. This parameter cannot be used together with WorkspaceID. + The type of the Workspace to retrieve. This parameter cannot be used together with WorkspaceID. The value for WorkspaceType is a string. An example of a string is 'Personal'. The values that can be used are 'Personal', 'Workspace' and 'Adminworkspace'. .PARAMETER WorkspaceState - The state of the Workspace to retrieve. This parameter cannot be used together with WorkspaceID. + The state of the Workspace to retrieve. This parameter cannot be used together with WorkspaceID. The value for WorkspaceState is a string. An example of a string is 'active'. The values that can be used are 'active' and 'deleted'. @@ -96,7 +96,6 @@ function Get-RtiWorkspace { [ValidateSet("active", "deleted")] [Alias("State")] [string]$WorkspaceState - ) begin { @@ -107,16 +106,16 @@ begin { } # WorkspaceID has to be used alone - if ($PSBoundParameters.ContainsKey("WorkspaceName") -and + if ($PSBoundParameters.ContainsKey("WorkspaceName") -and ($PSBoundParameters.ContainsKey("WorkspaceID") ` -or $PSBoundParameters.ContainsKey("WorkspaceCapcityId") ` -or $PSBoundParameters.ContainsKey("WorkspaceType") ` -or $PSBoundParameters.ContainsKey("WorkspaceState"))) { - throw "Parameters WorkspaceName, WorkspaceCapacityId, WorkspaceType or WorkspaceState and WorkspaceID cannot be used together!" + throw "Parameters WorkspaceName, WorkspaceCapacityId, WorkspaceType or WorkspaceState and WorkspaceID cannot be used together!" } # Create Workspace API URL - $workspaceApiUrl = "$($RTISession.BaseFabricUrl)/v1/admin/workspaces" + $workspaceApiUrl = "$($RTISession.BaseFabricUrl)/v1/admin/workspaces" # Create URL for WebAPI Call if WorkspaceID is provided if ($PSBoundParameters.ContainsKey("WorkspaceID")) { diff --git a/powerrti/Public/Workspace/New-RtiWorkspace.ps1 b/powerrti/Public/Workspace/New-RtiWorkspace.ps1 index cfc82ff..cc638d6 100644 --- a/powerrti/Public/Workspace/New-RtiWorkspace.ps1 +++ b/powerrti/Public/Workspace/New-RtiWorkspace.ps1 @@ -9,7 +9,7 @@ function New-RtiWorkspace { Creates a new Fabric Workspace .PARAMETER CapacityID - Id of the Fabric Capacity for which the Workspace should be created. The value for CapacityID is a GUID. + Id of the Fabric Capacity for which the Workspace should be created. The value for CapacityID is a GUID. An example of a GUID is '12345678-1234-1234-1234-123456789012'. .PARAMETER WorkspaceName @@ -24,7 +24,7 @@ function New-RtiWorkspace { -WorkspaceName 'TestWorkspace' ` -WorkspaceDescription 'This is a Test Workspace' - This example will create a new Workspace with the name 'TestWorkspace' and the description 'This is a test workspace'. + This example will create a new Workspace with the name 'TestWorkspace' and the description 'This is a test workspace'. .NOTES @@ -32,7 +32,7 @@ function New-RtiWorkspace { [CmdletBinding(SupportsShouldProcess)] param ( - + [Parameter(Mandatory=$true)] [string]$CapacityId,