Public/Policies/Get-SIAAccessPolicy.ps1

function Get-SIAAccessPolicy {
    <#
    .SYNOPSIS
        Lists or retrieves legacy SIA VM access policies.
    .DESCRIPTION
        Retrieves policies from SIA's original "Recurring access policies"
        engine. This only applies to tenants whose SIA portal still shows
        that page; tenants migrated to the unified Access Control Policies
        experience should use Get-SIAPolicy instead. See
        docs/API-COMPATIBILITY.md for the split between the two.
    .PARAMETER Id
        Retrieves a single policy by its ID.
    .EXAMPLE
        Get-SIAAccessPolicy

        Lists every legacy access policy on the tenant.
    .INPUTS
        None.
    .OUTPUTS
        psSIA.AccessPolicy
    .LINK
        https://docs.cyberark.com/setup/latest/en/content/privileged-access/apis/dpa_policies.htm
    #>

    [CmdletBinding(DefaultParameterSetName = 'List')]
    [OutputType('psSIA.AccessPolicy')]
    param(
        [Parameter(Mandatory, ParameterSetName = 'ById', ValueFromPipelineByPropertyName)]
        [Alias('policy_id')]
        [string]$Id
    )

    process {
        $path = if ($Id) { "/api/access-policies/$Id" } else { '/api/access-policies' }
        Invoke-SIARequest -Method GET -Path $path | ConvertFrom-SIAResponse -TypeName 'psSIA.AccessPolicy'
    }
}