get_healthcheck¶
- ManagementApi.get_healthcheck(role_id, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Check health of AWS resources
Returns DWH, OpenSearch, S3, SSM, DynamoDB, Squid proxy, and SMTP status. Requires system-settings.view. Individual probes that fail are returned as undetermined or not available, not as HTTP 500.
- Parameters:
role_id (str) – Amorphic role ID the request is authorized against. Must be a role the user belongs to. Also recorded in audit logs. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: GET /healthcheck
Success (HTTP 200)¶
Health status object. Probe failures are values on that object, not an error response.
Request / response example
{
"DWHHealth": "available",
"DWHMaintenanceWindow": "sun:05:00-sun:05:30",
"OpenSearchHealth": "green",
"S3Health": "available",
"SystemsManagerHealth": "available",
"DynamodbHealth": "active",
"SquidProxyHealth": "available",
"DWH": "redshift",
"SMTP": "available"
}
Errors¶
Documented error codes: AUTH-1001, AUTH-1030, GE-1014.
HTTP 400
Authorization failure. Body is {“Message”: “<CODE> - <text>”}. Codes: AUTH-1001 (missing role_id), AUTH-1030 (missing system-settings.view).
role_id header missing
{
"Message": "AUTH-1001 - Missing role information in event header"
}
Caller lacks system-settings.view
{
"Message": "AUTH-1030 - User is not authorized to check the health of aws resources due to the following missing permission(s) - {'System Settings': ['view']}"
}
HTTP 500
Uncaught handler failure. Body is {“Message”: “GE-1014 - Failed to perform the health check on resources, try again later.”}.
Request / response example
{
"Message": "GE-1014 - Failed to perform the health check on resources, try again later."
}