Public/Get-RecoveryPlan.ps1

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


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

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

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