protected function listHealthChecks($healthId = null)
{
$marker = null;
$healthChecks = [];
do {
if (isset($checkList)) {
$marker = new MarkerType($checkList->marker);
}
$checkList = $this->getAws()->route53->health->describe($marker);
foreach ($checkList as $check) {
if (property_exists($check, 'healthId')) {
$checkResult = ['healthId' => $check->healthId, 'protocol' => $check->healthConfig->type, 'ipAddress' => $check->healthConfig->ipAddress, 'port' => $check->healthConfig->port, 'resourcePath' => ltrim($check->healthConfig->resourcePath, '/')];
if ($healthId == $check->healthId) {
$currentHealthCheck = $checkResult;
continue;
}
$healthChecks[] = $checkResult;
}
}
} while ($checkList->marker !== null);
if (isset($currentHealthCheck)) {
$healthChecks = array_merge([$currentHealthCheck], $healthChecks);
}
return $healthChecks;
}