Skip to main content

backends

Creates, updates, deletes, gets or lists a backends resource.

Overview​

Namebackends
TypeResource
Idoci.load_balancer.backends

Fields​

The following fields are returned by SELECT queries:

The backend server information is being retrieved.

NameDatatypeDescription
namestringA read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080
backupbooleanWhether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy. Note: You cannot add a backend server marked as backup to a backend set that uses the IP Hash policy. Example: false
drainbooleanWhether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false
ipAddressstringThe IP address of the backend server. Example: 10.0.0.3
maxConnectionsinteger (int32)The maximum number of simultaneous connections the load balancer can make to the backend. If this is not set or set to 0 then the maximum number of simultaneous connections the load balancer can make to the backend is unlimited. Example: 300
offlinebooleanWhether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false
portinteger (int32)The communication port for the backend server. Example: 8080
weightinteger (int32)The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see [How Load Balancing Policies Work](/Content/Balance/Reference/lbpolicies.htm). Example: 3

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectloadBalancerId, backendSetName, backendName, regionopc-request-idGets the specified backend server's configuration information.
listselectloadBalancerId, backendSetName, regionopc-request-idLists the backend servers for a given load balancer and backend set.
createinsertloadBalancerId, backendSetName, region, ipAddress, portopc-request-id, opc-retry-tokenAdds a backend server to a backend set.
updateupdateloadBalancerId, backendSetName, backendName, region, weight, backup, drain, offlineopc-request-id, opc-retry-tokenUpdates the configuration of a backend server within the specified backend set.
deletedeleteloadBalancerId, backendSetName, backendName, regionopc-request-idRemoves a backend server from a given load balancer and backend set.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
backendNamestringThe IP address and port of the backend server to remove. Example: 10.0.0.3:8080
backendSetNamestringThe name of the backend set associated with the backend server. Example: example_backend_set
loadBalancerIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and server.
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
opc-request-idstringThe unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
opc-retry-tokenstringA token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

SELECT examples​

Gets the specified backend server's configuration information.

SELECT
name,
backup,
drain,
ipAddress,
maxConnections,
offline,
port,
weight
FROM oci.load_balancer.backends
WHERE loadBalancerId = '{{ loadBalancerId }}' -- required
AND backendSetName = '{{ backendSetName }}' -- required
AND backendName = '{{ backendName }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;

INSERT examples​

Adds a backend server to a backend set.

INSERT INTO oci.load_balancer.backends (
backup,
drain,
ipAddress,
maxConnections,
offline,
port,
weight,
loadBalancerId,
backendSetName,
region,
opc-request-id,
opc-retry-token
)
SELECT
{{ backup }},
{{ drain }},
'{{ ipAddress }}' /* required */,
{{ maxConnections }},
{{ offline }},
{{ port }} /* required */,
{{ weight }},
'{{ loadBalancerId }}',
'{{ backendSetName }}',
'{{ region }}',
'{{ opc-request-id }}',
'{{ opc-retry-token }}'
;

UPDATE examples​

Updates the configuration of a backend server within the specified backend set.

UPDATE oci.load_balancer.backends
SET
backup = {{ backup }},
drain = {{ drain }},
maxConnections = {{ maxConnections }},
offline = {{ offline }},
weight = {{ weight }}
WHERE
loadBalancerId = '{{ loadBalancerId }}' --required
AND backendSetName = '{{ backendSetName }}' --required
AND backendName = '{{ backendName }}' --required
AND region = '{{ region }}' --required
AND weight = '{{ weight }}' --required
AND backup = {{ backup }} --required
AND drain = {{ drain }} --required
AND offline = {{ offline }} --required
AND opc-request-id = '{{ opc-request-id}}'
AND opc-retry-token = '{{ opc-retry-token}}';

DELETE examples​

Removes a backend server from a given load balancer and backend set.

DELETE FROM oci.load_balancer.backends
WHERE loadBalancerId = '{{ loadBalancerId }}' --required
AND backendSetName = '{{ backendSetName }}' --required
AND backendName = '{{ backendName }}' --required
AND region = '{{ region }}' --required
AND opc-request-id = '{{ opc-request-id }}'
;