Skip to content

Commit

Permalink
CertTrustList: Add -details for get Certificat Trust List detail
Browse files Browse the repository at this point in the history
with subject_DN, issue_date, expiry_date, signature_algorithm...
  • Loading branch information
alagoutte committed Jan 8, 2024
1 parent 1c26962 commit 316dc16
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions PowerArubaCP/Public/CertTrustList.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ function Get-ArubaCPCertTrustList {
Get ALL Certificate Trusted Lists on the Clearpass
.EXAMPLE
Get-ArubaCPCertTrustList -details
Get ALL Certificate Trusted Lists with details (subject_DN, issue_date, expiry_date, signature_algorithm...) on the Clearpass
.EXAMPLE
Get-ArubaCPCertTrustList -id 23
Expand All @@ -29,15 +34,17 @@ function Get-ArubaCPCertTrustList {
Get info about Cert Trust List where cert usage contains Aruba
.EXAMPLE
Get-ArubaCPCertTrustList -filter_attribute enabled -filter_type equal -filter_value True
Get-ArubaCPCertTrustList -details -filter_attribute enabled -filter_type equal -filter_value True
Get info about Cert Trust List where enabled equal True
Get info about Cert Trust List details where enabled equal True
#>

[CmdLetBinding(DefaultParameterSetName = "Default")]

Param(
[Parameter (Mandatory = $false)]
[switch]$details,
[Parameter (Mandatory = $false)]
[Parameter (ParameterSetName = "id")]
[int]$id,
Expand Down Expand Up @@ -101,8 +108,13 @@ function Get-ArubaCPCertTrustList {
$filter = @{ $filter_attribute = $filter_value }
$invokeParams.add( 'filter', $filter )
}
if ($details) {
$uri = "api/cert-trust-list-details"
}
else {
$uri = "api/cert-trust-list"
}

$uri = "api/cert-trust-list"

$ctl = Invoke-ArubaCPRestMethod -method "GET" -uri $uri @invokeParams -connection $connection
$ctl._embedded.items
Expand Down

0 comments on commit 316dc16

Please sign in to comment.