CoreOps/System/Get-SDPSystemJbods.ps1

<#
    .SYNOPSIS
    Retrieves JBOD enclosure state from the SDP.

    .DESCRIPTION
    Queries the `system/jbods` endpoint. Filter by name, id, connectivity
    state, FRU/phased-out flags, NDU state, etc.

    .EXAMPLE
    Get-SDPSystemJbods

    .NOTES
    Authored by J.R. Phillips (GitHub: JayAreP)

    .LINK
    https://github.com/silk-us/silk-sdp-powershell-sdk
#>


function Get-SDPSystemJbods {
    [CmdletBinding()]
    param(
        [parameter()]
        [Alias("ConnectivityState")]
        [string] $connectivity_state,
        [parameter()]
        [Alias("ContainedIn")]
        [string] $contained_in,
        [parameter()]
        [int] $id,
        [parameter()]
        [Alias("IsExpansionInProgress")]
        [bool] $is_expansion_in_progress,
        [parameter()]
        [Alias("IsFru")]
        [bool] $is_fru,
        [parameter()]
        [Alias("IsIdentificationOn")]
        [bool] $is_identification_on,
        [parameter()]
        [Alias("IsPhasedOut")]
        [bool] $is_phased_out,
        [parameter()]
        [string] $name,
        [parameter()]
        [Alias("NduState")]
        [string] $ndu_state,
        [parameter()]
        [switch] $doNotResolve,
        [parameter()]
        [string] $context = "sdpconnection"
    )

    begin {
        $endpoint = "system/jbods"
    }

    process {
        $PSBoundParameters.Remove('doNotResolve') | Out-Null

        $results = Invoke-SDPRestCall -endpoint $endpoint -method GET -parameterList $PSBoundParameters -context $context -strictURI |
            Add-SDPTypeName -TypeName 'SDPSystemJbod'

        if ($doNotResolve) { return $results }
        return ($results | Update-SDPRefObjects -context $context)
    }
}