Load Balancers
Last updated
Last updated
/networking/loadbalancers
Names, example: resource01,!resource02,resource42
Environments, example: PRODUCTION,DEVELOPMENT
Status, example: ACTIVE,INACTIVE
Tags, example: mytagkey:mytagvalue,application:itcare
Filter list by monitoring status
Filter list by monitoring on call status
URLs, example: .cegedim.cloud
IRules, iRule-Redirect-gis-workflow
Default Persistence, example: cookie,hash, or source_addr etc...
Fallback Persistence, example: dest_addr, source_addr, etc...
Load Balancing Mode, example: least-connections-node, round-robin, etc...
Protocols, example: HTTP, HTTPS, MYSQL, etc...
VLAN, example: EB_1125_DMZ8
Results page you want to retrieve (0..N)
Number of records per page.
Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria is not supported.
This method allows to create a LoadBalancer.
You will have to know at the minimum :
the area of the region where you want to host your cluster (area
attribute). Areas can be available in List Regions method.
url (url
attribute). The url you want to create and respect URLs naming convention.
network ID of the cluster (networkId
attribute).
On which service the LoadBalancer belongs to (serviceId
attribute).
On which domain the url should be belong to (domain
attribute).
Healthcheck to check that your url is responding (healthcheck
attribute).
Persistence configuration (persistence
attribute).
Port member : port on which the members of the loadbalancer should be listening to (portMembers
attribute). Example: 80
Profile Names (profileName
attribute). Ex : HTTP, HTTPS, TCP. For HTTP, profileName
= 80.
Redirection rules (redirectToHttps
attribute). Redirect to HTTPS or not.
Members (members
attribute). Members of the loadbalancer
optional fields:
region
attribute).setUpDNSEnabled
attribute). If True, the domain must support the DNS creation.
If the attribut is set to True and the domain do not support DNS setup, an error 400 will be raised.networkId
attribute). If not set, the system will choose the default network available on the Availability Zone.This method is asynchronous (status code 202
) and you'll have to wait for async action to be completed by checking its status.
POST /loadbalancers
{
"url": "url.cegedim.com",
"serviceId": 46922,
"area": "EB-QA",
"networkId": 4242,
"healthcheck":"CDGM",
"persistence": true,
"portMembers": 80,
"profileName": "HTTP",
"redirectToHttps":false,
"setUpDNSEnabled":false,
"members": [
{
"id": 42,
"network": {
"id": 42,
"ipAddress" : "1.2.3.4"
}
}
]
}
When the LoadBalancer supports SSL
POST /loadbalancers
{
"url": "url.cegedim.com",
"serviceId": 46922,
"area": "EB-QA",
"networkId": 4242,
"healthcheck":"CDGM",
"persistence": true,
"portMembers": 80,
"profileName": "HTTPS",
"redirectToHttps":true,
"setUpDNSEnabled":false,
"sslProfile":"my_ssl_profle",
"certificateName":"my_cert.crt",
"members": [
{
"id": 42,
"network": {
"id": 42,
"ip" : "1.2.3.4"
}
}
]
}
/networking/loadbalancers
Area. Refer to an Area of a Region, that is a low-latency network area, available in List Regions method. If absent, default Area of Region will be used.
Indicates if backup has to be setup on instance. If absent, backup will be setup automatically if instance is in a production service.
certificate of the load balancer., example: wildcard_cegedim.com
BackupPolicy id. Refers to desired backup policy to be applied for the database, must be set when backup is enabled.
healtcheck of load balancer., example: http
A pool member of a load balancer
Indicates if alerting should be activated. If absent, set to false.
Indicates if monitoring will be setup. If absent, it will be automatically be setup if this is an production environment, or if backup is enabled.
Network id. Refer to networks available in List Networks method. If absent, a default network of AZ will be used.
Indicates why a production resource is not under backup.
Indicates why a production resource is not under monitoring.
Indicates why a production resource is not replicated.
Indicates if on call teams will be called on non business hours if an incident occurs on instance. If absent, set to false.
port member of load balancer., example: 80, 443, ...
profile name of load balancer.
Region. that is a low-latency network area, available in List Regions method. If absent, default Area of Region will be used.
Regulation. Refer to the regulation of the Area (HDS|STANDARD). If absent, default 'STANDARD' will be used.
Indicates if replication will be setup. If absent, it will be automatically be setup if this is an production environment
BackupPolicy id. Refers to desired backup policy to be applied for the virtual machine, must be set when backup is enabled.
id of service to put instance in.
Indicates if a DNS record is to be set. If absent, set to false.
ssl profile of the load balancer., example: profile_wildcard.cegedim.com_secure
url of load balancer. Must be unique, and fit naming rules convention., example: url.cegedim.com
^(https?:\\/\\/)?(www\\.)?[a-zA-Z][a-zA-Z0-9.-]{2,63}+$
port of load balancer in case of TCP VS Profile
This method allows to update a load balancer.
Structure of payload is generic and describes :
operation
you want to be performedoptions
data relative to the operation performed - see details.Below are different operations currently implemented.
Start Load Balancer
Use the start
operation to start the load balancer.
This method is synchronous (status code 202
).
Example :
PATCH /loadbalancers/1234
{
"operation": "start",
"options": {
"changeReference": "5678"
}
}
Stop Load Balancer
Use the stop
operation to stop the load balancer.
This method is synchronous (status code 202
).
PATCH /loadbalancers/1234
{
"operation": "stop",
"options": {
"changeReference": "5678"
}
}
Create Bot Defense for Load Balancer
Use the activate_bot
operation to Update Security Profile for load balancer.
Use the template
with values strict
, standard
to set the template to be applied. Default template value is standard
.
Use the mode
with values transparent
, blocking
to set the mode to be applied. Mode is optional and default mode is blocking
.
This method is synchronous (status code 202
).
PATCH /loadbalancers/1234
{
"operation": "activate_bot",
"options": {
"changeReference": "5678",
"template": "strict",
"mode" : "blocking"
}
}
Update Bot Defense for Load Balancer
Use the update_bot
operation to Update Security Profile for load balancer.
Use the template
with values strict
, standard
to set the template to be applied. Default template value is standard
.
Use the mode
with values transparent
, blocking
to set the mode to be applied. Mode is optional and default mode is blocking
.
This method is synchronous (status code 202
).
PATCH /loadbalancers/1234
{
"operation": "update_bot",
"options": {
"changeReference": "5678",
"template": "strict",
"mode" : "blocking"
}
}
When the Security Profile is applied, Use the mode
with values transparent
, blocking
to set the mode to be applied. Mode is optional and default mode is blocking
.
In transparent
mode, requests considered to be malicious generate an alarm but are not blocked.
blocking
mode blocks the requests identified as malicious by Bot Defense
PATCH /loadbalancers/1234
{
"operation": "update_bot",
"options": {
"changeReference": "5678",
"mode" : "transparent"
}
}
Delete Bot Defense Security Profile from Load Balancer
When Security Profile is activated on a Load Balancer, the attribut botDefenseEnabled
on the PATCH /loadbalancers/1234
is true.
To remove the Bot Defense Security Profile from a Load Balancer, use :
Use the delete_bot
operation to remove Security Profile from the load balancer.
This method is synchronous (status code 202
).
PATCH /loadbalancers/1234
{
"operation": "delete_bot",
"options": {
"changeReference": "5678"
}
}
Update IP to whitelist for Load Balancer
Use the edit_bot_whitelist
operation to update/add IP to whitelist for load balancer.
This method is synchronous (status code 202
).
PATCH /loadbalancers/1234
{
"operation": "edit_bot_whitelist",
"options": {
"ip": "10.0.3.40",
"changeReference": "5678"
}
}
Remove IP Address from whitelist for Load Balancer
Use the delete_bot_whitelist
operation to remove IP from whitelist for load balancer.
This method is synchronous (status code 202
).
PATCH /loadbalancers/1234
{
"operation": "delete_bot_whitelist",
"options": {
"ip": "10.0.3.40",
"changeReference": "5678"
}
}
** changeReference
(optional) is the RFC Number if available.
Update Monitoring for Load Balancer and its URLs
Use the update_monitoring
operation to update monitoring status for load balancer.
This method is synchronous (status code 202
).
PATCH /loadbalancers/1234
{
"operation": "update_monitoring",
"options": {
"state": true,
"on_call": true
}
}
url1
and url4
form its list of URLs.PATCH /loadbalancers/1234
{
"operation": "update_monitoring",
"options": {
"state": true,
"on_call": true,
"updateUrls": [
"url1",
"url4"
]
}
}
/networking/loadbalancers/{id}
Load Balancer Id, example: 123
Operation to perform on target object, example: operation_name
Specific payload to pass to have the operation performed. Refer to documentation for each operation.
/networking/loadbalancers/{id}/events
id, example: 500067154
From Date (ISO8601 format), example: 2023-03-15T00:00:00.000Z
To Date (ISO8601 format), example: 2023-03-16T00:00:00.000Z
type, example: security
criteria, example: bot
size, example: 20
Add a member to an existing loadbalancer.
The member must be a valid ITCare resource and must be in the same network as the other members of the loadbalancer.
Request example :
POST /compute/loadbalancers/my-service.cegedim.cloud/members
{
"resourceId": 5050706,
"port": 80,
"state": "enabled",
"name": "REBITCGDM1032",
"ip": "10.25.19.158"
}
Minimum payload must contain the following information :
Other field will be ignored. The following payload is valid:
POST /compute/loadbalancers/my-service.cegedim.cloud/members
{
"resourceId": 5050706,
"port": 80,
}
This method is synchronous (status code 200
) and will return loadbalancer's members list with the new member added :
[
{
"resourceId": 1050975,
"name": "PEB4APP01",
"port": 443,
"state": "enabled",
"status": "up",
"ip": "10.26.12.11"
},
{
"resourceId": 1050976,
"name": "PEB4APP02",
"port": 443,
"state": "enabled",
"status": "up",
"ip": "10.26.12.12"
},
{
"resourceId": 898734,
"name": "PEB4APP03",
"port": 443,
"state": "enabled",
"status": "up",
"ip": "10.26.12.13"
}
]
Note: New member will added with state enabled.
Note: Member statistic are not included in the response body
/networking/loadbalancers/{id}/members
IP address of the member.
Category of the member
Family of the member
Internal type of the member of the member
Area on which the member is located
Name of the member on the loadbalancer
port of the member., example: 80, 443, ...
Name of the member of the member
Id of the resource. Required when an operation is performed.
serviceId on which this member belongs to
Member state. (enabled, disabled, offline)
Status of the member. (up, down, user_down)
Technical Network on which the member is located
Technology of the member
Set the state of a loadbalancer member.
The member must be a valid ITCare resource and must be a member of the specified loadbalancer.
Possible state value are :
Example :
PATCH /compute/loadbalancers/123/members/1050975
{
"operation": "disabled"
}
This method is synchronous (status code 200
) and will return loadbalancer's member object :
{
"resourceId": 1050975,
"name": PEB4APP01,
"port": 443,
"state": "disabled",
"status": "up",
"name": "PEB4APP01",
"address": "10.26.12.11"
}
/networking/loadbalancers/{id}/members/{memberId}
This method allows to create a URL for a LoadBalancer.
name
is the name of the url.setUpDNSEnabled
setup dns or not.monitoringEnabled
enable monitoring for urlonCallSupervision
enable 24/7 monitoring for urlThis method is asynchronous (status code 202
) and you'll have to wait for async action to be completed by checking its status.
POST /loadbalancers/124/urls
{
"name": "url.cegedim.com",
"setUpDNSEnabled": false,
"monitoringEnabled": true,
"onCallSupervision": true
}
/networking/loadbalancers/{id}/urls
Indicates if monitoring will be setup.
url of load balancer. Must be unique, and fit naming rules convention., example: url.cegedim.com
^(https?:\\/\\/)?(www\\.)?[a-zA-Z][a-zA-Z0-9.-]{2,63}+$
Indicates if on call teams will be called on non business hours if an incident occurs on instance. If absent, set to false.
Indicates if a DNS record is to be set. If absent, set to false.
ssl profile of the load balancer., example: profile_wildcard.cegedim.com_secure
This method allows to delete a URL of Load Balancer.
This method is asynchronous (status code 202
) and you'll have to wait for async action to be completed by checking its status.
DELETE /loadbalancers/123/urls/456
/networking/loadbalancers/{id}/urls/{urlId}
Load Balancer Id, example: 123
Load Balancer Url Id, example: 123
This method allows to update a url of load balancer.
Structure of payload is generic and describes :
operation
you want to be performedoptions
data relative to the operation performed - see details.Below are different operations currently implemented.
Update Monitoring for Load Balancer and its URLs
Use the update_monitoring
operation to update monitoring status for load balancer.
This method is synchronous (status code 202
).
PATCH /loadbalancers/1234/urls/5678
{
"operation": "update_monitoring",
"options": {
"state": true,
"onCall": true
}
}
/networking/loadbalancers/{id}/urls/{urlId}
Load Balancer Id, example: 123
Load Balancer Url Id, example: 123
Operation to perform on target object, example: operation_name
Specific payload to pass to have the operation performed. Refer to documentation for each operation.