Public/Get-RecoveryPlanJob.ps1

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


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

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

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