/v1/health-monitorsCreate health monitor
Create a new health monitor for a pool
Request Body
requiredContent-Type: application/json
name
stringoptionalpool_id
string<uuid>requiredtype
stringrequiredEnum: "HTTP", "HTTPS", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT", "SCTP"
delay
integerrequiredtimeout
integerrequiredmax_retries
integerrequiredmax_retries_down
integeroptionalhttp_method
stringoptionalEnum: "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "OPTIONS", "CONNECT", "PATCH"
url_path
stringoptionalDefault: "/"
expected_codes
stringoptionalDefault: "200"
tags
arrayoptionalResponses
Health monitor created
Content-Type: application/json
health_monitor
objectoptionalInvalid request parameters
Content-Type: application/json
error
objectrequiredAuthentication required or token invalid
Content-Type: application/json
error
objectrequiredPool not found
Content-Type: application/json
error
objectrequiredPool already has a health monitor
Content-Type: application/json
error
objectrequiredInternal server error
Content-Type: application/json
error
objectrequiredcurl -X POST "https://api.spo1.mycloud.com/v1/health-monitors" \-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \-H "Content-Type: application/json" \-d '{"name": "string","pool_id": "550e8400-e29b-41d4-a716-446655440000","type": "HTTP","delay": 1,"timeout": 1,"max_retries": 1,"max_retries_down": 1,"http_method": "GET","url_path": "/","expected_codes": "200","tags": ["web","frontend"]}'
Response
Health monitor created
{"health_monitor": {"id": "550e8400-e29b-41d4-a716-446655440000","crn": "crn:spo1:loadbalancer:health-monitor:550e8400-e29b-41d4-a716-446655440000","name": "http-monitor","provisioning_status": "ACTIVE","operating_status": "ONLINE","type": "HTTP","delay": 5,"timeout": 3,"max_retries": 3,"max_retries_down": 3,"http_method": "GET","url_path": "/health","expected_codes": "200","pool_id": "550e8400-e29b-41d4-a716-446655440000","tags": ["web","frontend"],"created_at": "2024-01-15T10:30:00Z","updated_at": "2024-01-15T10:30:00Z"}}