Changing the load balancing of a DNS Request¶
Note
The body must include the attributes id and modified to identify the corresponding entry.
Note
Make sure that the id of the DNS record in the path of the request is the same as the value for the attribute id in the body.
Note
The user can set the load balancing settings together with the creation of a DNS record. To do so, add the object UpstreamOptionsVO under upstreamOptions.
Sends a PUT request to the endpoint /domain/{domainId}/dns-records/{id}/load-balancing.
Description¶
The Change-Load-Balancing request allows the user to change the load balancing of a DNS record of the organisation.
Requirements¶
Values of the request: Domain-ID {domainId}, DNS-Record-ID {id}ord-ID {id}
Objects: UpstreamOptionsVO
Request¶
To change the setting for load balancing of a DNS record, the Domain-ID {domainId} and the DNS-Record-ID {id} need to be added to the path of the request.
For a detailed specification of which information is required to change the load balancing for a DNS record, the object UpstreamOptionsVO with the following attributes needs to be defined in the body:
| Attributes | Description | Values |
|---|---|---|
id |
The ID of the entry. | integer |
modified |
The last modification date in ISO 8601 format. | string($date-time) |
The following attributes are optional:
| Attributes | Description | Values |
|---|---|---|
weight |
The weight of the SRV record. | integer |
mxFails |
The number of errors that must be present to start the load balancing. | integer |
failTimeout |
The maximum value in seconds of connection errors until the load balancing will be activated. |
|
backup |
Defines if the entry is a backup server or not. |
|
down |
Defines if the server is available. |
|
The system returns the object UpstreamOptionsVO with the changed information.
Example¶
Example request body:
{
"objectType": "string",
"name": "string",
"value": "string",
"priority": 0,
"ttl": 0,
"vhostId": 0,
"recordType": "string",
"weight": 0,
"port": 0,
"active": true,
"paused": true,
"sslCertTemplate": "string",
"upstreamOptions": "string",
"alternativeCname": "string",
"environment": "string",
"caaFlags": 0,
"caaTag": "string",
"endpoints": "string",
"serviceType": 0,
"encryption": "string",
"identificationNumber": "string",
"hashType": "string",
"enabled": true,
"comment": "string"
}
Responses¶
The following responses are available:
| STATUS CODE | DESCRIPTION |
|---|---|
| 200 | The request has succeeded. |
| 400 | The request was unsuccessful. The request was invalid or information is missing. |
| 401 | The request has not succeeded because the user authentication was incorrect. |
| 403 | The request has not succeeded because the user does not have the right permissions. |