'Update an existing Health Check
:param zone: The healthcheck which has to be updated
:type zone: :class:`AuroraDNSHealthCheck`
:param type: (optional) The type of health check to be created
:type  type: :class:`AuroraDNSHealthCheckType`
:param hostname: (optional) The hostname of the target to monitor
:type  hostname: ``str``
:param ipaddress: (optional) The IP Address of the target to monitor.
You can pass a empty string if this is not required.
:type  ipaddress: ``str``
:param port: (optional) The port of the target to monitor. E.g. 80
for HTTP
:type  port: ``int``
:param path: (optional) The path of the target to monitor.
Only used by HTTP at this moment. Usually just \'/\'.
:type  path: ``str``
:param interval: (optional) The interval of checks.
10, 30 or 60 seconds.
:type  interval: ``int``
:param threshold: (optional) The threshold of failures before the
healthcheck is marked as failed.
:type  threshold: ``int``
:param enabled: (optional) If this healthcheck is enabled to run
:type  enabled: ``bool``
:param extra: (optional) Extra attributes (driver specific).
:type  extra: ``dict``
:return: :class:`AuroraDNSHealthCheck`'

def ex_update_healthcheck(self, healthcheck, type=None, hostname=None, ipaddress=None, port=None, path=None, interval=None, threshold=None, enabled=None, extra=None):

    cdata = {}
    if (type is not None):
        cdata['type'] = self.HEALTHCHECK_TYPE_MAP[type]
    if (hostname is not None):
        cdata['hostname'] = hostname
    if (ipaddress is not None):
        if (len(ipaddress) == 0):
            cdata['ipaddress'] = None
        else:
            cdata['ipaddress'] = ipaddress
    if (port is not None):
        cdata['port'] = int(port)
    if (path is not None):
        cdata['path'] = path
    if (interval is not None):
        cdata['interval'] = int(interval)
    if (threshold is not None):
        cdata['threshold'] = threshold
    if (enabled is not None):
        cdata['enabled'] = bool(enabled)
    self.connection.set_context({'resource': 'healthcheck', 'id': healthcheck.id})
    self.connection.request(('/zones/%s/health_checks/%s' % (healthcheck.zone.id, healthcheck.id)), method='PUT', data=json.dumps(cdata))
    return self.ex_get_healthcheck(healthcheck.zone, healthcheck.id)
