Public/Targets/Get-SIASSHHostKeyFingerprint.ps1

function Get-SIASSHHostKeyFingerprint {
    <#
    .SYNOPSIS
        Retrieves the trusted SSH host key fingerprint for a target.
    .DESCRIPTION
        Retrieves the fingerprint SIA validates against when connecting to a
        Linux target over SSH.
    .PARAMETER TargetId
        The target's ID.
    .EXAMPLE
        Get-SIASSHHostKeyFingerprint -TargetId 'target-01'

        Retrieves the trusted fingerprint recorded for the specified target.
    .INPUTS
        None.
    .OUTPUTS
        psSIA.SSHHostKeyFingerprint
    .LINK
        https://api-docs.cyberark.com/secure-infra-access/docs/sia-ssh-host-key-fingerprints-api
    #>

    [CmdletBinding()]
    [OutputType('psSIA.SSHHostKeyFingerprint')]
    param(
        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [Alias('target_id')]
        [string]$TargetId
    )

    process {
        Invoke-SIARequest -Method GET -Path "/api/ssh-fingerprints/$TargetId" |
            ConvertFrom-SIAResponse -TypeName 'psSIA.SSHHostKeyFingerprint'
    }
}