Public/Get-IdentityProvider.ps1

<#
    .DESCRIPTION
    Wrapper for Nutanix API version 0.3.
 
    .NOTES
    Author: Timothy Rasiah
#>


function Get-IdentityProvider {
    [CmdletBinding()]
    param (
        $uuid
    )
    
    if ($uuid) {
        $response = Send-Request -method "GET" -endpoint "/identity_providers/$($uuid)"
        return $response
    }

    $data = @{
        "kind" = "identity_provider"
    }

    $response = Send-Request -method "POST" -endpoint "/identity_providers/list" -data $data
    return $response.entities
}