Public/Connectors/Get-SIAHttpsRelay.ps1
|
function Get-SIAHttpsRelay { <# .SYNOPSIS Lists SIA HTTPS relays. .DESCRIPTION Retrieves every HTTPS relay registered on the tenant, following continuation tokens automatically unless -NoAutoPaging is specified or auto-pagination is turned off in Set-SIAModuleConfiguration. .PARAMETER NoAutoPaging Return only the first page of results instead of retrieving every page. .EXAMPLE Get-SIAHttpsRelay Lists every HTTPS relay on the tenant. .INPUTS None. .OUTPUTS psSIA.HttpsRelay .LINK https://api-docs.cyberark.com/secure-infra-access/docs/sia-connector-api #> [CmdletBinding()] [OutputType('psSIA.HttpsRelay')] param( [switch]$NoAutoPaging ) $stopAfterFirstPage = $NoAutoPaging -or -not $script:SIAModuleConfig.AutoPagination $firstPage = Invoke-SIARequest -Method GET -Path '/api/https-relays' Get-SIAPagination -FirstPage $firstPage -NoAutoPaging:$stopAfterFirstPage -NextPageRequest { param($token) Invoke-SIARequest -Method GET -Path '/api/https-relays' -QueryParameter @{ continuationToken = $token } } | ForEach-Object { $_.items } | ConvertFrom-SIAResponse -TypeName 'psSIA.HttpsRelay' } |