Skip to main content
POST
/
cloud
/
v1
/
lbpools
/
{project_id}
/
{region_id}
/
{pool_id}
/
healthmonitor
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
task_id_list = client.cloud.load_balancers.pools.health_monitors.create(
    pool_id="00000000-0000-4000-8000-000000000000",
    project_id=1,
    region_id=1,
    delay=10,
    max_retries=2,
    api_timeout=5,
    type="HTTP",
)
print(task_id_list.tasks)
{
  "tasks": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

Example:

1

region_id
integer
required

Region ID

Example:

1

pool_id
string<uuid4>
required

Pool ID

Example:

"00000000-0000-4000-8000-000000000000"

Body

application/json
delay
integer
required

The time, in seconds, between sending probes to members

Required range: 1 <= x <= 2147483647
Example:

10

max_retries
integer
required

Number of successes before the member is switched to ONLINE state

Required range: 1 <= x <= 10
Example:

2

timeout
integer
required

The maximum time to connect. Must be less than the delay value

Required range: x <= 2147483
Example:

5

type
enum<string>
required

Health monitor type. Once health monitor is created, cannot be changed.

Available options:
HTTP,
HTTPS,
K8S,
PING,
TCP,
TLS-HELLO,
UDP-CONNECT
Examples:

"HTTP"

"HTTPS"

"PING"

"TCP"

"TLS_HELLO"

"UDP_CONNECT"

"K8S"

admin_state_up
boolean

Administrative state of the resource. When set to true, the resource is enabled and operational. When set to false, the resource is disabled and will not process traffic. Defaults to true.

Examples:

true

false

expected_codes
string | null

Expected HTTP response codes. Can be a single code or a range of codes. Can only be used together with HTTP or HTTPS health monitor type. For example, 200,202,300-302,401,403,404,500-504. If not specified, the default is 200.

Example:

"200,301,302"

http_method
enum<string> | null

HTTP method. Can only be used together with HTTP or HTTPS health monitor type.

Available options:
CONNECT,
DELETE,
GET,
HEAD,
OPTIONS,
PATCH,
POST,
PUT,
TRACE
Example:

"CONNECT"

max_retries_down
integer

Number of failures before the member is switched to ERROR state.

Required range: 1 <= x <= 10
Example:

2

url_path
string | null

URL Path. Defaults to '/'. Can only be used together with HTTP or HTTPS health monitor type.

Minimum string length: 1
Example:

"/"

Response

200 - application/json

OK

tasks
string[]
required

List of task IDs representing asynchronous operations. Use these IDs to monitor operation progress:

  • GET /v1/tasks/{task_id} - Check individual task status and details Poll task status until completion (FINISHED/ERROR) before proceeding with dependent operations.
Example:
["d478ae29-dedc-4869-82f0-96104425f565"]