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": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}

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

Examples:

1

region_id
integer
required

Region ID

Required range: x > 0
Examples:

1

pool_id
string<uuid4>
required

Pool ID

Examples:

"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
Examples:

10

max_retries
integer
required

Number of successes before the member is switched to ONLINE state

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

2

timeout
integer
required

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

Required range: x <= 2147483
Examples:

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
expected_codes
string | null

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

Examples:

"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
Examples:

"CONNECT"

"DELETE"

"GET"

"HEAD"

"OPTIONS"

"PATCH"

"POST"

"PUT"

"TRACE"

max_retries_down
integer | null

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

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

2

url_path
string | null

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

Minimum length: 1
Examples:

"/"

Response

200 - application/json

OK

tasks
string[]
required

List of task IDs

Examples:
["d478ae29-dedc-4869-82f0-96104425f565"]