Skip to content

Commit 5209f05

Browse files
committed
Implemented Retrieving of FC identify
1 parent caa6b1f commit 5209f05

File tree

1 file changed

+58
-3
lines changed

1 file changed

+58
-3
lines changed

src/OnCommand-Insight.psm1

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5059,7 +5059,7 @@ function Global:Update-OciAnnotation {
50595059
$Result = ParseJsonString -json $Result.Trim()
50605060
}
50615061

5062-
Write-Output $Result
5062+
Write-Output $Result
50635063
}
50645064
}
50655065

@@ -6401,7 +6401,7 @@ function Global:Bulk-OciAssignApplicationToAssets {
64016401
if (!$assets) {
64026402
throw "No Assets specified!"
64036403
}
6404-
6404+
64056405
$switchparameters=@()
64066406
foreach ($parameter in $switchparameters) {
64076407
if ((Get-Variable $parameter).Value) {
@@ -16116,7 +16116,7 @@ function Global:Get-OciAnnotationsByQtree {
1611616116

1611716117
if ($Definition) {
1611816118
$Uri += "?expand=definition"
16119-
}
16119+
}
1612016120

1612116121
try {
1612216122
$Result = Invoke-RestMethod -WebSession $Server.Session -TimeoutSec $Server.Timeout -Method GET -Uri $Uri -Headers $Server.Headers
@@ -31137,6 +31137,61 @@ function Global:Search-Oci {
3113731137
}
3113831138
}
3113931139

31140+
## identifications ##
31141+
31142+
<#
31143+
.SYNOPSIS
31144+
Retrieve FC Identify
31145+
.DESCRIPTION
31146+
Retrieve FC Identify
31147+
.PARAMETER expand
31148+
Expand parameter for underlying JSON object (e.g. expand=acquisitionUnit)
31149+
.PARAMETER server
31150+
OCI Server to connect to
31151+
#>
31152+
function Global:Get-OciFcIdentify {
31153+
[CmdletBinding()]
31154+
31155+
PARAM (
31156+
[parameter(Mandatory=$False,
31157+
Position=0,
31158+
HelpMessage="Expand parameter for underlying JSON object (e.g. expand=acquisitionUnit)")][String]$expand,
31159+
[parameter(Mandatory=$False,
31160+
Position=1,
31161+
HelpMessage="OnCommand Insight Server.")]$Server=$CurrentOciServer
31162+
)
31163+
31164+
Begin {
31165+
$Result = $null
31166+
if (!$Server) {
31167+
throw "Server parameter not specified and no global OCI Server available. Run Connect-OciServer first!"
31168+
}
31169+
}
31170+
31171+
Process {
31172+
$Uri = $Server.BaseUri + "/rest/v1/identifications/fc"
31173+
31174+
if ($expand) {
31175+
$Uri += "?$($Separator)expand=$expand"
31176+
}
31177+
31178+
try {
31179+
$Result = Invoke-RestMethod -WebSession $Server.Session -TimeoutSec $Server.Timeout -Method GET -Uri $Uri -Headers $Server.Headers
31180+
}
31181+
catch {
31182+
$ResponseBody = ParseExceptionBody -Response $_.Exception.Response
31183+
Write-Error "GET to $Uri failed with Exception $($_.Exception.Message) `n $responseBody"
31184+
}
31185+
31186+
if (([String]$Result).Trim().startsWith('{') -or ([String]$Result).toString().Trim().startsWith('[')) {
31187+
$Result = ParseJsonString -json $Result.Trim
31188+
}
31189+
31190+
#$Datasources = ParseDatasources -Datasources $Result -Timezone $Server.Timezone
31191+
Write-Output $Result
31192+
}
31193+
}
31194+
3114031195
### Experimental Cmdlets ###
3114131196

3114231197
<#

0 commit comments

Comments
 (0)