Skip to content
Merged
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
60 changes: 60 additions & 0 deletions PsLogicAppExtractor/internal/tasks/All/All.task.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,66 @@ Task -Name "Export-LogicApp.AzCli" @parm -Action {
Out-TaskFile -Content $res
}

#Original file: Export-Raw.ManagedApis.DisplayName.AzAccount.task.ps1
$parm = @{
Description = @"
Loops all `$connections childs
-Exports the DisplayName of the ManagedApis based on the ConnectionId / ResourceId
--Sets connectionName to the DisplayName, extracted via the ConnectionId
Requires an authenticated Az.Accounts session
"@
Alias = "Exporter.Export-Raw.ManagedApis.DisplayName.AzAccount"
}

Task -Name "Export-Raw.ManagedApis.DisplayName.AzAccount" @parm -Action {
Set-TaskWorkDirectory

$lgObj = Get-TaskWorkObject
$lgObj.properties.parameters.'$connections'.value.PsObject.Properties | ForEach-Object {
if ($_.Value.id -like "*managedApis*") {

$uri = "{0}?api-version=2018-07-01-preview" -f $($_.Value.connectionId)

$resObj = Invoke-AzRestMethod -Path $uri -Method Get | Select-Object -ExpandProperty content | ConvertFrom-Json

$conName = $resObj.Properties.DisplayName
$_.Value.connectionName = $conName
}
}

Out-TaskFileLogicApp -InputObject $lgObj
}

#Original file: Export-Raw.ManagedApis.DisplayName.AzCli.task.ps1
$parm = @{
Description = @"
Loops all `$connections childs
-Exports the DisplayName of the ManagedApis based on the ConnectionId / ResourceId
--Sets connectionName to the DisplayName, extracted via the ConnectionId
Requires an authenticated Az.Accounts session
"@
Alias = "Exporter.Export-Raw.ManagedApis.DisplayName.AzCli"
}

Task -Name "Export-Raw.ManagedApis.DisplayName.AzCli" @parm -Action {
Set-TaskWorkDirectory

$lgObj = Get-TaskWorkObject
$lgObj.properties.parameters.'$connections'.value.PsObject.Properties | ForEach-Object {
if ($_.Value.id -like "*managedApis*") {

$uri = "{0}?api-version=2018-07-01-preview" -f $($_.Value.connectionId)

$resObj = az rest --url $uri | ConvertFrom-Json

$conName = $resObj.Properties.DisplayName
$_.Value.connectionName = $conName
}
}

Out-TaskFileLogicApp -InputObject $lgObj
}

#Original file: Set-Arm.Connections.ManagedApis.AsParameter.task.ps1
$parm = @{
Description = @"
Expand Down