o |nh @s4dZddlmZmZddlmZGdddeZdS)z4Support for "Health"-related System Backend Methods.) exceptionsutils)SystemBackendMixinc@s*eZdZdZ        dddZdS)HealthzI. Reference: https://www.vaultproject.io/api-docs/system/health NHEADc Csvt|||||||d} |dkrtd} |jj| ddS|dkr0td} |jj| | ddSdj|d } t| ) aBRead the health status of Vault. This matches the semantics of a Consul HTTP health check and provides a simple way to monitor the health of a Vault instance. :param standby_ok: Specifies if being a standby should still return the active status code instead of the standby status code. This is useful when Vault is behind a non-configurable load balance that just wants a 200-level response. :type standby_ok: bool :param active_code: The status code that should be returned for an active node. :type active_code: int :param standby_code: Specifies the status code that should be returned for a standby node. :type standby_code: int :param dr_secondary_code: Specifies the status code that should be returned for a DR secondary node. :type dr_secondary_code: int :param performance_standby_code: Specifies the status code that should be returned for a performance standby node. :type performance_standby_code: int :param sealed_code: Specifies the status code that should be returned for a sealed node. :type sealed_code: int :param uninit_code: Specifies the status code that should be returned for a uninitialized node. :type uninit_code: int :param method: Supported methods: HEAD: /sys/health. Produces: 000 (empty body) GET: /sys/health. Produces: 000 application/json :type method: str | unicode :return: The JSON response of the request. :rtype: requests.Response ) standbyok activecode standbycodedrsecondarycodeperformancestandbycode sealedcode uninitcoderz/v1/sys/healthF)urlraise_exceptionGET)rparamsrzS"method" parameter provided invalid value; HEAD or GET allowed, "{method}" provided)method) r remove_nones format_url_adapterheadgetformatrParamValidationError) self standby_ok active_code standby_codedr_secondary_codeperformance_standby_code sealed_code uninit_coderrapi_path error_messager$I/usr/local/lib/python3.10/dist-packages/hvac/api/system_backend/health.pyread_health_status s6)   zHealth.read_health_status)NNNNNNNr)__name__ __module__ __qualname____doc__r&r$r$r$r%rsrN)r*hvacrr,hvac.api.system_backend.system_backend_mixinrrr$r$r$r%s